1 |
/* Copyright (c) 1988 Regents of the University of California */ |
2 |
|
3 |
#ifndef lint |
4 |
static char SCCSid[] = "$SunId$ LBL"; |
5 |
#endif |
6 |
|
7 |
/* |
8 |
* bcopy.c - substitutes for library routines. |
9 |
* |
10 |
* 5/24/88 |
11 |
*/ |
12 |
|
13 |
|
14 |
bcopy(src, dest, nbytes) |
15 |
register char *src, *dest; |
16 |
register int nbytes; |
17 |
{ |
18 |
while (nbytes-- > 0) |
19 |
*dest++ = *src++; |
20 |
} |
21 |
|
22 |
|
23 |
bzero(b, nbytes) |
24 |
register char *b; |
25 |
register int nbytes; |
26 |
{ |
27 |
while (nbytes-- > 0) |
28 |
*b++ = 0; |
29 |
} |
30 |
|
31 |
|
32 |
int |
33 |
bcmp(b1, b2, nbytes) |
34 |
register unsigned char *b1, *b2; |
35 |
register int nbytes; |
36 |
{ |
37 |
while (nbytes-- > 0) |
38 |
if (*b1++ - *b2++) |
39 |
return(*--b1 - *--b2); |
40 |
return(0); |
41 |
} |