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

Comparing ray/src/px/pvalue.c (file contents):
Revision 2.7 by greg, Tue Nov 9 15:21:00 1993 UTC vs.
Revision 2.8 by greg, Sun Feb 27 10:16:48 1994 UTC

# Line 199 | Line 199 | unkopt:
199                          setmode(fileno(fin), O_BINARY);
200   #endif
201                                          /* get header */
202 <                if (header && checkheader(fin, fmtid, stdout) < 0) {
203 <                        fprintf(stderr, "%s: wrong input format\n", progname);
204 <                        quit(1);
205 <                }
202 >                if (header) {
203 >                        if (checkheader(fin, fmtid, stdout) < 0) {
204 >                                fprintf(stderr, "%s: wrong input format\n",
205 >                                                progname);
206 >                                quit(1);
207 >                        }
208 >                } else
209 >                        newheader("RADIANCE", stdout);
210                                          /* get resolution */
211                  if ((resolution && !fgetsresolu(&picres, fin)) ||
212                                  picres.xr <= 0 || picres.yr <= 0) {
# Line 257 | Line 261 | char  *line;
261          double  d;
262          COLOR   ctmp;
263  
264 <        if (isformat(line)) {
261 <                formatval(fmt, line);
264 >        if (formatval(fmt, line))
265                  wrongformat = strcmp(fmt, COLRFMT);
266 <        } else if (original && isexpos(line)) {
266 >        else if (original && isexpos(line)) {
267                  d = 1.0/exposval(line);
268                  scalecolor(exposure, d);
269                  doexposure++;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines