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.11 by greg, Mon Apr 7 15:43:08 2003 UTC vs.
Revision 2.14 by greg, Tue Dec 9 15:51:42 2003 UTC

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17  
18   #include  "color.h"
19  
20 + #ifdef getc_unlocked            /* avoid horrendous overhead of flockfile */
21 + #define getc    getc_unlocked
22 + #define putc    putc_unlocked
23 + #endif
24 +
25   #define  MINELEN        8       /* minimum scanline length for encoding */
26   #define  MAXELEN        0x7fff  /* maximum scanline length for encoding */
27   #define  MINRUN         4       /* minimum run length */
# Line 31 | Line 36 | unsigned int  len;
36  
37          if (len > tempbuflen) {
38                  if (tempbuflen > 0)
39 <                        tempbuf = (char *)realloc(tempbuf, len);
39 >                        tempbuf = (char *)realloc((void *)tempbuf, len);
40                  else
41                          tempbuf = (char *)malloc(len);
42                  tempbuflen = tempbuf==NULL ? 0 : len;
# Line 49 | Line 54 | register FILE  *fp;
54          register int  i, j, beg, cnt = 1;
55          int  c2;
56          
57 <        if (len < MINELEN | len > MAXELEN)      /* OOBs, write out flat */
57 >        if ((len < MINELEN) | (len > MAXELEN))  /* OOBs, write out flat */
58                  return(fwrite((char *)scanline,sizeof(COLR),len,fp) - len);
59                                          /* put magic header */
60          putc(2, fp);
# Line 139 | Line 144 | register FILE  *fp;
144          register int  i, j;
145          int  code, val;
146                                          /* determine scanline type */
147 <        if (len < MINELEN | len > MAXELEN)
147 >        if ((len < MINELEN) | (len > MAXELEN))
148                  return(oldreadcolrs(scanline, len, fp));
149          if ((i = getc(fp)) == EOF)
150                  return(-1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines