summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/alphasort.c
blob: f0ff0497aa1442e85fa9e0731e9e57c7ff1385e0 (plain)
1
2
3
4
5
6
7
8
9
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));
}