Lines Matching refs:size

69 static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, con…
70 static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *));
105 PHPAPI int php_mergesort(void *base, size_t nmemb, size_t size, int (*cmp)(const void *, const void… in php_mergesort() argument
113 if (size < PSIZE / 2) { /* Pointers must fit into 2 * size. */ in php_mergesort()
126 if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE)) in php_mergesort()
129 if ((list2 = malloc(nmemb * size + PSIZE)) == NULL) in php_mergesort()
133 setup(list1, list2, nmemb, size, cmp); in php_mergesort()
134 last = list2 + nmemb * size; in php_mergesort()
157 while ((b += size) < t && cmp(q, b) >sense) in php_mergesort()
163 EXPONENTIAL: for (i = size; ; i <<= 1) in php_mergesort()
165 if ((p = t - size) > b && in php_mergesort()
173 if (i == size) in php_mergesort()
178 while (t > b+size) { in php_mergesort()
179 i = (((t - b) / size) >> 1) * size; in php_mergesort()
186 FASTCASE: while (i > size) in php_mergesort()
194 i = size; in php_mergesort()
229 last = list2 + nmemb*size; in php_mergesort()
232 memmove(list2, list1, nmemb*size); in php_mergesort()
242 i = size; \
246 a -= size; \
251 i = size; \
265 static void setup(u_char *list1, u_char *list2, size_t n, size_t size, int (*cmp)(const void *, con… in setup() argument
270 size2 = size*2; in setup()
272 insertionsort(list1, n, size, cmp); in setup()
273 *EVAL(list2) = (u_char*) list2 + n*size; in setup()
281 insertionsort(list1 + (n - i) * size, i, size, cmp); in setup()
282 last = list1 + size * (n - i); in setup()
283 *EVAL(list2 + (last - list1)) = list2 + n * size; in setup()
288 sense = (cmp(f1, f1 + size) > 0); in setup()
293 if ((cmp(f2, f2+ size) > 0) != sense) in setup()
301 swap (f1, f1 + size); in setup()
306 if ((cmp(f2-size, f2) > 0) != sense) { in setup()
309 reverse(f1, f2-size); in setup()
314 reverse (f1, f2-size); in setup()
316 if (f2 < last || cmp(f2 - size, f2) > 0) in setup()
319 p2 = *EVAL(p2) = list2 + n*size; in setup()
325 if (cmp (f1, f1 + size) > 0) in setup()
326 swap(f1, f1 + size); in setup()
336 static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const void *, const void *)) in insertionsort() argument
341 for (ai = a+size; --n >= 1; ai += size) in insertionsort()
342 for (t = ai; t > a; t -= size) { in insertionsort()
343 u = t - size; in insertionsort()