summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/qsort.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-06-05 02:59:00 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-06-05 02:59:00 +0000
commit78e55a1f29558e8be54566ead1e7be8ab9d45273 (patch)
tree65fd45fa55d0cd3888b40a4f41dd3383616dfd74 /lib/libc/stdlib/qsort.c
parent885f2f31b4599f4bc7468278c783c1c30f1f86ed (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/qsort.c')
-rw-r--r--lib/libc/stdlib/qsort.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c
index 7c3d2133a064..49f53495a10a 100644
--- a/lib/libc/stdlib/qsort.c
+++ b/lib/libc/stdlib/qsort.c
@@ -32,17 +32,13 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-#if 0
static char sccsid[] = "@(#)qsort.c 8.1 (Berkeley) 6/4/93";
-#endif
-static const char rcsid[] =
- "$Id$";
#endif /* LIBC_SCCS and not lint */
+#include <sys/types.h>
#include <stdlib.h>
-typedef int cmp_t __P((const void *, const void *));
-static inline char *med3 __P((char *, char *, char *, cmp_t *));
+static inline char *med3 __P((char *, char *, char *, int (*)()));
static inline void swapfunc __P((char *, char *, int, int));
#define min(a, b) (a) < (b) ? a : b
@@ -88,7 +84,7 @@ swapfunc(a, b, n, swaptype)
static inline char *
med3(a, b, c, cmp)
char *a, *b, *c;
- cmp_t *cmp;
+ int (*cmp)();
{
return cmp(a, b) < 0 ?
(cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a ))
@@ -99,7 +95,7 @@ void
qsort(a, n, es, cmp)
void *a;
size_t n, es;
- cmp_t *cmp;
+ int (*cmp)();
{
char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
int d, r, swaptype, swap_cnt;