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

Comparing ray/src/util/rtcontrib.c (file contents):
Revision 1.14 by greg, Thu Jun 9 17:27:28 2005 UTC vs.
Revision 1.17 by greg, Fri Jun 10 16:42:11 2005 UTC

# Line 110 | Line 110 | const char     *modname[MAXMODLIST];   /* ordered modifier n
110   int             nmods = 0;              /* number of modifiers */
111  
112   MODCONT *addmodifier(char *modn, char *outf, char *binv);
113 + void addmodfile(char *fname, char *outf, char *binv);
114  
115   void init(int np);
116   int done_rprocs(struct rtproc *rtp);
# Line 257 | Line 258 | main(int argc, char *argv[])
258                                  rtargv[rtargc++] = argv[++i];
259                                  addmodifier(argv[i], curout, binval);
260                                  continue;
261 +                        case 'M':               /* modifier file */
262 +                                if (argv[i][2] || i >= argc-1) break;
263 +                                addmodfile(argv[++i], curout, binval);
264 +                                continue;
265                          }
266                  rtargv[rtargc++] = argv[i];     /* assume rtrace option */
267          }
# Line 452 | Line 457 | addmodifier(char *modn, char *outf, char *binv)
457          return mp;
458   }
459  
460 + /* add modifiers from a file list */
461 + void
462 + addmodfile(char *fname, char *outf, char *binv)
463 + {
464 +        char    *mname[MAXMODLIST];
465 +        int     i;
466 +                                        /* load the file & store strings */
467 +        wordfile(mname, fname);
468 +        for (i = 0; mname[i]; i++)      /* add each one */
469 +                addmodifier(mname[i], outf, binv);
470 + }
471 +
472   /* put string to stderr */
473   void
474   eputs(char  *s)
# Line 1045 | Line 1062 | recover_output(FILE *fin)
1062                                  break;          /* no bin separation */
1063                  }
1064                  if (!lastout) {                 /* empty output */
1065 <                        error(WARNING, "no data to recover");
1065 >                        error(WARNING, "no previous data to recover");
1066                          lu_done(&ofiletab);     /* reclose all outputs */
1067                          return;
1068                  }
# Line 1058 | Line 1075 | recover_output(FILE *fin)
1075                          mp->nbins = j;
1076                          ment->data = (char *)mp;
1077                  }
1078 +        }
1079 +        if (lastout < 0) {
1080 +                error(WARNING, "no output files to recover");
1081 +                return;
1082          }
1083                                                  /* seek on all files */
1084          nvals = lastout * outvsiz;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines