ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/bcopy.c
Revision: 1.4
Committed: Tue May 13 17:58:32 2003 UTC (20 years, 11 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

File Contents

# Content
1 #ifndef lint
2 static const char RCSid[] = "$Id$";
3 #endif
4 /*
5 * bcopy.c - substitutes for library routines.
6 */
7
8 #include "copyright.h"
9
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 }