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 1.5 by greg, Tue Oct 3 16:15:52 1989 UTC vs.
Revision 1.6 by greg, Wed Oct 4 09:23:38 1989 UTC

# Line 42 | Line 42 | static char SCCSid[] = "$SunId$ LBL";
42   #define prim(cn)        ((cn)&3)
43   #define pval(cn)        ((cn)>>2)
44                                  /* our color table */
45 < struct tabent {
45 > static struct tabent {
46          long    sum[3];         /* sum of colors using this entry */
47          long    n;              /* number of colors */
48          short   ent[3];         /* current table value */
# Line 61 | Line 61 | int
61   new_ctab(ncolors)               /* start new color table with max ncolors */
62   int     ncolors;
63   {
64 <        if (ncolors < 1 || ncolors > 1<<FBDEPTH)
64 >        if (ncolors < 1)
65                  return(0);
66 +        if (ncolors > 1<<FBDEPTH)
67 +                ncolors = 1<<FBDEPTH;
68                                  /* clear color table */
69          bzero(clrtab, sizeof(clrtab));
70                                  /* partition color space */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines