ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pcond.c
(Generate patch)

Comparing ray/src/px/pcond.c (file contents):
Revision 3.14 by greg, Sat Feb 22 02:07:27 2003 UTC vs.
Revision 3.18 by schorsch, Mon Oct 27 10:24:51 2003 UTC

# Line 6 | Line 6 | static const char      RCSid[] = "$Id$";
6   *  Added white-balance adjustment 10/01 (GW).
7   */
8  
9 + #include "platform.h"
10 + #include "rtprocess.h"
11   #include "pcond.h"
12  
13  
# Line 105 | Line 107 | char   *argv[];
107                  case 'e':
108                          if (i+1 >= argc) goto userr;
109                          scalef = atof(argv[++i]);
110 <                        if (argv[i][0] == '+' | argv[i][0] == '-')
110 >                        if ((argv[i][0] == '+') | (argv[i][0] == '-'))
111                                  scalef = pow(2.0, scalef);
112                          what2do |= DO_LINEAR;
113                          break;
# Line 150 | Line 152 | char   *argv[];
152                                  progname);
153                  exit(1);
154          }
155 <        if (outprims == stdprims & inprims != stdprims)
155 >        if ((outprims == stdprims) & (inprims != stdprims))
156                  outprims = inprims;
157          Bldmin = Bl(ldmax/lddyn);
158          Bldmax = Bl(ldmax);
# Line 162 | Line 164 | char   *argv[];
164                                          /* open output file */
165          if (i+2 == argc && freopen(argv[i+1], "w", stdout) == NULL)
166                  syserror(argv[i+1]);
167 < #ifdef MSDOS
168 <        setmode(fileno(infp), O_BINARY);
167 <        setmode(fileno(stdout), O_BINARY);
168 < #endif
167 >        SET_FILE_BINARY(infp);
168 >        SET_FILE_BINARY(stdout);
169          getahead();                     /* load input header */
170          printargs(argc, argv, stdout);  /* add to output header */
171 <        if (mbcalfile == NULL & outprims != stdprims)
171 >        if ((mbcalfile == NULL) & (outprims != stdprims))
172                  fputprims(outprims, stdout);
173          if ((what2do & (DO_PREHIST|DO_VEIL|DO_ACUITY)) != DO_PREHIST)
174                  getfovimg();            /* get foveal sample image? */
# Line 244 | Line 244 | getahead()                     /* load picture header */
244                  exit(1);
245          }
246          if (!gotview || ourview.type == VT_PAR) {
247 <                copystruct(&ourview, &stdview);
247 >                ourview = stdview;
248                  ourview.type = VT_PER;
249                  if (pixaspect*inpres.yr < inpres.xr) {
250                          ourview.horiz = 40.0;
# Line 306 | Line 306 | mapimage()                             /* map picture and send to stdout */
306  
307   getfovimg()                     /* load foveal sampled image */
308   {
309        extern FILE     *popen();
309          char    combuf[128];
310          FILE    *fp;
311          int     x, y;
# Line 326 | Line 325 | getfovimg()                    /* load foveal sampled image */
325          if ((fp = popen(combuf, "r")) == NULL)
326                  syserror("popen");
327          getheader(fp, NULL, NULL);      /* skip header */
328 <        if (fgetresolu(&x, &y, fp) < 0 || x != fvxr | y != fvyr)
328 >        if (fgetresolu(&x, &y, fp) < 0 || (x != fvxr) | (y != fvyr))
329                  goto readerr;
330          for (y = 0; y < fvyr; y++)
331                  if (freadscan(fovscan(y), fvxr, fp) < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines