From 34627f7c652068280cc334829d1371b672d3b184 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 20 Dec 2003 05:37:03 +0000 Subject: [PATCH] Fri Dec 19 21:31:48 2003 Ben Pfaff * sysfile-info.c: (compare_vectors_by_name) Rewrite. --- src/ChangeLog | 4 ++++ src/sysfile-info.c | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9e3a00f8..15076a0d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +Fri Dec 19 21:31:48 2003 Ben Pfaff + + * sysfile-info.c: (compare_vectors_by_name) Rewrite. + Fri Dec 19 21:30:24 2003 Ben Pfaff * sort.c: (compare_case_lists) Rewrite. diff --git a/src/sysfile-info.c b/src/sysfile-info.c index 409dce84..584db143 100644 --- a/src/sysfile-info.c +++ b/src/sysfile-info.c @@ -557,9 +557,14 @@ describe_variable (struct variable *v, struct tab_table *t, int r, int as) } static int -compare_vectors_by_name (const void *a, const void *b) +compare_vectors_by_name (const void *a_, const void *b_) { - return strcmp ((*((struct vector **) a))->name, (*((struct vector **) b))->name); + struct vector *const *pa = a_; + struct vector *const *pb = b_; + struct vector *a = *pa; + struct vector *b = *pb; + + return strcmp (a->name, b->name); } /* Display a list of vectors. If SORTED is nonzero then they are -- 2.30.2