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

Comparing ray/src/px/ra_pr.c (file contents):
Revision 1.4 by greg, Fri Oct 20 20:36:04 1989 UTC vs.
Revision 1.5 by greg, Thu Jan 18 23:58:19 1990 UTC

# Line 102 | Line 102 | char  *argv[];
102                          quiterr(errmsg);
103                  }
104                                          /* get header */
105 <                if (fread(&head, sizeof(head), 1, stdin) != 1)
105 >                if (fread((char *)&head, sizeof(head), 1, stdin) != 1)
106                          quiterr("missing header");
107                  if (head.ras_magic != RAS_MAGIC)
108                          quiterr("bad raster format");
# Line 223 | Line 223 | register struct rasterfile  *h;
223          else if ((p->fp = fopen(fname, "w")) == NULL)
224                  return(NULL);
225                                          /* write header */
226 <        fwrite(h, sizeof(*h), 1, p->fp);
226 >        fwrite((char *)h, sizeof(*h), 1, p->fp);
227          p->nexty = -1;                  /* needs color map */
228          p->bytes_line = h->ras_width;
229          p->pos.b = 0;
# Line 243 | Line 243 | struct rasterfile  *h;
243          scanline = (COLR *)emalloc(xmax*sizeof(COLR));
244                                          /* get color table */
245          for (i = 0; i < 3; i ++)
246 <                if (fread(cmap[i], h->ras_maplength/3, 1, stdin) != 1)
246 >                if (fread((char *)cmap[i], h->ras_maplength/3, 1, stdin) != 1)
247                          quiterr("error reading color table");
248                                          /* convert table */
249          for (i = 0; i < h->ras_maplength/3; i++)
# Line 314 | Line 314 | register pixel  *l;
314                          quiterr("seek error in picwriteline");
315          }
316                                                  /* write scanline */
317 <        if (fwrite(l, sizeof(pixel), xmax, outpic->fp) != xmax)
317 >        if (fwrite((char *)l, sizeof(pixel), xmax, outpic->fp) != xmax)
318                  quiterr("write error in picwriteline");
319          if (xmax&1)                             /* on 16-bit boundary */
320                  putc(l[xmax-1], outpic->fp);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines