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

Comparing ray/src/px/ra_xyze.c (file contents):
Revision 2.6 by greg, Sat Feb 22 02:07:28 2003 UTC vs.
Revision 2.9 by schorsch, Sun Mar 28 20:33:14 2004 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include  <string.h>
11   #include  <math.h>
12   #include  <time.h>
13 +
14 + #include  "platform.h"
15   #include  "color.h"
16   #include  "resolu.h"
17  
16 #ifdef MSDOS
17 #include  <fcntl.h>
18 #endif
19
18   int  rgbinp = -1;                       /* input is RGBE? */
21
19   int  rgbout = 0;                        /* output should be RGBE? */
23
20   RGBPRIMS  inprims = STDPRIMS;           /* input primaries */
25
21   RGBPRIMS  outprims = STDPRIMS;          /* output primaries */
27
22   double  expcomp = 1.0;                  /* exposure compensation */
29
23   int  doflat = -1;                       /* produce flat file? */
31
24   char  *progname;
25  
26 + static gethfunc headline;
27 + static void quiterr(char *err);
28 + static void convert(void);
29  
30 < int
31 < headline(s)                             /* process header line */
32 < char    *s;
30 >
31 >
32 > static int
33 > headline(                               /* process header line */
34 >        char    *s,
35 >        void    *p
36 > )
37   {
38          char    fmt[32];
39  
# Line 56 | Line 55 | char   *s;
55   }
56  
57  
58 < main(argc, argv)
59 < int  argc;
61 < char  *argv[];
58 > int
59 > main(int  argc, char  *argv[])
60   {
61          int  i;
62 < #ifdef MSDOS
63 <        extern int  _fmode;
64 <        _fmode = O_BINARY;
67 <        setmode(fileno(stdin), O_BINARY);
68 <        setmode(fileno(stdout), O_BINARY);
69 < #endif
62 >        SET_DEFAULT_BINARY();
63 >        SET_FILE_BINARY(stdin);
64 >        SET_FILE_BINARY(stdout);
65          progname = argv[0];
66  
67          for (i = 1; i < argc; i++)
# Line 133 | Line 128 | userr:
128   }
129  
130  
131 < quiterr(err)            /* print message and exit */
132 < char  *err;
131 > static void
132 > quiterr(                /* print message and exit */
133 >        char  *err
134 > )
135   {
136          if (err != NULL) {
137                  fprintf(stderr, "%s: %s\n", progname, err);
# Line 144 | Line 141 | char  *err;
141   }
142  
143  
144 < convert()                               /* convert to XYZE or RGBE picture */
144 > static void
145 > convert(void)                           /* convert to XYZE or RGBE picture */
146   {
147          int     order;
148          int     xmax, ymax;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines