ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/colortab.c
(Generate patch)

Comparing ray/src/rt/colortab.c (file contents):
Revision 2.7 by greg, Tue May 13 17:58:33 2003 UTC vs.
Revision 2.8 by schorsch, Mon Jun 30 14:59:12 2003 UTC

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17  
18   #include "copyright.h"
19  
20 < #include "standard.h"
20 > #include <string.h>
21  
22 + #include "standard.h"
23   #include "color.h"
24 +
25                                  /* histogram resolution */
26   #define NRED            24
27   #define NGRN            32
# Line 84 | Line 86 | int    ncolors;
86                                  /* partition color space */
87          cut(ctree, 0, CLRCUBE, 0, ncolors);
88                                  /* clear histogram */
89 <        bzero((void *)histo, sizeof(histo));
89 >        memset((void *)histo, '\0', sizeof(histo));
90                                  /* return number of colors used */
91          return(ncolors);
92   }
# Line 161 | Line 163 | void
163   set_cmap(rmap, gmap, bmap)      /* set custom color correction map */
164   BYTE    *rmap, *gmap, *bmap;
165   {
166 <        bcopy((void *)rmap, (void *)clrmap[RED], 256);
167 <        bcopy((void *)gmap, (void *)clrmap[GRN], 256);
168 <        bcopy((void *)bmap, (void *)clrmap[BLU], 256);
166 >        memcpy((void *)clrmap[RED], (void *)rmap, 256);
167 >        memcpy((void *)clrmap[GRN], (void *)gmap, 256);
168 >        memcpy((void *)clrmap[BLU], (void *)bmap, 256);
169   }
170  
171  
# Line 193 | Line 195 | int    c0, c1;
195          }
196                                          /* split box */
197          *tree = split(box);
198 <        bcopy((void *)box, (void *)kb, sizeof(kb));
198 >        memcpy((void *)kb, (void *)box, sizeof(kb));
199                                                  /* do left (lesser) branch */
200          kb[prim(*tree)][1] = part(*tree);
201          cut(tree+(1<<level), level+1, kb, c0, (c0+c1)>>1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines