From: Ben Pfaff Date: Sat, 20 Dec 2003 05:37:03 +0000 (+0000) Subject: Fri Dec 19 21:31:48 2003 Ben Pfaff X-Git-Tag: v0.4.0~412 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34627f7c652068280cc334829d1371b672d3b184;p=pspp-builds.git Fri Dec 19 21:31:48 2003 Ben Pfaff * sysfile-info.c: (compare_vectors_by_name) Rewrite. --- 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