Lines Matching defs:thunk
95 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
101 return CMP(thunk, a, b) < 0 ?
102 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
103 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
108 qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
110 #define thunk NULL
126 pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
138 pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
139 pm = med3(pm - d, pm, pm + d, cmp, thunk);
140 pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
142 pm = med3(pl, pm, pn, cmp, thunk);
149 while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
157 while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
175 pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
193 qsort_r(a, d1 / es, es, thunk, cmp);
209 qsort_r(pn - d2, d2 / es, es, thunk, cmp);