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.5 by greg, Wed Oct 27 09:37:37 1993 UTC vs.
Revision 2.9 by greg, Sat Feb 22 02:07:27 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1993 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  Convert Radiance file to/from AVS file.
6   */
# Line 13 | Line 10 | static char SCCSid[] = "$SunId$ LBL";
10   #ifdef MSDOS
11   #include  <fcntl.h>
12   #endif
13 + #include  <time.h>
14   #include  "color.h"
15   #include  "resolu.h"
16  
19 extern char  *malloc();
20
17   double  gamcor = 2.2;                   /* gamma correction */
18  
19   int  bradj = 0;                         /* brightness adjustment */
# Line 65 | Line 61 | char  *argv[];
61                  exit(1);
62          }
63          if (i == argc-2 && freopen(argv[i+1], "w", stdout) == NULL) {
64 <                fprintf(stderr, "can't open output \"%s\"\n",
64 >                fprintf(stderr, "%s: can't open output \"%s\"\n",
65                                  progname, argv[i+1]);
66                  exit(1);
67          }
# Line 78 | Line 74 | char  *argv[];
74                                          /* get their image resolution */
75                  xmax = getint(4, stdin);
76                  ymax = getint(4, stdin);
77 +                if (feof(stdin))
78 +                        quiterr("empty input file");
79                                          /* put our header */
80 +                newheader("RADIANCE", stdout);
81                  printargs(i, argv, stdout);
82                  fputformat(COLRFMT, stdout);
83                  putchar('\n');
# Line 143 | Line 142 | avs2ra()               /* convert 24-bit scanlines to Radiance pict
142                          quiterr("error writing Radiance picture");
143          }
144                                                  /* free scanline */
145 <        free((char *)scanout);
145 >        free((void *)scanout);
146   }
147  
148  
# Line 173 | Line 172 | ra2avs()               /* convert Radiance scanlines to 24-bit */
172                          quiterr("error writing AVS file");
173          }
174                                                  /* free scanline */
175 <        free((char *)scanin);
175 >        free((void *)scanin);
176   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines