From 6a0ace8bd06c07596749965bccd76d8a1f0e4605 Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 26 Dec 1995 13:25:13 +0000 Subject: Added prototypes. --- lib/libc/stdlib/qsort.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'lib/libc/stdlib') diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index 49f5349..66c0224 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -32,13 +32,18 @@ */ #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 #include -static inline char *med3 __P((char *, char *, char *, int (*)())); +typedef int cmp_t __P((const void *, const void *)); +static inline char *med3 __P((char *, char *, char *, cmp_t *)); static inline void swapfunc __P((char *, char *, int, int)); #define min(a, b) (a) < (b) ? a : b @@ -84,7 +89,7 @@ swapfunc(a, b, n, swaptype) static inline char * med3(a, b, c, cmp) char *a, *b, *c; - int (*cmp)(); + cmp_t *cmp; { return cmp(a, b) < 0 ? (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) @@ -95,7 +100,7 @@ void qsort(a, n, es, cmp) void *a; size_t n, es; - int (*cmp)(); + cmp_t *cmp; { char *pa, *pb, *pc, *pd, *pl, *pm, *pn; int d, r, swaptype, swap_cnt; -- cgit v1.1