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.1 by greg, Tue Jun 1 17:36:55 1993 UTC vs.
Revision 2.3 by greg, Fri Jun 4 14:45:59 1993 UTC

# Line 9 | Line 9 | static char SCCSid[] = "$SunId$ LBL";
9   */
10  
11   #include  <stdio.h>
12 + #include  <math.h>
13   #ifdef MSDOS
14   #include  <fcntl.h>
15   #endif
# Line 30 | Line 31 | main(argc, argv)
31   int  argc;
32   char  *argv[];
33   {
34 +        extern long  getint();
35          int  reverse = 0;
36          int  i;
37          
# Line 74 | Line 76 | char  *argv[];
76          setcolrgam(gamma);              /* set up gamma correction */
77          if (reverse) {
78                                          /* get their image resolution */
79 <                fread((char *)&xmax, sizeof(int), 1, stdin);
80 <                fread((char *)&ymax, sizeof(int), 1, stdin);
79 >                xmax = getint(4, stdin);
80 >                ymax = getint(4, stdin);
81                                          /* put our header */
82                  printargs(i, argv, stdout);
83                  fputformat(COLRFMT, stdout);
# Line 89 | Line 91 | char  *argv[];
91                                  fgetresolu(&xmax, &ymax, stdin) < 0)
92                          quiterr("bad picture format");
93                                          /* write their header */
94 <                fwrite((char *)&xmax, sizeof(int), 1, stdout);
95 <                fwrite((char *)&ymax, sizeof(int), 1, stdout);
94 >                putint((long)xmax, 4, stdout);
95 >                putint((long)ymax, 4, stdout);
96                                          /* convert file */
97                  ra2avs();
98          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines