Lines Matching refs:a
47 #define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ argument
51 swapfunc(char *a, char *b, int n, int swaptype) in swapfunc() argument
54 swapcode(long, a, b, n) in swapfunc()
56 swapcode(char, a, b, n) in swapfunc()
59 #define swap(a, b) \ argument
61 long t = *(long *)(a); \
62 *(long *)(a) = *(long *)(b); \
65 swapfunc(a, b, es, swaptype)
67 #define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) argument
70 med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *)) in med3() argument
72 return cmp(a, b) < 0 ? in med3()
73 (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) in med3()
74 :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c )); in med3()
82 register char *a = aa; in qsort() local
84 loop: SWAPINIT(a, es); in qsort()
87 for (pm = (char *)a + es; pm < (char *) a + n * es; pm += es) in qsort()
88 for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; in qsort()
93 pm = (char *)a + (n / 2) * es; in qsort()
95 pl = (char *)a; in qsort()
96 pn = (char *)a + (n - 1) * es; in qsort()
105 swap(a, pm); in qsort()
106 pa = pb = (char *)a + es; in qsort()
108 pc = pd = (char *)a + (n - 1) * es; in qsort()
110 while (pb <= pc && (r = cmp(pb, a)) <= 0) { in qsort()
118 while (pb <= pc && (r = cmp(pc, a)) >= 0) { in qsort()
134 for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) in qsort()
135 for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; in qsort()
141 pn = (char *)a + n * es; in qsort()
142 r = min(pa - (char *)a, pb - pa); in qsort()
143 vecswap(a, pb - r, r); in qsort()
147 qsort(a, r / es, es, cmp); in qsort()
150 a = pn - r; in qsort()