#include <sort.h>
#include <mem.h>
#include <malloc.h>
Go to the source code of this file.
Defines | |
#define | IBUF_SIZE 32 |
Immediate buffer size. | |
#define | INDEX(buf, i, elem_size) ((buf) + (i) * (elem_size)) |
Array accessor. | |
Functions | |
static void | _gsort (void *data, size_t cnt, size_t elem_size, sort_cmp_t cmp, void *arg, void *slot) |
Gnome sort. | |
static void | _qsort (void *data, size_t cnt, size_t elem_size, sort_cmp_t cmp, void *arg, void *slot, void *pivot) |
Quicksort. | |
bool | gsort (void *data, size_t cnt, size_t elem_size, sort_cmp_t cmp, void *arg) |
Gnome sort wrapper. | |
bool | qsort (void *data, size_t cnt, size_t elem_size, sort_cmp_t cmp, void *arg) |
Quicksort wrapper. |
This files contains functions implementing several sorting algorithms (e.g. quick sort and gnome sort).
Definition in file sort.c.