summaryrefslogtreecommitdiff
path: root/libc/misc/dirent/alphasort.c
blob: ea45829d39a3330ac22918129053f635f548b0d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include <dirent.h>
#include <string.h>
#include "dirstream.h"

libc_hidden_proto(strcmp)

int alphasort(const void * a, const void * b)
{
    return strcmp ((*(const struct dirent **) a)->d_name,
	    (*(const struct dirent **) b)->d_name);
}