date and time created 92/07/14 15:04:45 by bostic
[unix-history] / usr / src / sys / libkern / libkern.h
CommitLineData
1c247963
KB
1/*-
2 * Copyright (c) 1992 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
43220599 7 * @(#)libkern.h 7.4 (Berkeley) %G%
1c247963
KB
8 */
9
5b3e4f73
KB
10#include <sys/types.h>
11
43220599
KB
12static inline int
13imax(a, b)
14 int a, b;
15{
16 return (a > b ? a : b);
17}
18static inline int
19imin(a, b)
20 int a, b;
21{
22 return (a < b ? a : b);
23}
24static inline long
25lmax(a, b)
26 long a, b;
27{
28 return (a > b ? a : b);
29}
30static inline long
31lmin(a, b)
32 long a, b;
33{
34 return (a < b ? a : b);
35}
36static inline u_int
37max(a, b)
38 u_int a, b;
39{
40 return (a > b ? a : b);
41}
42static inline u_int
43min(a, b)
44 u_int a, b;
45{
46 return (a < b ? a : b);
47}
48static inline u_long
49ulmax(a, b)
50 u_long a, b;
51{
52 return (a > b ? a : b);
53}
54static inline u_long
55ulmin(a, b)
56 u_long a, b;
57{
58 return (a < b ? a : b);
59}
1c247963 60
43220599 61/* Prototypes for non-quad routines. */
1c247963
KB
62int bcmp __P((const void *, const void *, size_t));
63int ffs __P((int));
5b3e4f73 64int locc __P((int, char *, u_int));
3272fbe6 65u_long random __P((void));
5b3e4f73
KB
66int scanc __P((u_int, u_char *, u_char *, int));
67int skpc __P((int, int, char *));
1c247963
KB
68char *strcat __P((char *, const char *));
69char *strcpy __P((char *, const char *));
70size_t strlen __P((const char *));
71char *strncpy __P((char *, const char *, size_t));