--- ray/src/util/rad.c 2015/05/27 12:50:46 2.113 +++ ray/src/util/rad.c 2015/05/27 14:22:02 2.116 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rad.c,v 2.113 2015/05/27 12:50:46 greg Exp $"; +static const char RCSid[] = "$Id: rad.c,v 2.116 2015/05/27 14:22:02 greg Exp $"; #endif /* * Executive program for oconv, rpict and pfilt @@ -401,9 +401,6 @@ checkfiles(void) /* check for existence and modified atos(fntemp, sizeof(fntemp), vval(PCMAP)); pcmapname = savqstr(fntemp); pcmapdate = fdate(pcmapname); - if (pgmapname == NULL && !nowarn) - fprintf(stderr, "%s: warning - '%s' assigned without '%s'\n", - progname, vnam(PCMAP), vnam(PGMAP)); } matdate = checklast(vval(MATERIAL)); } @@ -660,12 +657,14 @@ mkpmap(void) /* run mkpmap if indicated */ badvalue(REPORT); } if (pgmapname != NULL && pgmapdate < oct1date) { + unlink(pgmapname); cp = addarg(cp, "-apg"); addarg(cp, vval(PGMAP)); cp = sskip(sskip(cp)); /* remove any bandwidth */ *cp = '\0'; } if (pcmapname != NULL && pcmapdate < oct1date) { + unlink(pcmapname); cp = addarg(cp, "-apc"); addarg(cp, vval(PCMAP)); cp = sskip(sskip(cp)); /* remove any bandwidth */ @@ -675,9 +674,9 @@ mkpmap(void) /* run mkpmap if indicated */ if (runcom(combuf)) { fprintf(stderr, "%s: error running %s\n", progname, c_mkpmap); - if (pgmapname != NULL) + if (pgmapname != NULL && pgmapdate < oct1date) unlink(pgmapname); - if (pcmapname != NULL) + if (pcmapname != NULL && pcmapdate < oct1date) unlink(pcmapname); quit(1); }