Lines Matching refs:a

44 #define	MIN(a, b)	((a) < (b) ? a : b)  argument
51 swapfunc(char *a, char *b, size_t es) in swapfunc() argument
56 t = *a; in swapfunc()
57 *a++ = *b; in swapfunc()
62 #define vecswap(a, b, n) \ argument
63 if ((n) > 0) swapfunc(a, b, n)
68 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk) in med3() argument
70 return CMP(thunk, a, b) < 0 ? in med3()
71 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) in med3()
72 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); in med3()
80 local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) in local_qsort() argument
93 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) in local_qsort()
95 pl > (char *)a && CMP(thunk, pl - es, pl) > 0; in local_qsort()
100 pm = (char *)a + (n / 2) * es; in local_qsort()
102 pl = a; in local_qsort()
103 pn = (char *)a + (n - 1) * es; in local_qsort()
113 swapfunc(a, pm, es); in local_qsort()
114 pa = pb = (char *)a + es; in local_qsort()
116 pc = pd = (char *)a + (n - 1) * es; in local_qsort()
118 while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { in local_qsort()
126 while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { in local_qsort()
142 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) in local_qsort()
144 pl > (char *)a && CMP(thunk, pl - es, pl) > 0; in local_qsort()
150 pn = (char *)a + n * es; in local_qsort()
151 d1 = MIN(pa - (char *)a, pb - pa); in local_qsort()
152 vecswap(a, pb - d1, d1); in local_qsort()
166 local_qsort(a, d1 / es, es, cmp, thunk); in local_qsort()
171 a = pn - d2; in local_qsort()
190 qsort(void *a, size_t n, size_t es, cmp_t *cmp) in qsort() argument
192 local_qsort(a, n, es, cmp, NULL); in qsort()