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

Comparing ray/src/util/rad.c (file contents):
Revision 2.112 by greg, Tue May 26 10:00:47 2015 UTC vs.
Revision 2.117 by greg, Wed May 27 14:26:04 2015 UTC

# Line 401 | Line 401 | checkfiles(void)                       /* check for existence and modified
401                  atos(fntemp, sizeof(fntemp), vval(PCMAP));
402                  pcmapname = savqstr(fntemp);
403                  pcmapdate = fdate(pcmapname);
404                if (pgmapname == NULL && !nowarn)
405                        fprintf(stderr, "%s: '%s' assigned without '%s'\n",
406                                        progname, vnam(PCMAP), vnam(PGMAP));
404          }
405          matdate = checklast(vval(MATERIAL));
406   }      
# Line 659 | Line 656 | mkpmap(void)                   /* run mkpmap if indicated */
656                          else
657                                  badvalue(REPORT);
658                  }
659 <                if (vdef(PGMAP)) {
659 >                if (pgmapname != NULL && pgmapdate < oct1date) {
660 >                        if (pgmapdate)
661 >                                rmfile(pgmapname);
662                          cp = addarg(cp, "-apg");
663                          addarg(cp, vval(PGMAP));
664                          cp = sskip(sskip(cp));  /* remove any bandwidth */
665                          *cp = '\0';
666                  }
667 <                if (vdef(PCMAP)) {
667 >                if (pcmapname != NULL && pcmapdate < oct1date) {
668 >                        if (pcmapdate)
669 >                                rmfile(pcmapname);
670                          cp = addarg(cp, "-apc");
671                          addarg(cp, vval(PCMAP));
672                          cp = sskip(sskip(cp));  /* remove any bandwidth */
# Line 675 | Line 676 | mkpmap(void)                   /* run mkpmap if indicated */
676                  if (runcom(combuf)) {
677                          fprintf(stderr, "%s: error running %s\n",
678                                          progname, c_mkpmap);
679 <                        if (pgmapname != NULL)
679 >                        if (pgmapname != NULL && pgmapdate < oct1date)
680                                  unlink(pgmapname);
681 <                        if (pcmapname != NULL)
681 >                        if (pcmapname != NULL && pcmapdate < oct1date)
682                                  unlink(pcmapname);
683                          quit(1);
684                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines