--- ray/src/util/rad.c 1998/10/19 16:21:41 2.58 +++ ray/src/util/rad.c 2003/02/22 02:07:30 2.61 @@ -1,9 +1,6 @@ -/* Copyright (c) 1998 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rad.c,v 2.61 2003/02/22 02:07:30 greg Exp $"; #endif - /* * Executive program for oconv, rpict and pfilt */ @@ -13,7 +10,6 @@ static char SCCSid[] = "$SunId$ SGI"; #include "paths.h" #include "vars.h" #include -#include /* variables (alphabetical by name) */ #define AMBFILE 0 /* ambient file name */ @@ -81,7 +77,7 @@ char overfile[] = "overture.unf"; char overfile[] = "/dev/null"; #endif -extern time_t fdate(), time(); +extern time_t time(); time_t scenedate; /* date of latest scene or object file */ time_t octreedate; /* date of octree */ @@ -213,16 +209,13 @@ register char *fnames; { char thisfile[MAXPATH]; time_t thisdate, lastdate = 0; - register char *cp; if (fnames == NULL) return(0); - while (*fnames) { - while (isspace(*fnames)) fnames++; - cp = thisfile; - while (*fnames && !isspace(*fnames)) - *cp++ = *fnames++; - *cp = '\0'; + while ((fnames = nextword(thisfile, MAXPATH, fnames)) != NULL) { + if (thisfile[0] == '!' || + (thisfile[0] == '\\' && thisfile[1] == '!')) + continue; if (!(thisdate = fdate(thisfile))) syserr(thisfile); if (thisdate > lastdate) @@ -267,6 +260,10 @@ checkfiles() /* check for existence and modified tim syserr(progname); sprintf(vval(OCTREE), "%s.oct", radname); vdef(OCTREE)++; + } else if (vval(OCTREE)[0] == '!') { + fprintf(stderr, "%s: illegal '%s' specification\n", + progname, vnam(OCTREE)); + quit(1); } octreedate = fdate(vval(OCTREE)); if (vdef(ILLUM)) { /* illum requires secondary octrees */ @@ -843,7 +840,7 @@ register char *po; } switch (vscale(QUALITY)) { case MEDIUM: - po = addarg(po, "-r 1"); + po = addarg(po, "-r .6"); break; case HIGH: po = addarg(po, "-m .25"); @@ -1048,11 +1045,12 @@ again: } #endif copystruct(&vwr, &stdview); - cp = vopts; /* get -vf files first */ + sscanview(&vwr, cp=vopts); /* set initial options */ while ((cp = strstr(cp, "-vf ")) != NULL && - *atos(buf, sizeof(buf), cp += 4)) - viewfile(buf, &vwr, NULL); - sscanview(&vwr, vopts); /* get the rest */ + *atos(buf, sizeof(buf), cp += 4)) { + viewfile(buf, &vwr, NULL); /* load -vf file */ + sscanview(&vwr, cp); /* reset tail */ + } fputs(VIEWSTR, stdout); fprintview(&vwr, stdout); /* print full spec. */ fputc('\n', stdout); @@ -1311,6 +1309,7 @@ char *s; } +void quit(ec) /* exit program */ int ec; {