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

Comparing ray/src/px/ttyimage.c (file contents):
Revision 1.5 by greg, Thu Jan 25 08:28:36 1990 UTC vs.
Revision 1.7 by greg, Thu Apr 18 14:35:47 1991 UTC

# Line 34 | Line 34 | char  **argv;
34                  exit(1);
35          }
36          
37                                /* discard header */
38        getheader(input, NULL);
37                                  /* get picture dimensions */
38 <        if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) {
39 <                fprintf(stderr, "%s: bad picture size\n", argv[0]);
38 >        if (checkheader(input, COLRFMT, NULL) < 0 ||
39 >                        fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) {
40 >                fprintf(stderr, "%s: bad picture format\n", argv[0]);
41                  exit(1);
42          }
43          if (xres > NCOLS) {
# Line 51 | Line 50 | char  **argv;
50                          fprintf(stderr, "%s: read error\n", argv[0]);
51                          exit(1);
52                  }
53 <                normcolrs(scanline, xres);
53 >                normcolrs(scanline, xres, 0);
54                  for (j = 0; j < xres; j++)
55                          putchar(shade(scanline[j]));
56                  putchar('\n');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines