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

Comparing ray/src/px/protate.c (file contents):
Revision 1.7 by greg, Tue Dec 4 11:25:46 1990 UTC vs.
Revision 1.8 by greg, Thu Apr 18 14:42:06 1991 UTC

# Line 20 | Line 20 | char   buf[1<<20];                     /* output buffer */
20  
21   int     nrows;                          /* number of rows output at once */
22  
23 + int     wrongformat = 0;
24 +
25   #define scanbar         ((COLR *)buf)
26  
27   char    *progname;
# Line 28 | Line 30 | char   *progname;
30   headline(s)                             /* process line from header */
31   char    *s;
32   {
33 +        char    fmt[32];
34 +
35          fputs(s, stdout);
36          if (isaspect(s))
37                  inpaspect *= aspectval(s);
38 +        else if (isformat(s)) {
39 +                formatval(fmt, s);
40 +                wrongformat = strcmp(fmt, COLRFMT);
41 +        }
42   }
43  
44  
# Line 55 | Line 63 | char   *argv[];
63                  exit(1);
64          }
65                                          /* transfer header */
66 <        getheader(fin, headline);
66 >        getheader(fin, headline, NULL);
67 >        if (wrongformat) {
68 >                fprintf(stderr, "%s: wrong picture format\n", progname);
69 >                exit(1);
70 >        }
71                                          /* add new header info. */
72          if (inpaspect < .99 || inpaspect > 1.01)
73                  fputaspect(1./inpaspect/inpaspect, stdout);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines