Lines Matching refs:a
57 #define min(a, b) (a) < (b) ? a : b argument
73 #define SWAPINIT(a, es) \ argument
74 swaptype = ((char *)a - (char *)0) % sizeof(long) || es % sizeof(long) \
78 static __inline void swapfunc(char *a, char *b, int n, int swaptype) { in swapfunc() argument
79 if (swaptype <= 1) swapcode(long, a, b, n) else swapcode(char, a, b, n) in swapfunc()
82 #define swap(a, b) \ argument
84 long t = *(long *)(a); \
85 *(long *)(a) = *(long *)(b); \
88 swapfunc(a, b, es, swaptype)
89 #define vecswap(a, b, n) \ argument
90 if ((n) > 0) swapfunc(a, b, n, swaptype)
92 static __inline char *med3(char *a, char *b, char *c, in med3() argument
94 return cmp(a, b) < 0 ? (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a)) in med3()
95 : (cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c)); in med3()
102 char *a = aa; in qsort() local
104 SWAPINIT(a, es); in qsort()
107 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) in qsort()
108 for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; pl -= es) in qsort()
112 pm = (char *)a + (n / 2) * es; in qsort()
114 pl = (char *)a; in qsort()
115 pn = (char *)a + (n - 1) * es; in qsort()
124 swap(a, pm); in qsort()
125 pa = pb = (char *)a + es; in qsort()
127 pc = pd = (char *)a + (n - 1) * es; in qsort()
129 while (pb <= pc && (r = cmp(pb, a)) <= 0) { in qsort()
137 while (pb <= pc && (r = cmp(pc, a)) >= 0) { in qsort()
152 for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) in qsort()
153 for (pl = pm; pl > (char *)a && cmp(pl - es, pl) > 0; pl -= es) in qsort()
157 pn = (char *)a + n * es; in qsort()
158 r = min(pa - (char *)a, pb - pa); in qsort()
159 vecswap(a, pb - r, r); in qsort()
162 if ((r = pb - pa) > (int)es) qsort(a, r / es, es, cmp); in qsort()
165 a = pn - r; in qsort()