Lines Matching defs:thunk
97 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
103 return CMP(thunk, a, b) < 0 ?
104 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
105 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
110 qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
112 #define thunk NULL
128 pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
140 pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
141 pm = med3(pm - d, pm, pm + d, cmp, thunk);
142 pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
144 pm = med3(pl, pm, pn, cmp, thunk);
151 while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
159 while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
177 pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
195 qsort_r(a, d1 / es, es, thunk, cmp);
211 qsort_r(pn - d2, d2 / es, es, thunk, cmp);