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

Comparing ray/src/px/ra_rgbe.c (file contents):
Revision 2.8 by gregl, Fri Jan 23 11:38:39 1998 UTC vs.
Revision 2.12 by schorsch, Thu Jun 5 19:29:34 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1992 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  program to convert from RADIANCE RLE to flat format
6   */
7  
8   #include  <stdio.h>
9   #include  <math.h>
10 + #include  <time.h>
11 +
12 + #include  "platform.h"
13   #include  "color.h"
14   #include  "resolu.h"
15  
16 #ifdef MSDOS
17 #include  <fcntl.h>
18 #endif
19
20 extern char     *malloc(), *realloc(), *tempbuffer();
16   extern int      addhline();
17  
18   #define dumpheader(fp)  fwrite(headlines, 1, headlen, fp)
# Line 80 | Line 75 | gotfile:
75                                  progname, argv[i]);
76                  exit(1);
77          }
78 < #ifdef MSDOS
84 <        setmode(fileno(stdin), O_BINARY);
85 < #endif
78 >        SET_FILE_BINARY(stdin);
79          ospec = i==argc-2 ? argv[i+1] : (char *)NULL;
80          while (transfer(ospec))
81                  ;
# Line 157 | Line 150 | char   *ospec;
150                          }
151                  }
152          }
153 < #ifdef MSDOS
161 <        setmode(fileno(fp), O_BINARY);
162 < #endif
153 >        SET_FILE_BINARY(fp);
154          dumpheader(fp);                 /* put out header */
155          fputs(progname, fp);
156          if (bradj)
# Line 199 | Line 190 | char   *ospec;
190   }
191  
192  
193 + int
194   addhline(s)                     /* add a line to our info. header */
195   char    *s;
196   {
# Line 211 | Line 203 | char   *s;
203                  frameno = atoi(s+6);
204          n = strlen(s);
205          if (headlen)
206 <                headlines = (char *)realloc(headlines, headlen+n+1);
206 >                headlines = (char *)realloc((void *)headlines, headlen+n+1);
207          else
208                  headlines = (char *)malloc(n+1);
209          if (headlines == NULL) {
# Line 220 | Line 212 | char   *s;
212          }
213          strcpy(headlines+headlen, s);
214          headlen += n;
215 +        return(0);
216   }
217  
218  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines