--- ray/src/px/ra_t16.c 1989/09/12 13:04:36 1.4 +++ ray/src/px/ra_t16.c 1990/02/09 13:59:21 1.7 @@ -15,6 +15,8 @@ static char SCCSid[] = "$SunId$ LBL"; #include "color.h" +#include "random.h" + #include "targa.h" #define goodpic(h) (((h)->dataType==IM_RGB || (h)->dataType==IM_CRGB) \ @@ -91,7 +93,7 @@ char *argv[]; if (!goodpic(&head)) quiterr("incompatible format"); /* put header */ - printargs(argc, argv, stdout); + printargs(i, argv, stdout); putchar('\n'); fputresolu(YMAJOR|YDECR, head.x, head.y, stdout); /* convert file */ @@ -187,7 +189,7 @@ register FILE *fp; if (ip != NULL) if (nidbytes) - fread(ip, nidbytes, 1, fp); + fread((char *)ip, nidbytes, 1, fp); else *ip = '\0'; else if (nidbytes) @@ -329,7 +331,7 @@ unsigned char *d; FILE *fp; { if (h->dataType == IM_RGB) { /* uncompressed */ - if (fwrite(d, 3*h->x, h->y, fp) != h->y) + if (fwrite((char *)d, 3*h->x, h->y, fp) != h->y) quiterr("error writing targa file"); return; } @@ -365,7 +367,7 @@ FILE *fp; int r, g, b; if (h->dataType == IM_RGB) { /* uncompressed */ - if (fread(data, 3*h->x, h->y, fp) != h->y) + if (fread((char *)data, 3*h->x, h->y, fp) != h->y) goto readerr; return; }