Lines Matching refs:a
83 #define min(a, b) (a) < (b) ? a : b argument
99 #define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ argument
100 ((uintptr_t)(a) % sizeof(TYPE)) || \
104 swapfunc(char *a, char *b, size_t n, int swaptype_intptr_t, int swaptype_int) in swapfunc() argument
107 swapcode(intptr_t, a, b, n) in swapfunc()
109 swapcode(int, a, b, n) in swapfunc()
111 swapcode(char, a, b, n) in swapfunc()
114 #define swap(a, b) \ argument
116 intptr_t t = *(intptr_t *)(a); \
117 *(intptr_t *)(a) = *(intptr_t *)(b); \
120 int t = *(int *)(a); \
121 *(int *)(a) = *(int *)(b); \
124 swapfunc(a, b, es, swaptype_intptr_t, swaptype_int)
126 #define vecswap(a, b, n) \ argument
127 if ((n) > 0) swapfunc(a, b, n, swaptype_intptr_t, swaptype_int)
138 med3 (char *a, in med3() argument
148 return CMP(thunk, a, b) < 0 ? in med3()
149 (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a )) in med3()
150 :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c )); in med3()
171 __bsd_qsort_r (void *a,
178 __bsd_qsort_r (void *a, in __bsd_qsort_r() argument
185 qsort_r (void *a, in __bsd_qsort_r()
193 qsort (void *a, in __bsd_qsort_r()
204 struct { void *a; size_t n; } parameter_stack[PARAMETER_STACK_LEVELS]; in __bsd_qsort_r() member
206 SWAPINIT(intptr_t, a, es); in __bsd_qsort_r()
207 SWAPINIT(int, a, es); in __bsd_qsort_r()
211 for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) in __bsd_qsort_r()
212 for (pl = pm; pl > (char *) a && CMP(thunk, pl - es, pl) > 0; in __bsd_qsort_r()
219 pm = (char *) a + (n / 2) * es; in __bsd_qsort_r()
221 pl = a; in __bsd_qsort_r()
222 pn = (char *) a + (n - 1) * es; in __bsd_qsort_r()
231 swap(a, pm); in __bsd_qsort_r()
237 pa = pb = (char *) a + es; in __bsd_qsort_r()
238 pc = pd = (char *) a + (n - 1) * es; in __bsd_qsort_r()
241 while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { in __bsd_qsort_r()
251 while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { in __bsd_qsort_r()
269 for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) in __bsd_qsort_r()
270 for (pl = pm; pl > (char *) a && CMP(thunk, pl - es, pl) > 0; in __bsd_qsort_r()
280 pn = (char *) a + n * es; in __bsd_qsort_r()
281 r = min(pa - (char *)a, pb - pa); in __bsd_qsort_r()
282 vecswap(a, pb - r, r); in __bsd_qsort_r()
295 pa = a; in __bsd_qsort_r()
296 a = pn; in __bsd_qsort_r()
324 parameter_stack[recursion_level].a = a; in __bsd_qsort_r()
327 a = pa; in __bsd_qsort_r()
354 a = parameter_stack[recursion_level].a; in __bsd_qsort_r()