--- ray/src/px/pcomb.c 2003/06/05 19:29:34 2.23 +++ ray/src/px/pcomb.c 2004/03/15 21:16:54 2.31 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pcomb.c,v 2.23 2003/06/05 19:29:34 schorsch Exp $"; +static const char RCSid[] = "$Id: pcomb.c,v 2.31 2004/03/15 21:16:54 greg Exp $"; #endif /* * Combine picture files according to calcomp functions. @@ -7,7 +7,9 @@ static const char RCSid[] = "$Id: pcomb.c,v 2.23 2003/ * 1/4/89 */ -#include "standard.h" +#include "platform.h" +#include "rtprocess.h" +#include "rterror.h" #include "color.h" #include "calcomp.h" #include "view.h" @@ -31,6 +33,7 @@ int nfiles; /* number of input files */ char ourfmt[LPICFMT+1] = PICFMT; /* input picture format */ +char StandardInput[] = ""; char Command[] = ""; char vcolin[3][4] = {"ri", "gi", "bi"}; char vcolout[3][4] = {"ro", "go", "bo"}; @@ -68,10 +71,10 @@ char *progname; /* global argv[0] */ int wrongformat = 0; int gotview; -FILE *popen(); extern char *emalloc(); +static gethfunc tabputs; main(argc, argv) int argc; @@ -108,7 +111,7 @@ char *argv[]; for (nfiles = 0; nfiles < MAXINP; nfiles++) { setcolor(input[nfiles].coef, 1.0, 1.0, 1.0); setcolor(input[nfiles].expos, 1.0, 1.0, 1.0); - copystruct(&input[nfiles].vw, &stdview); + input[nfiles].vw = stdview; input[nfiles].pa = 1.0; } nfiles = 0; @@ -122,7 +125,7 @@ char *argv[]; if (argv[a][0] == '-') switch (argv[a][1]) { case '\0': - input[nfiles].name = ""; + input[nfiles].name = StandardInput; input[nfiles].fp = stdin; break; case 'o': @@ -218,8 +221,11 @@ usage: } -tabputs(s) /* put out string preceded by a tab */ -char *s; +static int +tabputs( /* put out string preceded by a tab */ + char *s, + void *p +) { char fmt[32]; double d; @@ -311,7 +317,8 @@ double (*ourbright)() = rgb_bright; init() /* perform final setup */ { - double l_colin(), l_expos(), l_pixaspect(), l_ray(), l_psize(); + double l_colin(char *), l_expos(char *), l_pixaspect(char *), + l_ray(char *), l_psize(char *); register int i; /* define constants */ varset("PI", ':', PI); @@ -445,7 +452,7 @@ register char *nam; double -l_pixaspect() /* return pixel aspect ratio */ +l_pixaspect(char *nm) /* return pixel aspect ratio */ { register int fn; @@ -517,7 +524,7 @@ register char *nam; static unsigned long ltick[MAXINP]; static FVECT lorg[MAXINP], ldir[MAXINP]; static double ldist[MAXINP]; - FLOAT loc[2]; + RREAL loc[2]; int fn; register int i; @@ -550,12 +557,12 @@ register char *nam; double -l_psize() /* compute pixel size in steradians */ +l_psize(char *nm) /* compute pixel size in steradians */ { static unsigned long ltick[MAXINP]; static double psize[MAXINP]; FVECT dir0, org, dirx, diry; - FLOAT locx[2], locy[2]; + RREAL locx[2], locy[2]; double d; int fn; register int i; @@ -595,26 +602,23 @@ l_psize() /* compute pixel size in steradians */ } -void -wputs(msg) -char *msg; +extern void +wputs(char *msg) { if (!nowarn) eputs(msg); } -void -eputs(msg) -char *msg; +extern void +eputs(char *msg) { fputs(msg, stderr); } -void -quit(code) /* exit gracefully */ -int code; +extern void +quit(int code) /* exit gracefully */ { register int i; /* close input files */