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 2.1 by greg, Tue Nov 12 16:05:29 1991 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1986 Regents of the University of California */
1 > /* Copyright (c) 1991 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 13 | Line 13 | static char SCCSid[] = "$SunId$ LBL";
13   #include  <stdio.h>
14  
15   #include  "color.h"
16 + #include  "resolu.h"
17  
18  
19   #define  NCOLS          133
# Line 34 | Line 35 | char  **argv;
35                  exit(1);
36          }
37          
37                                /* discard header */
38        getheader(input, NULL);
38                                  /* get picture dimensions */
39 <        if (fgetresolu(&xres, &yres, input) != (YMAJOR|YDECR)) {
40 <                fprintf(stderr, "%s: bad picture size\n", argv[0]);
39 >        if (checkheader(input, COLRFMT, NULL) < 0 ||
40 >                        fgetresolu(&xres, &yres, input) < 0) {
41 >                fprintf(stderr, "%s: bad picture format\n", argv[0]);
42                  exit(1);
43          }
44          if (xres > NCOLS) {
# Line 51 | Line 51 | char  **argv;
51                          fprintf(stderr, "%s: read error\n", argv[0]);
52                          exit(1);
53                  }
54 <                normcolrs(scanline, xres);
54 >                normcolrs(scanline, xres, 0);
55                  for (j = 0; j < xres; j++)
56                          putchar(shade(scanline[j]));
57                  putchar('\n');

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines