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

Comparing ray/src/common/color.c (file contents):
Revision 2.1 by greg, Tue Nov 12 16:55:34 1991 UTC vs.
Revision 2.2 by greg, Tue Jun 23 10:59:34 1992 UTC

# Line 39 | Line 39 | unsigned  len;
39  
40   fwritecolrs(scanline, len, fp)          /* write out a colr scanline */
41   register COLR  *scanline;
42 < int  len;
42 > unsigned  len;
43   register FILE  *fp;
44   {
45          register int  i, j, beg, cnt;
46          int  c2;
47          
48 <        if (len < MINELEN)              /* too small to encode */
48 >        if (len < MINELEN | len > 0x7fff)       /* OOBs, write out flat */
49                  return(fwrite((char *)scanline,sizeof(COLR),len,fp) - len);
50 <        if (len > 32767)                /* too big! */
51 <                return(-1);
52 <        putc(2, fp);                    /* put magic header */
50 >                                        /* put magic header */
51 >        putc(2, fp);
52          putc(2, fp);
53          putc(len>>8, fp);
54          putc(len&255, fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines