--- ray/src/util/ranimate.c 1996/07/10 15:14:59 2.19 +++ ray/src/util/ranimate.c 1997/10/31 15:02:43 2.23 @@ -93,7 +93,7 @@ int silent = 0; /* silent mode? */ int noaction = 0; /* take no action? */ char *remsh; /* remote shell program/script */ -char rendopt[2048] = ""; /* rendering options */ +char rendopt[2048]; /* rendering options */ char rresopt[32]; /* rendering resolution options */ char fresopt[32]; /* filter resolution options */ int pfiltalways; /* always use pfilt? */ @@ -150,6 +150,8 @@ char *argv[]; cfname = argv[i]; /* load variables */ loadvars(cfname); + /* check variables */ + checkvalues(); /* did we get DIRECTORY? */ checkdir(); /* check status */ @@ -230,7 +232,7 @@ getastat() /* check/set animation status */ } /* assume it is dead */ } - if (strcmp(cfname, astat.cfname) && astat.tnext != 0) { /* other's */ + if (strcmp(cfname, astat.cfname) && astat.pid != 0) { /* other's */ fprintf(stderr, "%s: unfinished job \"%s\"\n", progname, astat.cfname); return(-1); @@ -448,28 +450,39 @@ char *rfargs; char combuf[256]; register int i; register char *cp; + char *pippt; /* create rad command */ sprintf(rendopt, " @%s/render.opt", vval(DIRECTORY)); sprintf(combuf, "rad -v 0 -s -e -w %s OPTFILE=%s | egrep '^[ \t]*(NOMATCH", rfargs, rendopt+2); cp = combuf; - while (*cp) cp++; /* match unset variables */ + while (*cp) { + if (*cp == '|') pippt = cp; + cp++; + } /* match unset variables */ for (i = 0; mvar[i] >= 0; i++) if (!vdef(mvar[i])) { *cp++ = '|'; strcpy(cp, vnam(mvar[i])); while (*cp) cp++; + pippt = NULL; } - sprintf(cp, ")[ \t]*=' > %s/radset.var", vval(DIRECTORY)); - cp += 11; /* point to file name */ + if (pippt != NULL) + strcpy(pippt, "> /dev/null"); /* nothing to match */ + else { + sprintf(cp, ")[ \t]*=' > %s/radset.var", vval(DIRECTORY)); + cp += 11; /* point to file name */ + } if (system(combuf)) { fprintf(stderr, "%s: error executing rad command:\n\t%s\n", progname, combuf); quit(1); } - loadvars(cp); /* load variables and remove file */ - unlink(cp); + if (pippt == NULL) { /* load variables and remove file */ + loadvars(cp); + unlink(cp); + } } @@ -901,7 +914,7 @@ int rvr; strcat(combuf, viewopt(vp)); if (vbool(RTRACE)) sprintf(combuf+strlen(combuf), " -ff -fr '%s -w0 %s'", - rendopt, vval(OCTREE)); + rendopt+1, vval(OCTREE)); if (vdef(PINTERP)) sprintf(combuf+strlen(combuf), " %s", vval(PINTERP)); if (usepfilt)