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.11 by greg, Wed Apr 23 00:52:34 2003 UTC vs.
Revision 2.16 by schorsch, Fri Jan 2 12:47:01 2004 UTC

# Line 8 | Line 8 | static const char      RCSid[] = "$Id$";
8   #include  <stdio.h>
9   #include  <math.h>
10   #include  <time.h>
11 + #include  <string.h>
12 +
13 + #include  "platform.h"
14 + #include  "rtprocess.h"
15   #include  "color.h"
16   #include  "resolu.h"
17  
14 #ifdef MSDOS
15 #include  <fcntl.h>
16 #endif
17
18 extern int      addhline();
19
18   #define dumpheader(fp)  fwrite(headlines, 1, headlen, fp)
19  
20   int  bradj = 0;                         /* brightness adjustment */
# Line 34 | Line 32 | int  headlen;                          /* current header length */
32  
33   char  *progname;
34  
35 + static gethfunc addhline;
36  
37 +
38   main(argc, argv)
39   int  argc;
40   char  *argv[];
# Line 77 | Line 77 | gotfile:
77                                  progname, argv[i]);
78                  exit(1);
79          }
80 < #ifdef MSDOS
81 <        setmode(fileno(stdin), O_BINARY);
82 < #endif
80 >        SET_FILE_BINARY(stdin);
81          ospec = i==argc-2 ? argv[i+1] : (char *)NULL;
82          while (transfer(ospec))
83                  ;
# Line 95 | Line 93 | userr:
93   transfer(ospec)                 /* transfer a Radiance picture */
94   char    *ospec;
95   {
96 <        char    oname[128];
96 >        char    oname[PATH_MAX];
97          FILE    *fp;
98          int     order;
99          int     xmax, ymax;
# Line 154 | Line 152 | char   *ospec;
152                          }
153                  }
154          }
155 < #ifdef MSDOS
158 <        setmode(fileno(fp), O_BINARY);
159 < #endif
155 >        SET_FILE_BINARY(fp);
156          dumpheader(fp);                 /* put out header */
157          fputs(progname, fp);
158          if (bradj)
# Line 196 | Line 192 | char   *ospec;
192   }
193  
194  
195 < int
196 < addhline(s)                     /* add a line to our info. header */
197 < char    *s;
195 > static int
196 > addhline(                       /* add a line to our info. header */
197 >        char    *s,
198 >        void    *p
199 > )
200   {
201          char    fmt[32];
202          int     n;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines