diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-05-08 18:09:01 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-05-08 18:09:01 +0000 |
commit | 6c0899094d50e0d35d699594bfcd9cae4164abe2 (patch) | |
tree | 309182bb7eb0f27df0361601c5bdd673b0de42da /libc/misc/dirent | |
parent | 099c1958f371a3c67eaa74c83af6b97080ff1c0c (diff) |
Turns out alphasort was totally broken. This fixed one works.
-Erik
Diffstat (limited to 'libc/misc/dirent')
-rw-r--r-- | libc/misc/dirent/alphasort.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 <string.h> #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); } |