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.16 by schorsch, Mon Jul 21 22:30:18 2003 UTC vs.
Revision 3.19 by schorsch, Mon Nov 10 11:54:23 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7   */
8  
9   #include "platform.h"
10 + #include "paths.h"
11 + #include "rtprocess.h"
12   #include "pcond.h"
13  
14  
# Line 106 | Line 108 | char   *argv[];
108                  case 'e':
109                          if (i+1 >= argc) goto userr;
110                          scalef = atof(argv[++i]);
111 <                        if (argv[i][0] == '+' | argv[i][0] == '-')
111 >                        if ((argv[i][0] == '+') | (argv[i][0] == '-'))
112                                  scalef = pow(2.0, scalef);
113                          what2do |= DO_LINEAR;
114                          break;
# Line 151 | Line 153 | char   *argv[];
153                                  progname);
154                  exit(1);
155          }
156 <        if (outprims == stdprims & inprims != stdprims)
156 >        if ((outprims == stdprims) & (inprims != stdprims))
157                  outprims = inprims;
158          Bldmin = Bl(ldmax/lddyn);
159          Bldmax = Bl(ldmax);
# Line 167 | Line 169 | char   *argv[];
169          SET_FILE_BINARY(stdout);
170          getahead();                     /* load input header */
171          printargs(argc, argv, stdout);  /* add to output header */
172 <        if (mbcalfile == NULL & outprims != stdprims)
172 >        if ((mbcalfile == NULL) & (outprims != stdprims))
173                  fputprims(outprims, stdout);
174          if ((what2do & (DO_PREHIST|DO_VEIL|DO_ACUITY)) != DO_PREHIST)
175                  getfovimg();            /* get foveal sample image? */
# Line 305 | Line 307 | mapimage()                             /* map picture and send to stdout */
307  
308   getfovimg()                     /* load foveal sampled image */
309   {
310 <        extern FILE     *popen();
309 <        char    combuf[128];
310 >        char    combuf[PATH_MAX];
311          FILE    *fp;
312          int     x, y;
313                                                  /* compute image size */
# Line 321 | Line 322 | getfovimg()                    /* load foveal sampled image */
322          }
323          if ((fovimg = (COLOR *)malloc(fvxr*fvyr*sizeof(COLOR))) == NULL)
324                  syserror("malloc");
325 <        sprintf(combuf, "pfilt -1 -b -pa 0 -x %d -y %d %s", fvxr, fvyr, infn);
325 >        sprintf(combuf, "pfilt -1 -b -pa 0 -x %d -y %d \"%s\"", fvxr, fvyr, infn);
326          if ((fp = popen(combuf, "r")) == NULL)
327                  syserror("popen");
328          getheader(fp, NULL, NULL);      /* skip header */
329 <        if (fgetresolu(&x, &y, fp) < 0 || x != fvxr | y != fvyr)
329 >        if (fgetresolu(&x, &y, fp) < 0 || (x != fvxr) | (y != fvyr))
330                  goto readerr;
331          for (y = 0; y < fvyr; y++)
332                  if (freadscan(fovscan(y), fvxr, fp) < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines