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

Comparing ray/src/px/aedimage.c (file contents):
Revision 1.9 by greg, Mon Mar 18 09:35:01 1991 UTC vs.
Revision 1.10 by greg, Thu Apr 18 14:35:03 1991 UTC

# Line 99 | Line 99 | long  scanpos[NROWS];
99  
100   extern double  atof();
101   double  exposure = 1.0;
102 + int  wrong_fmt = 0;
103  
104  
105   main(argc, argv)
# Line 140 | Line 141 | char  *argv[];
141                  quitmsg(errmsg);
142          }
143                                  /* get header */
144 <        getheader(fin, checkhead);
144 >        getheader(fin, checkhead, NULL);
145 >        if (wrong_fmt)
146 >                quitmsg("input must be a Radiance picture");
147                                  /* get picture dimensions */
148          if (fgetresolu(&xmax, &ymax, fin) != (YMAJOR|YDECR))
149                  quitmsg("bad picture size");
# Line 169 | Line 172 | userr:
172   checkhead(line)                         /* deal with line from header */
173   char  *line;
174   {
175 +        char    fmt[32];
176 +
177          if (isexpos(line))
178                  exposure *= exposval(line);
179 +        else if (isformat(line)) {
180 +                formatval(fmt, line);
181 +                wrong_fmt = strcmp(fmt, COLRFMT);
182 +        }
183   }
184  
185  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines