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.10 by greg, Tue Jan 16 16:00:00 1990 UTC vs.
Revision 1.13 by greg, Fri Feb 23 10:08:33 1990 UTC

# Line 80 | Line 80 | int    ncolors;
80                                  /* partition color space */
81          cut(ctree, 0, CLRCUBE, 0, ncolors);
82                                  /* clear histogram */
83 <        bzero(histo, sizeof(histo));
83 >        bzero((char *)histo, sizeof(histo));
84                                  /* return number of colors used */
85          return(ncolors);
86   }
# Line 129 | Line 129 | int    (*set_pixel)();
129                  clrtab[h].ent[RED] = r;
130                  clrtab[h].ent[GRN] = g; /* reassign pixel */
131                  clrtab[h].ent[BLU] = b;
132 < #ifdef notdef
133 <                printf("pixel %d = (%d,%d,%d) (%d refs)\n",
132 > #ifdef DEBUG
133 >                sprintf(errmsg, "pixel %d = (%d,%d,%d) (%d refs)\n",
134                                  h, r, g, b, clrtab[h].n);
135 +                eputs(errmsg);
136   #endif
137                  (*set_pixel)(h, r, g, b);
138          }
# Line 155 | Line 156 | double  gam;
156   set_cmap(rmap, gmap, bmap)      /* set custom color correction map */
157   BYTE    *rmap, *gmap, *bmap;
158   {
159 <        bcopy(rmap, clrmap[RED], 256);
160 <        bcopy(gmap, clrmap[GRN], 256);
161 <        bcopy(bmap, clrmap[BLU], 256);
159 >        bcopy((char *)rmap, (char *)clrmap[RED], 256);
160 >        bcopy((char *)gmap, (char *)clrmap[GRN], 256);
161 >        bcopy((char *)bmap, (char *)clrmap[BLU], 256);
162   }
163  
164  
165 + map_color(rgb, col)             /* map a color to a byte triplet */
166 + BYTE    rgb[3];
167 + COLOR   col;
168 + {
169 +        rgb[RED] = map_col(col,RED);
170 +        rgb[GRN] = map_col(col,GRN);
171 +        rgb[BLU] = map_col(col,BLU);
172 + }
173 +
174 +
175   static
176   cut(tree, level, box, c0, c1)           /* partition color space */
177   register CNODE  *tree;
# Line 176 | Line 187 | int    c0, c1;
187          }
188                                          /* split box */
189          *tree = split(box);
190 <        bcopy(box, kb, sizeof(kb));
190 >        bcopy((char *)box, (char *)kb, sizeof(kb));
191                                                  /* do left (lesser) branch */
192          kb[prim(*tree)][1] = part(*tree);
193          cut(tree+(1<<level), level+1, kb, c0, (c0+c1)>>1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines