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