#include <sys/cdefs.h>
#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
Defines | |
#define | min(a, b) (a) < (b) ? a : b |
#define | swap(a, b) |
#define | swapcode(TYPE, parmi, parmj, n) |
#define | SWAPINIT(a, es) |
#define | vecswap(a, b, n) if ((n) > 0) swapfunc((a), (b), (size_t)(n), swaptype) |
Functions | |
void | qsort_r (void *a, size_t n, size_t es, void *context, int *cmp) |
|
|
|
Value: if (swaptype == 0) { \ long t = *(long *)(void *)(a); \ *(long *)(void *)(a) = *(long *)(void *)(b); \ *(long *)(void *)(b) = t; \ } else \ swapfunc(a, b, es, swaptype) |
|
Value: { \ size_t i = (n) / sizeof (TYPE); \ TYPE *pi = (TYPE *)(void *)(parmi); \ TYPE *pj = (TYPE *)(void *)(parmj); \ do { \ TYPE t = *pi; \ *pi++ = *pj; \ *pj++ = t; \ } while (--i > 0); \ } |
|
Value: swaptype = ((char *)a - (char *)0) % sizeof(long) || \ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; |
|
|
|
|