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

Comparing ray/src/px/pfilt.c (file contents):
Revision 1.15 by greg, Fri Dec 14 16:33:16 1990 UTC vs.
Revision 1.16 by greg, Thu Apr 18 14:35:21 1991 UTC

# Line 53 | Line 53 | int  xres, yres;               /* resolution of input */
53   double  inpaspect = 1.0;        /* pixel aspect ratio of input */
54   int  correctaspect = 0;         /* aspect ratio correction? */
55  
56 + int  wrongformat = 0;
57 +
58   int  xrad;                      /* x window size */
59   int  yrad;                      /* y window size */
60  
# Line 227 | Line 229 | char  **argv;
229                  quit(1);
230          }
231                                          /* get header */
232 <        getheader(fin, headline);
232 >        getheader(fin, headline, NULL);
233 >        if (wrongformat) {
234 >                fprintf(stderr, "%s: input must be a Radiance picture\n",
235 >                                progname);
236 >                quit(1);
237 >        }
238                                          /* add new header info. */
239          printargs(i, argv, stdout);
240                                          /* get picture size */
# Line 273 | Line 280 | char  **argv;
280   headline(s)                             /* process line from header */
281   char  *s;
282   {
283 +        char  fmt[32];
284 +
285          fputs(s, stdout);               /* copy to output */
286          if (isaspect(s))                /* get aspect ratio */
287                  inpaspect *= aspectval(s);
288 +        else if (isformat(s)) {
289 +                formatval(fmt, s);
290 +                wrongformat = strcmp(fmt, COLRFMT);
291 +        }
292   }
293  
294  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines