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.5 by greg, Fri Feb 26 10:08:50 1993 UTC vs.
Revision 2.6 by greg, Tue Mar 2 09:09:51 1993 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15   #include  "color.h"
16  
17   #define  MINELEN        8       /* minimum scanline length for encoding */
18 < #define  MAXELEN        0x7ffe  /* maximum scanline length for encoding */
18 > #define  MAXELEN        0x7fff  /* maximum scanline length for encoding */
19   #define  MINRUN         4       /* minimum run length */
20  
21   #ifndef frexp
# Line 100 | Line 100 | int  len;
100   register FILE  *fp;
101   {
102          register int  i, j;
103 <        int  code;
103 >        int  code, val;
104                                          /* determine scanline type */
105          if (len < MINELEN | len > MAXELEN)
106                  return(oldreadcolrs(scanline, len, fp));
# Line 127 | Line 127 | register FILE  *fp;
127                  if ((code = getc(fp)) == EOF)
128                      return(-1);
129                  if (code > 128) {       /* run */
130 <                    scanline[j++][i] = getc(fp);
131 <                    for (code &= 127; --code; j++)
132 <                        scanline[j][i] = scanline[j-1][i];
130 >                    code &= 127;
131 >                    val = getc(fp);
132 >                    while (code--)
133 >                        scanline[j++][i] = val;
134                  } else                  /* non-run */
135                      while (code--)
136                          scanline[j++][i] = getc(fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines