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.9 by gwlarson, Tue Oct 27 09:08:27 1998 UTC vs.
Revision 2.13 by schorsch, Thu Jul 3 22:41:44 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 + #include  <string.h>
12 +
13 + #include  "platform.h"
14   #include  "color.h"
15   #include  "resolu.h"
16  
16 #ifdef MSDOS
17 #include  <fcntl.h>
18 #endif
19
20 extern char     *malloc(), *realloc(), *tempbuffer();
17   extern int      addhline();
18  
19   #define dumpheader(fp)  fwrite(headlines, 1, headlen, fp)
# Line 80 | Line 76 | gotfile:
76                                  progname, argv[i]);
77                  exit(1);
78          }
79 < #ifdef MSDOS
84 <        setmode(fileno(stdin), O_BINARY);
85 < #endif
79 >        SET_FILE_BINARY(stdin);
80          ospec = i==argc-2 ? argv[i+1] : (char *)NULL;
81          while (transfer(ospec))
82                  ;
# Line 157 | Line 151 | char   *ospec;
151                          }
152                  }
153          }
154 < #ifdef MSDOS
161 <        setmode(fileno(fp), O_BINARY);
162 < #endif
154 >        SET_FILE_BINARY(fp);
155          dumpheader(fp);                 /* put out header */
156          fputs(progname, fp);
157          if (bradj)
# Line 212 | Line 204 | char   *s;
204                  frameno = atoi(s+6);
205          n = strlen(s);
206          if (headlen)
207 <                headlines = (char *)realloc(headlines, headlen+n+1);
207 >                headlines = (char *)realloc((void *)headlines, headlen+n+1);
208          else
209                  headlines = (char *)malloc(n+1);
210          if (headlines == NULL) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines