From 6c0899094d50e0d35d699594bfcd9cae4164abe2 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 8 May 2001 18:09:01 +0000 Subject: Turns out alphasort was totally broken. This fixed one works. -Erik --- libc/misc/dirent/alphasort.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/dirent/alphasort.c b/libc/misc/dirent/alphasort.c index f0ff0497a..d7a1d8d93 100644 --- a/libc/misc/dirent/alphasort.c +++ b/libc/misc/dirent/alphasort.c @@ -1,10 +1,9 @@ #include #include "dirstream.h" -int alphasort(const __ptr_t __e1, const __ptr_t __e2) +int alphasort(const void * a, const void * b) { - const struct dirent *a = __e1; - const struct dirent *b = __e2; - return (strcmp(a->d_name, b->d_name)); + return strcmp ((*(const struct dirent **) a)->d_name, + (*(const struct dirent **) b)->d_name); } -- cgit v1.2.3