--- ray/src/px/pcond.c 2003/06/05 19:29:34 3.15 +++ ray/src/px/pcond.c 2003/10/27 10:24:51 3.18 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: pcond.c,v 3.15 2003/06/05 19:29:34 schorsch Exp $"; +static const char RCSid[] = "$Id: pcond.c,v 3.18 2003/10/27 10:24:51 schorsch Exp $"; #endif /* * Condition Radiance picture for display/output @@ -7,6 +7,7 @@ static const char RCSid[] = "$Id: pcond.c,v 3.15 2003/ */ #include "platform.h" +#include "rtprocess.h" #include "pcond.h" @@ -106,7 +107,7 @@ char *argv[]; case 'e': if (i+1 >= argc) goto userr; scalef = atof(argv[++i]); - if (argv[i][0] == '+' | argv[i][0] == '-') + if ((argv[i][0] == '+') | (argv[i][0] == '-')) scalef = pow(2.0, scalef); what2do |= DO_LINEAR; break; @@ -151,7 +152,7 @@ char *argv[]; progname); exit(1); } - if (outprims == stdprims & inprims != stdprims) + if ((outprims == stdprims) & (inprims != stdprims)) outprims = inprims; Bldmin = Bl(ldmax/lddyn); Bldmax = Bl(ldmax); @@ -167,7 +168,7 @@ char *argv[]; SET_FILE_BINARY(stdout); getahead(); /* load input header */ printargs(argc, argv, stdout); /* add to output header */ - if (mbcalfile == NULL & outprims != stdprims) + if ((mbcalfile == NULL) & (outprims != stdprims)) fputprims(outprims, stdout); if ((what2do & (DO_PREHIST|DO_VEIL|DO_ACUITY)) != DO_PREHIST) getfovimg(); /* get foveal sample image? */ @@ -243,7 +244,7 @@ getahead() /* load picture header */ exit(1); } if (!gotview || ourview.type == VT_PAR) { - copystruct(&ourview, &stdview); + ourview = stdview; ourview.type = VT_PER; if (pixaspect*inpres.yr < inpres.xr) { ourview.horiz = 40.0; @@ -305,7 +306,6 @@ mapimage() /* map picture and send to stdout */ getfovimg() /* load foveal sampled image */ { - extern FILE *popen(); char combuf[128]; FILE *fp; int x, y; @@ -325,7 +325,7 @@ getfovimg() /* load foveal sampled image */ if ((fp = popen(combuf, "r")) == NULL) syserror("popen"); getheader(fp, NULL, NULL); /* skip header */ - if (fgetresolu(&x, &y, fp) < 0 || x != fvxr | y != fvyr) + if (fgetresolu(&x, &y, fp) < 0 || (x != fvxr) | (y != fvyr)) goto readerr; for (y = 0; y < fvyr; y++) if (freadscan(fovscan(y), fvxr, fp) < 0)