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.15 by greg, Fri Aug 15 19:59:56 2014 UTC vs.
Revision 2.16 by greg, Tue Aug 26 07:41:29 2014 UTC

# Line 36 | Line 36 | static const char RCSid[] = "$Id$";
36  
37   char            *progname;              /* global argv[0] */
38  
39 < int             verbose = 0;            /* verbose mode? */
39 > int             verbose = 0;            /* verbose mode (< 0 no warnings) */
40  
41   char            *rcarg[MAXRCARG+1] = {"rcontrib", "-fo+"};
42   int             nrcargs = 2;
# Line 226 | Line 226 | popen_arglist(char *av[], char *mode)
226                  fputs(": command line too long in popen_arglist()\n", stderr);
227                  return(NULL);
228          }
229 <        if (verbose)
229 >        if (verbose > 0)
230                  fprintf(stderr, "%s: opening pipe %s: %s\n",
231                                  progname, (*mode=='w') ? "to" : "from", cmd);
232          return(popen(cmd, mode));
# Line 244 | Line 244 | my_exec(char *av[])
244                  fputs(": command line too long in my_exec()\n", stderr);
245                  return(1);
246          }
247 <        if (verbose)
247 >        if (verbose > 0)
248                  fprintf(stderr, "%s: running: %s\n", progname, cmd);
249          return(system(cmd));
250   }
# Line 259 | Line 259 | my_exec(char *av[])
259                  fprintf(stderr, "%s: cannot locate %s\n", progname, av[0]);
260                  return(1);
261          }
262 <        if (verbose) {
262 >        if (verbose > 0) {
263                  char    cmd[4096];
264                  if (!convert_commandline(cmd, sizeof(cmd), av))
265                          strcpy(cmd, "COMMAND TOO LONG TO SHOW");
# Line 867 | Line 867 | prepare_sampler(void)
867                  fputs(": no sender surface!\n", stderr);
868                  return(-1);
869          }
870 <        if (curparams.outfn != NULL)    /* misplaced output file spec. */
870 >                                        /* misplaced output file spec. */
871 >        if ((curparams.outfn != NULL) & (verbose >= 0))
872                  fprintf(stderr, "%s: warning - ignoring output file in sender ('%s')\n",
873                                  progname, curparams.outfn);
874                                          /* check/set basis hemisphere */
# Line 1018 | Line 1019 | add_surface(int st, const char *oname, FILE *fp)
1019                  snew->area *= PI*snew->area;
1020                  break;
1021          }
1022 <        if (snew->area <= FTINY) {
1022 >        if ((snew->area <= FTINY) & (verbose >= 0)) {
1023                  fprintf(stderr, "%s: warning - zero area for surface '%s'\n",
1024                                  progname, oname);
1025                  free(snew);
# Line 1205 | Line 1206 | main(int argc, char *argv[])
1206                  na = 1;
1207                  switch (argv[a][1]) {   /* !! Keep consistent !! */
1208                  case 'v':               /* verbose mode */
1209 <                        verbose = !verbose;
1209 >                        verbose = 1;
1210                          na = 0;
1211                          continue;
1212                  case 'f':               /* special case for -fo, -ff, etc. */
# Line 1246 | Line 1247 | main(int argc, char *argv[])
1247                          iropt = argv[a];
1248                          na = 0;
1249                          continue;
1250 <                case 'V':               /* options without arguments */
1251 <                case 'w':
1250 >                case 'w':               /* options without arguments */
1251 >                        if (argv[a][2] != '+') verbose = -1;
1252 >                case 'V':
1253                  case 'u':
1254                  case 'h':
1255                  case 'r':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines