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.2 by greg, Wed Jun 2 09:41:28 1993 UTC

# Line 30 | Line 30 | main(argc, argv)
30   int  argc;
31   char  *argv[];
32   {
33 +        extern long  getint();
34          int  reverse = 0;
35          int  i;
36          
# Line 74 | Line 75 | char  *argv[];
75          setcolrgam(gamma);              /* set up gamma correction */
76          if (reverse) {
77                                          /* get their image resolution */
78 <                fread((char *)&xmax, sizeof(int), 1, stdin);
79 <                fread((char *)&ymax, sizeof(int), 1, stdin);
78 >                xmax = getint(4, stdin);
79 >                ymax = getint(4, stdin);
80                                          /* put our header */
81                  printargs(i, argv, stdout);
82                  fputformat(COLRFMT, stdout);
# Line 89 | Line 90 | char  *argv[];
90                                  fgetresolu(&xmax, &ymax, stdin) < 0)
91                          quiterr("bad picture format");
92                                          /* write their header */
93 <                fwrite((char *)&xmax, sizeof(int), 1, stdout);
94 <                fwrite((char *)&ymax, sizeof(int), 1, stdout);
93 >                putint((long)xmax, 4, stdout);
94 >                putint((long)ymax, 4, stdout);
95                                          /* convert file */
96                  ra2avs();
97          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines