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.4 by greg, Fri Oct 2 15:59:58 1992 UTC vs.
Revision 2.5 by greg, Fri Feb 26 10:08:50 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 */
19   #define  MINRUN         4       /* minimum run length */
20  
21   #ifndef frexp
# Line 28 | Line 29 | unsigned  len;
29   {
30          extern char  *malloc(), *realloc();
31          static char  *tempbuf = NULL;
32 <        static int  tempbuflen = 0;
32 >        static unsigned  tempbuflen = 0;
33  
34          if (len > tempbuflen) {
35                  if (tempbuflen > 0)
# Line 49 | Line 50 | register FILE  *fp;
50          register int  i, j, beg, cnt;
51          int  c2;
52          
53 <        if (len < MINELEN | len > 0x7fff)       /* OOBs, write out flat */
53 >        if (len < MINELEN | len > MAXELEN)      /* OOBs, write out flat */
54                  return(fwrite((char *)scanline,sizeof(COLR),len,fp) - len);
55                                          /* put magic header */
56          putc(2, fp);
# Line 101 | Line 102 | register FILE  *fp;
102          register int  i, j;
103          int  code;
104                                          /* determine scanline type */
105 <        if (len < MINELEN | len > 0x7fff)
105 >        if (len < MINELEN | len > MAXELEN)
106                  return(oldreadcolrs(scanline, len, fp));
107          if ((i = getc(fp)) == EOF)
108                  return(-1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines