From 4cc6f73f6773de51a26309ec1bf75ea8ce12a2ee Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 19 Mar 2001 23:22:41 +0000 Subject: Add in alphasort (working fine) and scandir (just a stub for now). -Erik --- libc/misc/dirent/alphasort.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 libc/misc/dirent/alphasort.c (limited to 'libc/misc/dirent/alphasort.c') diff --git a/libc/misc/dirent/alphasort.c b/libc/misc/dirent/alphasort.c new file mode 100644 index 000000000..f0ff0497a --- /dev/null +++ b/libc/misc/dirent/alphasort.c @@ -0,0 +1,10 @@ +#include +#include "dirstream.h" + +int alphasort(const __ptr_t __e1, const __ptr_t __e2) +{ + const struct dirent *a = __e1; + const struct dirent *b = __e2; + return (strcmp(a->d_name, b->d_name)); +} + -- cgit v1.2.3