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

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

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include  <stdio.h>
9   #include  <math.h>
10 #ifdef MSDOS
11 #include  <fcntl.h>
12 #endif
10   #include  <time.h>
11 +
12 + #include  "platform.h"
13 + #include  "rtio.h"
14   #include  "color.h"
15   #include  "resolu.h"
16  
# Line 22 | Line 22 | char  *progname;
22  
23   int  xmax, ymax;
24  
25 + static void quiterr(char  *err);
26 + static void avs2ra(void);
27 + static void ra2avs(void);
28  
29 < main(argc, argv)
30 < int  argc;
31 < char  *argv[];
29 >
30 > int
31 > main(
32 >        int  argc,
33 >        char  *argv[]
34 > )
35   {
30        extern long  getint();
36          int  reverse = 0;
37          int  i;
38          
# Line 65 | Line 70 | char  *argv[];
70                                  progname, argv[i+1]);
71                  exit(1);
72          }
73 < #ifdef MSDOS
74 <        setmode(fileno(stdin), O_BINARY);
70 <        setmode(fileno(stdout), O_BINARY);
71 < #endif
73 >        SET_FILE_BINARY(stdin);
74 >        SET_FILE_BINARY(stdout);
75          setcolrgam(gamcor);             /* set up gamma correction */
76          if (reverse) {
77                                          /* get their image resolution */
# Line 104 | Line 107 | userr:
107   }
108  
109  
110 < quiterr(err)            /* print message and exit */
111 < char  *err;
110 > static void
111 > quiterr(                /* print message and exit */
112 >        char  *err
113 > )
114   {
115          if (err != NULL) {
116                  fprintf(stderr, "%s: %s\n", progname, err);
# Line 115 | Line 120 | char  *err;
120   }
121  
122  
123 < avs2ra()                /* convert 24-bit scanlines to Radiance picture */
123 > static void
124 > avs2ra(void)            /* convert 24-bit scanlines to Radiance picture */
125   {
126          COLR    *scanout;
127          register int    x;
# Line 146 | Line 152 | avs2ra()               /* convert 24-bit scanlines to Radiance pict
152   }
153  
154  
155 < ra2avs()                /* convert Radiance scanlines to 24-bit */
155 > static void
156 > ra2avs(void)            /* convert Radiance scanlines to 24-bit */
157   {
158          COLR    *scanin;
159          register int    x;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines