#include <sys/cdefs.h>#include <stdlib.h>Go to the source code of this file.
Defines | |
| #define | min(a, b) (a) < (b) ? a : b |
| #define | swapcode(TYPE, parmi, parmj, n) |
| #define | SWAPINIT(a, es) |
| #define | swap(a, b) |
| #define | vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) |
| #define | CMP(t, x, y) (cmp((x), (y), (t))) |
Typedefs | |
| typedef int | cmp_t (const void *, const void *, void *) |
Functions | |
| static char * | med3 (char *, char *, char *, cmp_t *, void *) |
| static void | swapfunc (char *, char *, int, int) |
| void | sat_sort (void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) |
| #define min | ( | a, | |||
| b | ) | (a) < (b) ? a : b |
| #define swapcode | ( | TYPE, | |||
| parmi, | |||||
| parmj, | |||||
| n | ) |
Value:
{ \
long i = (n) / sizeof (TYPE); \
TYPE *pi = (TYPE *) (parmi); \
TYPE *pj = (TYPE *) (parmj); \
do { \
TYPE t = *pi; \
*pi++ = *pj; \
*pj++ = t; \
} while (--i > 0); \
}
Definition at line 53 of file qsort_r.c.
Referenced by swapfunc().
| #define SWAPINIT | ( | a, | |||
| es | ) |
Value:
swaptype = ((char *)a - (char *)0) % sizeof(long) || \ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
Definition at line 64 of file qsort_r.c.
Referenced by sat_sort().
| #define swap | ( | a, | |||
| b | ) |
Value:
if (swaptype == 0) { \ long t = *(long *)(a); \ *(long *)(a) = *(long *)(b); \ *(long *)(b) = t; \ } else \ swapfunc(a, b, es, swaptype)
Definition at line 78 of file qsort_r.c.
Referenced by sat_sort().
| #define vecswap | ( | a, | |||
| b, | |||||
| n | ) | if ((n) > 0) swapfunc(a, b, n, swaptype) |
| #define CMP | ( | t, | |||
| x, | |||||
| y | ) | (cmp((x), (y), (t))) |
| static char * med3 | ( | char * | a, | |
| char * | b, | |||
| char * | c, | |||
| cmp_t * | cmp, | |||
| void * | thunk | |||
| ) | [inline, static] |
| static void swapfunc | ( | char * | a, | |
| char * | b, | |||
| int | n, | |||
| int | swaptype | |||
| ) | [inline, static] |
| void sat_sort | ( | void * | a, | |
| size_t | n, | |||
| size_t | es, | |||
| cmp_t * | cmp, | |||
| void * | thunk | |||
| ) |
Definition at line 99 of file qsort_r.c.
References CMP, med3(), min, swap, SWAPINIT, and vecswap.
Referenced by create_solutions(), create_transaction_info(), pool_shrink_whatprovides(), prune_to_best_version(), solver_allruleinfos(), solver_unifyrules(), transaction_all_obs_pkgs(), transaction_classify(), and transaction_classify_pkgs().