Added prototypes.

This commit is contained in:
Bruce Evans 1995-12-26 13:25:13 +00:00
parent 337e9f0bd2
commit 432889653c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13030
4 changed files with 29 additions and 9 deletions

View file

@ -35,6 +35,7 @@
* SUCH DAMAGE.
*
* @(#)quad.h 8.1 (Berkeley) 6/4/93
* $Id$
*/
/*
@ -95,7 +96,11 @@ union uu {
#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1))
#define LHUP(x) ((x) << HALF_BITS)
extern u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
quad_t __divdi3 __P((quad_t a, quad_t b));
quad_t __moddi3 __P((quad_t a, quad_t b));
u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
u_quad_t __udivdi3 __P((u_quad_t a, u_quad_t b));
u_quad_t __umoddi3 __P((u_quad_t a, u_quad_t b));
/*
* XXX

View file

@ -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 <sys/types.h>
#include <stdlib.h>
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;

View file

@ -32,12 +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 <sys/types.h>
#include <stdlib.h>
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
@ -83,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 ))
@ -94,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;

View file

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)quad.h 8.1 (Berkeley) 6/4/93
* $Id$
* $Id$
*/
/*
@ -96,7 +96,11 @@ union uu {
#define LHALF(x) ((x) & ((1 << HALF_BITS) - 1))
#define LHUP(x) ((x) << HALF_BITS)
extern u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
quad_t __divdi3 __P((quad_t a, quad_t b));
quad_t __moddi3 __P((quad_t a, quad_t b));
u_quad_t __qdivrem __P((u_quad_t u, u_quad_t v, u_quad_t *rem));
u_quad_t __udivdi3 __P((u_quad_t a, u_quad_t b));
u_quad_t __umoddi3 __P((u_quad_t a, u_quad_t b));
/*
* XXX