| Revision: | 1.4 |
| Committed: | Tue May 13 17:58:32 2003 UTC (22 years, 5 months ago) by greg |
| Content type: | text/plain |
| Branch: | MAIN |
| Changes since 1.3: | +0 -0 lines |
| Log Message: | Changed (char *) casts for memory copies to (void *) and other fixes |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | greg | 1.1 | #ifndef lint |
| 2 | greg | 1.2 | static const char RCSid[] = "$Id$"; |
| 3 | greg | 1.1 | #endif |
| 4 | /* | ||
| 5 | * bcopy.c - substitutes for library routines. | ||
| 6 | greg | 1.2 | */ |
| 7 | |||
| 8 | greg | 1.3 | #include "copyright.h" |
| 9 | greg | 1.1 | |
| 10 | |||
| 11 | bcopy(src, dest, nbytes) | ||
| 12 | register char *src, *dest; | ||
| 13 | register int nbytes; | ||
| 14 | { | ||
| 15 | while (nbytes-- > 0) | ||
| 16 | *dest++ = *src++; | ||
| 17 | } | ||
| 18 | |||
| 19 | |||
| 20 | bzero(b, nbytes) | ||
| 21 | register char *b; | ||
| 22 | register int nbytes; | ||
| 23 | { | ||
| 24 | while (nbytes-- > 0) | ||
| 25 | *b++ = 0; | ||
| 26 | } | ||
| 27 | |||
| 28 | |||
| 29 | int | ||
| 30 | bcmp(b1, b2, nbytes) | ||
| 31 | register unsigned char *b1, *b2; | ||
| 32 | register int nbytes; | ||
| 33 | { | ||
| 34 | while (nbytes-- > 0) | ||
| 35 | if (*b1++ - *b2++) | ||
| 36 | return(*--b1 - *--b2); | ||
| 37 | return(0); | ||
| 38 | } |