Lines Matching refs:cmp
71 med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *)) in med3()
73 return cmp(a, b) < 0 ? in med3()
74 (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a)) in med3()
75 : (cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c)); in med3()
84 int (*cmp)(const void *, const void *)) in yaffs_qsort()
94 for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; in yaffs_qsort()
105 pl = med3(pl, pl + d, pl + 2 * d, cmp); in yaffs_qsort()
106 pm = med3(pm - d, pm, pm + d, cmp); in yaffs_qsort()
107 pn = med3(pn - 2 * d, pn - d, pn, cmp); in yaffs_qsort()
109 pm = med3(pl, pm, pn, cmp); in yaffs_qsort()
116 while (pb <= pc && (r = cmp(pb, a)) <= 0) { in yaffs_qsort()
124 while (pb <= pc && (r = cmp(pc, a)) >= 0) { in yaffs_qsort()
141 for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; in yaffs_qsort()
154 yaffs_qsort(a, r / es, es, cmp); in yaffs_qsort()