summaryrefslogtreecommitdiff
path: root/sorters.h
blob: 2e1c4ec68dc9e0269668ec464d1d1618e865ff98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stddef.h>

typedef int  (*cmpfun)(const void *, const void *);
typedef void (*sorter)(void *, size_t, size_t, cmpfun);

void musl_qsort(void *, size_t, size_t, cmpfun);
void glibc_quicksort(void *, size_t, size_t, cmpfun);
void glibc_mergesort(void *, size_t, size_t, cmpfun);
void freebsd_qsort(void *, size_t, size_t, cmpfun);

extern const struct sorter {
	const char *name;
	sorter func;
} sorters[];