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.16 by schorsch, Fri Jan 2 12:47:01 2004 UTC vs.
Revision 2.20 by greg, Thu Aug 2 18:33:47 2018 UTC

# Line 11 | Line 11 | static const char      RCSid[] = "$Id$";
11   #include  <string.h>
12  
13   #include  "platform.h"
14 < #include  "rtprocess.h"
14 > #include  "rtio.h"
15 > #include  "paths.h"
16   #include  "color.h"
17   #include  "resolu.h"
18  
19 < #define dumpheader(fp)  fwrite(headlines, 1, headlen, fp)
19 > #define dumpheader(fp)  putbinary(headlines, 1, headlen, fp)
20  
21   int  bradj = 0;                         /* brightness adjustment */
21
22   int  doflat = 1;                        /* produce flat file */
23
23   int  force = 0;                         /* force file overwrite? */
25
24   int  findframe = 0;                     /* find a specific frame? */
27
25   int  frameno = 0;                       /* current frame number */
26   int  fmterr = 0;                        /* got input format error */
27   char  *headlines;                       /* current header info. */
# Line 33 | Line 30 | int  headlen;                          /* current header length */
30   char  *progname;
31  
32   static gethfunc addhline;
33 + static int transfer(char *ospec);
34 + static int loadheader(FILE *fp);
35  
36  
37 < main(argc, argv)
38 < int  argc;
40 < char  *argv[];
37 > int
38 > main(int  argc, char  *argv[])
39   {
40          char    *ospec;
41          int  i;
# Line 90 | Line 88 | userr:
88   }
89  
90  
91 < transfer(ospec)                 /* transfer a Radiance picture */
92 < char    *ospec;
91 > static int
92 > transfer(                       /* transfer a Radiance picture */
93 >        char    *ospec
94 > )
95   {
96          char    oname[PATH_MAX];
97          FILE    *fp;
# Line 174 | Line 174 | char   *ospec;
174                  if (bradj)
175                          shiftcolrs(scanin, xmax, bradj);
176                  if (doflat)
177 <                        fwrite((char *)scanin, sizeof(COLR), xmax, fp);
177 >                        putbinary((char *)scanin, sizeof(COLR), xmax, fp);
178                  else
179                          fwritecolrs(scanin, xmax, fp);
180                  if (ferror(fp)) {
# Line 198 | Line 198 | addhline(                      /* add a line to our info. header */
198          void    *p
199   )
200   {
201 <        char    fmt[32];
201 >        char    fmt[MAXFMTLEN];
202          int     n;
203  
204          if (formatval(fmt, s))
# Line 220 | Line 220 | addhline(                      /* add a line to our info. header */
220   }
221  
222  
223 < loadheader(fp)                  /* load an info. header into memory */
224 < FILE    *fp;
223 > static int
224 > loadheader(                     /* load an info. header into memory */
225 >        FILE    *fp
226 > )
227   {
228          fmterr = 0; frameno = 0;
229          if (headlen) {                  /* free old header */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines