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

Comparing ray/src/px/clrtab.c (file contents):
Revision 2.6 by greg, Wed May 5 10:18:05 1993 UTC vs.
Revision 2.7 by greg, Thu Jun 10 15:45:18 1993 UTC

# Line 238 | Line 238 | int    p;
238   register int    box[3][2];
239   {
240          unsigned long   sum[3];
241 <        unsigned        r, g, n;
241 >        unsigned        r, g;
242 >        unsigned long   n;
243          register unsigned       b, c;
244                                                  /* sum pixels in box */
245          n = 0;
# Line 254 | Line 255 | register int   box[3][2];
255                      }
256                      histo[r][g][b] = p;         /* assign pixel */
257                  }
258 <        if (n >= (1<<23)/HMAX) {                /* avoid overflow */
258 >        if (n >= (1L<<23)/HMAX) {               /* avoid overflow */
259                  sum[RED] /= n;
260                  sum[GRN] /= n;
261                  sum[BLU] /= n;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines