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

Comparing ray/src/util/rfluxmtx.c (file contents):
Revision 2.10 by greg, Fri Jul 25 17:03:06 2014 UTC vs.
Revision 2.12 by greg, Mon Jul 28 16:30:18 2014 UTC

# Line 11 | Line 11 | static const char RCSid[] = "$Id$";
11   #include <stdlib.h>
12   #include "rtio.h"
13   #include "rtmath.h"
14 + #include "rtprocess.h"
15   #include "bsdf.h"
16   #include "bsdf_m.h"
17   #include "random.h"
# Line 1174 | Line 1175 | main(int argc, char *argv[])
1175   {
1176          char    fmtopt[6] = "-faa";     /* default output is ASCII */
1177          char    *xrs=NULL, *yrs=NULL, *ldopt=NULL;
1178 <        int     wantIrradiance = 0;
1178 >        char    *iropt = NULL;
1179          char    *sendfn;
1180          char    sampcntbuf[32], nsbinbuf[32];
1181          FILE    *rcfp;
# Line 1223 | Line 1224 | main(int argc, char *argv[])
1224                          na = 0;         /* we re-add this later */
1225                          continue;
1226                  case 'I':               /* only for pass-through mode */
1227 <                        wantIrradiance = 1;
1227 >                case 'i':
1228 >                        iropt = argv[a];
1229                          na = 0;
1230                          continue;
1231                  case 'V':               /* options without arguments */
1232                  case 'w':
1233                  case 'u':
1232                case 'i':
1234                  case 'h':
1235                  case 'r':
1236                          break;
# Line 1277 | Line 1278 | done_opts:
1278          if (sendfn[0] == '-') {         /* user wants pass-through mode? */
1279                  if (sendfn[1]) goto userr;
1280                  sendfn = NULL;
1281 <                if (wantIrradiance) {
1281 >                if (iropt) {
1282                          CHECKARGC(1);
1283 <                        rcarg[nrcargs++] = "-I";
1283 >                        rcarg[nrcargs++] = iropt;
1284                  }
1285                  if (xrs) {
1286                          CHECKARGC(2);
# Line 1297 | Line 1298 | done_opts:
1298                  }
1299                  if (sampcnt <= 0) sampcnt = 1;
1300          } else {                        /* else in sampling mode */
1301 <                if (wantIrradiance) {
1301 >                if (iropt) {
1302                          fputs(progname, stderr);
1303 <                        fputs(": -I supported for pass-through only\n", stderr);
1303 >                        fputs(": -i, -I supported for pass-through only\n", stderr);
1304                          return(1);
1305                  }
1306                  fmtopt[2] = (sizeof(RREAL)==sizeof(double)) ? 'd' : 'f';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines