Lines Matching defs:thunk
99 med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk
105 return CMP(thunk, a, b) < 0 ?
106 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
107 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
112 rk_qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
114 #define thunk NULL
129 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;
190 rk_qsort_r(a, r / es, es, thunk, cmp);