--- ray/src/px/ra_pict.c 1991/10/23 09:26:35 1.1 +++ ray/src/px/ra_pict.c 1991/11/11 14:01:55 1.4 @@ -1,6 +1,9 @@ +/* Copyright (c) 1991 Regents of the University of California */ + #ifndef lint -static char SCCSid[] = "$SunId$ AU"; +static char SCCSid[] = "$SunId$ LBL"; #endif + /* rad2pict - Convert an Radiance image to APPLE pict format. @@ -8,18 +11,18 @@ static char SCCSid[] = "$SunId$ AU"; Auckland, New Zealand */ #include -#include #include "pict.h" #include "color.h" +#include "resolu.h" +extern char *malloc(); + char cbuf[8192*5]; char pbuf[8192]; int outbytes; FILE *outf, *inf; char **gargv; -putpic(int, int); - putrect(xorg,yorg,xsize,ysize) int xorg, yorg, xsize, ysize; { @@ -104,7 +107,7 @@ char **argv; } if (checkheader(inf, COLRFMT, NULL) < 0 || - fgetresolu(&xsize, &ysize, inf) != (YMAJOR|YDECR)) { + fgetresolu(&xsize, &ysize, inf) < 0) { fprintf(stderr, "%s: not a radiance picture\n", argv[1]); exit(1); } @@ -193,7 +196,11 @@ int ysize; putbyte(0); } -int getrow(FILE *in, char *mybuff, int xsize) +int +getrow(in, mybuff, xsize) +FILE *in; +char *mybuff; +int xsize; { COLOR color; COLR *scanin = (COLR*) malloc(xsize * sizeof(COLR));