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

Comparing ray/src/px/pinterp.c (file contents):
Revision 1.32 by greg, Mon Feb 11 18:10:56 1991 UTC vs.
Revision 1.33 by greg, Thu Apr 18 14:35:26 1991 UTC

# Line 57 | Line 57 | double ourexp = -1;                    /* output picture exposure */
57  
58   VIEW    theirview = STDVIEW;            /* input view */
59   int     gotview;                        /* got input view? */
60 + int     wrongformat = 0;                /* input in another format? */
61   int     thresolu, tvresolu;             /* input resolution */
62   double  theirexp;                       /* input picture exposure */
63   double  theirs2ours[4][4];              /* transformation matrix */
# Line 211 | Line 212 | char   *argv[];
212                  fputaspect(pixaspect, stdout);
213          if (ourexp > 0 && (ourexp < .995 || ourexp > 1.005))
214                  fputexpos(ourexp, stdout);
215 +        fputformat(COLRFMT, stdout);
216          putc('\n', stdout);
217                                                          /* write picture */
218          writepicture();
# Line 233 | Line 235 | char   *s;
235   {
236          static char     *altname[] = {VIEWSTR,"rpict","rview","pinterp",NULL};
237          register char   **an;
238 +        char    fmt[32];
239  
240 +        if (isformat(s)) {
241 +                formatval(fmt, s);
242 +                wrongformat = strcmp(fmt, COLRFMT);
243 +                return;
244 +        }
245          putc('\t', stdout);
246          fputs(s, stdout);
247  
# Line 270 | Line 278 | char   *pfile, *zspec;
278          theirexp = 1.0;
279          gotview = 0;
280          printf("%s:\n", pfile);
281 <        getheader(pfp, headline);
282 <        if (!gotview || fgetresolu(&thresolu, &tvresolu, pfp)
283 <                        != (YMAJOR|YDECR)) {
284 <                fprintf(stderr, "%s: picture view error\n", pfile);
281 >        getheader(pfp, headline, NULL);
282 >        if (wrongformat || !gotview ||
283 >                fgetresolu(&thresolu, &tvresolu, pfp) != (YMAJOR|YDECR)) {
284 >
285 >                fprintf(stderr, "%s: picture format error\n", pfile);
286                  exit(1);
287          }
288          if (ourexp <= 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines