- Add missing prototypes
- Bring prototypes into scope - Correct prototype for skpc
This commit is contained in:
parent
835271da20
commit
fb901eb966
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: __main.c,v 1.3 1994/10/26 06:42:13 cgd Exp $ */
|
||||
/* $NetBSD: __main.c,v 1.4 1996/03/14 18:52:03 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Christopher G. Demetriou
|
||||
@ -30,6 +30,11 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
void __main __P((void));
|
||||
|
||||
void
|
||||
__main()
|
||||
{
|
||||
}
|
||||
|
@ -33,14 +33,16 @@
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
/*static char *sccsid = "from: @(#)bcmp.c 5.6 (Berkeley) 2/24/91";*/
|
||||
static char *rcsid = "$Id: bcmp.c,v 1.5 1995/10/07 09:26:19 mycroft Exp $";
|
||||
static char *rcsid = "$Id: bcmp.c,v 1.6 1996/03/14 18:52:05 christos Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <string.h>
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
/*
|
||||
* bcmp -- vax cmpc3 instruction
|
||||
*/
|
||||
int
|
||||
bcmp(b1, b2, length)
|
||||
const void *b1, *b2;
|
||||
register size_t length;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: imax.c,v 1.2 1994/10/26 06:42:24 cgd Exp $ */
|
||||
/* $NetBSD: imax.c,v 1.3 1996/03/14 18:52:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
int
|
||||
imax(a, b)
|
||||
int a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: imin.c,v 1.2 1994/10/26 06:42:25 cgd Exp $ */
|
||||
/* $NetBSD: imin.c,v 1.3 1996/03/14 18:52:07 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
int
|
||||
imin(a, b)
|
||||
int a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: libkern.h,v 1.6 1996/02/13 23:48:26 christos Exp $ */
|
||||
/* $NetBSD: libkern.h,v 1.7 1996/03/14 18:52:08 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -37,71 +37,79 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
static __inline int imax __P((int, int));
|
||||
static __inline int imin __P((int, int));
|
||||
static __inline u_int max __P((u_int, u_int));
|
||||
static __inline u_int min __P((u_int, u_int));
|
||||
static __inline long lmax __P((long, long));
|
||||
static __inline long lmin __P((long, long));
|
||||
static __inline u_long ulmax __P((u_long, u_long));
|
||||
static __inline u_long ulmin __P((u_long, u_long));
|
||||
static __inline int abs __P((int));
|
||||
#ifndef LIBKERN_INLINE
|
||||
#define LIBKERN_INLINE static __inline
|
||||
#define LIBKERN_BODY
|
||||
#endif
|
||||
|
||||
static __inline int
|
||||
|
||||
LIBKERN_INLINE int imax __P((int, int));
|
||||
LIBKERN_INLINE int imin __P((int, int));
|
||||
LIBKERN_INLINE u_int max __P((u_int, u_int));
|
||||
LIBKERN_INLINE u_int min __P((u_int, u_int));
|
||||
LIBKERN_INLINE long lmax __P((long, long));
|
||||
LIBKERN_INLINE long lmin __P((long, long));
|
||||
LIBKERN_INLINE u_long ulmax __P((u_long, u_long));
|
||||
LIBKERN_INLINE u_long ulmin __P((u_long, u_long));
|
||||
LIBKERN_INLINE int abs __P((int));
|
||||
|
||||
#ifdef LIBKERN_BODY
|
||||
LIBKERN_INLINE int
|
||||
imax(a, b)
|
||||
int a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static __inline int
|
||||
LIBKERN_INLINE int
|
||||
imin(a, b)
|
||||
int a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
static __inline long
|
||||
LIBKERN_INLINE long
|
||||
lmax(a, b)
|
||||
long a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static __inline long
|
||||
LIBKERN_INLINE long
|
||||
lmin(a, b)
|
||||
long a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
static __inline u_int
|
||||
LIBKERN_INLINE u_int
|
||||
max(a, b)
|
||||
u_int a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static __inline u_int
|
||||
LIBKERN_INLINE u_int
|
||||
min(a, b)
|
||||
u_int a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
static __inline u_long
|
||||
LIBKERN_INLINE u_long
|
||||
ulmax(a, b)
|
||||
u_long a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static __inline u_long
|
||||
LIBKERN_INLINE u_long
|
||||
ulmin(a, b)
|
||||
u_long a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
|
||||
static __inline int
|
||||
LIBKERN_INLINE int
|
||||
abs(j)
|
||||
int j;
|
||||
{
|
||||
return(j < 0 ? -j : j);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Prototypes for non-quad routines. */
|
||||
int bcmp __P((const void *, const void *, size_t));
|
||||
@ -110,7 +118,7 @@ int locc __P((int, char *, u_int));
|
||||
u_long random __P((void));
|
||||
char *rindex __P((const char *, int));
|
||||
int scanc __P((u_int, u_char *, u_char *, int));
|
||||
int skpc __P((int, int, char *));
|
||||
int skpc __P((int, size_t, u_char *));
|
||||
size_t strlen __P((const char *));
|
||||
char *strcat __P((char *, const char *));
|
||||
char *strcpy __P((char *, const char *));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lmax.c,v 1.2 1994/10/26 06:42:27 cgd Exp $ */
|
||||
/* $NetBSD: lmax.c,v 1.3 1996/03/14 18:52:09 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
long
|
||||
lmax(a, b)
|
||||
long a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lmin.c,v 1.2 1994/10/26 06:42:28 cgd Exp $ */
|
||||
/* $NetBSD: lmin.c,v 1.3 1996/03/14 18:52:10 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
long
|
||||
lmin(a, b)
|
||||
long a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: max.c,v 1.2 1994/10/26 06:42:31 cgd Exp $ */
|
||||
/* $NetBSD: max.c,v 1.3 1996/03/14 18:52:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
unsigned int
|
||||
max(a, b)
|
||||
unsigned int a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: min.c,v 1.2 1994/10/26 06:42:33 cgd Exp $ */
|
||||
/* $NetBSD: min.c,v 1.3 1996/03/14 18:52:13 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
unsigned int
|
||||
min(a, b)
|
||||
unsigned int a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quad.h,v 1.5 1995/10/12 15:13:58 jtc Exp $ */
|
||||
/* $NetBSD: quad.h,v 1.6 1996/03/14 18:52:14 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -110,3 +110,24 @@ typedef unsigned int qshift_t;
|
||||
#else
|
||||
typedef u_quad_t qshift_t;
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
quad_t __adddi3 __P((quad_t, quad_t));
|
||||
quad_t __anddi3 __P((quad_t, quad_t));
|
||||
quad_t __ashldi3 __P((quad_t, qshift_t));
|
||||
quad_t __ashrdi3 __P((quad_t, qshift_t));
|
||||
int __cmpdi2 __P((quad_t, quad_t));
|
||||
quad_t __divdi3 __P((quad_t, quad_t));
|
||||
quad_t __iordi3 __P((quad_t, quad_t));
|
||||
quad_t __lshldi3 __P((quad_t, qshift_t));
|
||||
quad_t __lshrdi3 __P((quad_t, qshift_t));
|
||||
quad_t __moddi3 __P((quad_t, quad_t));
|
||||
quad_t __muldi3 __P((quad_t, quad_t));
|
||||
quad_t __negdi2 __P((quad_t));
|
||||
quad_t __one_cmpldi2 __P((quad_t));
|
||||
quad_t __subdi3 __P((quad_t, quad_t));
|
||||
int __ucmpdi2 __P((u_quad_t, u_quad_t));
|
||||
u_quad_t __udivdi3 __P((u_quad_t, u_quad_t));
|
||||
u_quad_t __umoddi3 __P((u_quad_t, u_quad_t));
|
||||
quad_t __xordi3 __P((quad_t, quad_t));
|
||||
__END_DECLS
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: scanc.c,v 1.2 1994/10/26 06:42:42 cgd Exp $ */
|
||||
/* $NetBSD: scanc.c,v 1.3 1996/03/14 18:52:16 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989 Regents of the University of California.
|
||||
@ -36,6 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
int
|
||||
scanc(size, cp, table, mask)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: skpc.c,v 1.2 1994/10/26 06:42:43 cgd Exp $ */
|
||||
/* $NetBSD: skpc.c,v 1.3 1996/03/14 18:52:18 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989 Regents of the University of California.
|
||||
@ -36,16 +36,17 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
int
|
||||
skpc(mask, size, cp)
|
||||
register int mask;
|
||||
u_int size;
|
||||
size_t size;
|
||||
register u_char *cp;
|
||||
{
|
||||
register u_char *end = &cp[size];
|
||||
|
||||
while (cp < end && *cp == mask)
|
||||
while (cp < end && *cp == (u_char) mask)
|
||||
cp++;
|
||||
return (end - cp);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
/*static char *sccsid = "from: @(#)strcat.c 5.6 (Berkeley) 2/24/91";*/
|
||||
static char *rcsid = "$Id: strcat.c,v 1.5 1995/10/07 09:26:43 mycroft Exp $";
|
||||
static char *rcsid = "$Id: strcat.c,v 1.6 1996/03/14 18:52:20 christos Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <string.h>
|
||||
@ -46,6 +46,6 @@ strcat(s, append)
|
||||
char *save = s;
|
||||
|
||||
for (; *s; ++s);
|
||||
while (*s++ = *append++);
|
||||
while ((*s++ = *append++) != '\0');
|
||||
return(save);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
/*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/
|
||||
static char *rcsid = "$Id: strcpy.c,v 1.5 1995/10/07 09:26:46 mycroft Exp $";
|
||||
static char *rcsid = "$Id: strcpy.c,v 1.6 1996/03/14 18:52:21 christos Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <string.h>
|
||||
@ -45,6 +45,6 @@ strcpy(to, from)
|
||||
{
|
||||
char *save = to;
|
||||
|
||||
for (; *to = *from; ++from, ++to);
|
||||
for (; (*to = *from) != '\0'; ++from, ++to);
|
||||
return(save);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ulmax.c,v 1.2 1994/10/26 06:42:52 cgd Exp $ */
|
||||
/* $NetBSD: ulmax.c,v 1.3 1996/03/14 18:52:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
unsigned long
|
||||
ulmax(a, b)
|
||||
unsigned long a, b;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ulmin.c,v 1.2 1994/10/26 06:42:53 cgd Exp $ */
|
||||
/* $NetBSD: ulmin.c,v 1.3 1996/03/14 18:52:25 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1991 Regents of the University of California.
|
||||
@ -35,6 +35,9 @@
|
||||
* @(#)subr_xxx.c 7.10 (Berkeley) 4/20/91
|
||||
*/
|
||||
|
||||
#define LIBKERN_INLINE
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
unsigned long
|
||||
ulmin(a, b)
|
||||
unsigned long a, b;
|
||||
|
Loading…
Reference in New Issue
Block a user