--- ray/src/px/pcomb.c 2003/02/22 02:07:27 2.22 +++ ray/src/px/pcomb.c 2003/08/04 22:37:53 2.27 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pcomb.c,v 2.22 2003/02/22 02:07:27 greg Exp $"; +static const char RCSid[] = "$Id: pcomb.c,v 2.27 2003/08/04 22:37:53 greg Exp $"; #endif /* * Combine picture files according to calcomp functions. @@ -8,11 +8,9 @@ static const char RCSid[] = "$Id: pcomb.c,v 2.22 2003/ */ #include "standard.h" - +#include "platform.h" #include "color.h" - #include "calcomp.h" - #include "view.h" #define MAXINP 32 /* maximum number of input files */ @@ -83,12 +81,9 @@ char *argv[]; int original; double f; int a, i; -#ifdef MSDOS - extern int _fmode; - _fmode = O_BINARY; - setmode(fileno(stdin), O_BINARY); - setmode(fileno(stdout), O_BINARY); -#endif + SET_DEFAULT_BINARY(); + SET_FILE_BINARY(stdin); + SET_FILE_BINARY(stdout); progname = argv[0]; /* scan options */ for (a = 1; a < argc; a++) { @@ -114,7 +109,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; @@ -317,7 +312,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); @@ -451,7 +447,7 @@ register char *nam; double -l_pixaspect() /* return pixel aspect ratio */ +l_pixaspect(char *nm) /* return pixel aspect ratio */ { register int fn; @@ -523,7 +519,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; @@ -556,12 +552,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;