diff options
Diffstat (limited to 'libc/misc/dirent/alphasort.c')
-rw-r--r-- | libc/misc/dirent/alphasort.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 <string.h> +#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)); +} + |