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

Comparing ray/src/px/ra_t8.c (file contents):
Revision 1.11 by greg, Fri Aug 23 13:40:01 1991 UTC vs.
Revision 1.12 by greg, Mon Nov 11 14:01:53 1991 UTC

# Line 15 | Line 15 | static char SCCSid[] = "$SunId$ LBL";
15  
16   #include  "color.h"
17  
18 + #include  "resolu.h"
19 +
20   #include  "pic.h"
21  
22   #include  "targa.h"
# Line 134 | Line 136 | char  *argv[];
136                  printargs(i, argv, stdout);
137                  fputformat(COLRFMT, stdout);
138                  putchar('\n');
139 <                fputresolu(YMAJOR|YDECR, xmax, ymax, stdout);
139 >                fprtresolu(xmax, ymax, stdout);
140                                          /* convert file */
141                  tg2ra(&head);
142          } else {
# Line 292 | Line 294 | register struct hdStruct  *h;
294                  return(NULL);
295                                          /* get header info. */
296          if (checkheader(p->fp, COLRFMT, NULL) < 0 ||
297 <                        fgetresolu(&xmax, &ymax, p->fp) != (YMAJOR|YDECR))
297 >                        fgetresolu(&xmax, &ymax, p->fp) < 0)
298                  quiterr("bad picture format");
299          p->nexty = 0;
300          p->bytes_line = 0;              /* variable length lines */
# Line 332 | Line 334 | struct hdStruct  *hp;
334          register int  i, j;
335  
336                                          /* get color table */
337 <        if ((hp->CMapBits==24 ? fread((char *)map.c3,sizeof(map.c3),1,stdin) :
338 <                        fread((char *)map.c4,sizeof(map.c4),1,stdin)) != 1)
337 >        if ((hp->CMapBits==24 ? fread((char *)(map.c3+hp->mapOrig),
338 >                                3*hp->mapLength,1,stdin) :
339 >                        fread((char *)(map.c4+hp->mapOrig),
340 >                                4*hp->mapLength,1,stdin)) != 1)
341                  quiterr("error reading color table");
342                                          /* convert table */
343          for (i = hp->mapOrig; i < hp->mapOrig+hp->mapLength; i++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines