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

Comparing ray/src/hd/rhd_ctab.c (file contents):
Revision 3.1 by gregl, Wed Nov 19 18:01:03 1997 UTC vs.
Revision 3.4 by schorsch, Mon Jun 30 14:59:11 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1997 Silicon Graphics, Inc. */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ SGI";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Allocate and control dynamic color table.
6   *
# Line 19 | Line 16 | static char SCCSid[] = "$SunId$ SGI";
16   *      except there is no color mapping, since the tm library is used.
17   */
18  
19 + #include <string.h>
20 +
21   #include "standard.h"
22   #include "color.h"
23                                  /* histogram resolution */
# Line 65 | Line 64 | int    ncolors;
64                  return(0);
65                                  /* free old tables */
66          if (clrtab != NULL)
67 <                free((char *)clrtab);
67 >                free((void *)clrtab);
68          if (ctree != NULL)
69 <                free((char *)ctree);
69 >                free((void *)ctree);
70                                  /* get new tables */
71          for (treesize = 1; treesize < ncolors; treesize <<= 1)
72                  ;
# Line 79 | Line 78 | int    ncolors;
78                                  /* partition color space */
79          cut(ctree, 0, CLRCUBE, 0, ncolors);
80                                  /* clear histogram */
81 <        bzero((char *)histo, sizeof(histo));
81 >        memset((void *)histo, '\0', sizeof(histo));
82                                  /* return number of colors used */
83          return(ncolors);
84   }
# Line 155 | Line 154 | int    c0, c1;
154          }
155                                          /* split box */
156          *tree = split(box);
157 <        bcopy((char *)box, (char *)kb, sizeof(kb));
157 >        memcpy((void *)kb, (void *)box, sizeof(kb));
158                                                  /* do left (lesser) branch */
159          kb[prim(*tree)][1] = part(*tree);
160          cut(tree+(1<<level), level+1, kb, c0, (c0+c1)>>1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines