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.3 by greg, Fri Oct 20 20:36:06 1989 UTC vs.
Revision 1.4 by greg, Thu Jan 18 23:58:24 1990 UTC

# Line 19 | Line 19 | static char SCCSid[] = "$SunId$ LBL";
19  
20   #include  "targa.h"
21  
22 + #ifndef  BSD
23 + #define  bcopy(s,d,n)           (void)memcpy(d,s,n)
24 + extern char  *memcpy();
25 + #endif
26                          /* descriptor for a picture file or frame buffer */
27   typedef struct {
28          char    *name;                  /* file name */
# Line 227 | Line 231 | register FILE  *fp;
231  
232          if (ip != NULL)
233                  if (nidbytes)
234 <                        fread(ip, nidbytes, 1, fp);
234 >                        fread((char *)ip, nidbytes, 1, fp);
235                  else
236                          *ip = '\0';
237          else if (nidbytes)
# Line 320 | Line 324 | struct hdStruct  *hp;
324          register int  i, j;
325  
326                                          /* get color table */
327 <        if ((hp->CMapBits==24 ? fread(map.c3, sizeof(map.c3), 1, stdin) :
328 <                        fread(map.c4, sizeof(map.c4), 1, stdin)) != 1)
327 >        if ((hp->CMapBits==24 ? fread((char *)map.c3,sizeof(map.c3),1,stdin) :
328 >                        fread((char *)map.c4,sizeof(map.c4),1,stdin)) != 1)
329                  quiterr("error reading color table");
330                                          /* convert table */
331          for (i = hp->mapOrig; i < hp->mapOrig+hp->mapLength; i++)
# Line 391 | Line 395 | picwriteline(y, l)                     /* save output scanline */
395   int  y;
396   pixel  *l;
397   {
398 <        bcopy(l, &tarData[(ymax-1-y)*xmax], xmax*sizeof(pixel));
398 >        bcopy((char *)l, (char *)&tarData[(ymax-1-y)*xmax], xmax*sizeof(pixel));
399   }
400  
401  
# Line 401 | Line 405 | pixel  *d;
405   FILE  *fp;
406   {
407          if (h->dataType == IM_CMAP) {           /* uncompressed */
408 <                if (fwrite(d, h->x*sizeof(pixel), h->y, fp) != h->y)
408 >                if (fwrite((char *)d,h->x*sizeof(pixel),h->y,fp) != h->y)
409                          quiterr("error writing targa file");
410                  return;
411          }
# Line 418 | Line 422 | FILE  *fp;
422          register pixel  *dp;
423  
424          if (h->dataType == IM_CMAP) {           /* uncompressed */
425 <                if (fread(data, h->x*sizeof(pixel), h->y, fp) != h->y)
425 >                if (fread((char *)data,h->x*sizeof(pixel),h->y,fp) != h->y)
426                          goto readerr;
427                  return;
428          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines