--- ray/src/util/rad.c 1999/02/02 08:57:56 2.60 +++ ray/src/util/rad.c 2003/06/05 19:29:35 2.63 @@ -1,9 +1,6 @@ -/* Copyright (c) 1999 Silicon Graphics, Inc. */ - #ifndef lint -static char SCCSid[] = "$SunId$ SGI"; +static const char RCSid[] = "$Id: rad.c,v 2.63 2003/06/05 19:29:35 schorsch 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 */ @@ -264,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 */ @@ -821,7 +821,7 @@ char *ro; syserr(vval(OPTFILE)); sprintf(ro, " @%s", vval(OPTFILE)); } -#ifdef MSDOS +#ifdef _WIN32 else if (n > 50) { setenv("ROPT", ro+1); strcpy(ro, " $ROPT"); @@ -840,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"); @@ -977,7 +977,7 @@ register char *vs; if (cp == viewopts) /* append any additional options */ vs++; /* skip prefixed space if unneeded */ strcpy(cp, vs); -#ifdef MSDOS +#ifdef _WIN32 if (strlen(viewopts) > 40) { setenv("VIEW", viewopts); return("$VIEW"); @@ -1031,14 +1031,13 @@ char *vn; /* returned view name */ printview(vopts) /* print out selected view */ register char *vopts; { - extern char *strstr(), *atos(), *getenv(); VIEW vwr; char buf[128]; register char *cp; again: if (vopts == NULL) return(-1); -#ifdef MSDOS +#ifdef _WIN32 if (vopts[0] == '$') { vopts = getenv(vopts+1); goto again; @@ -1246,7 +1245,7 @@ rmfile(fn) /* remove a file */ char *fn; { if (!silent) -#ifdef MSDOS +#ifdef _WIN32 printf("\tdel %s\n", fn); #else printf("\trm -f %s\n", fn); @@ -1261,7 +1260,7 @@ mvfile(fold, fnew) /* move a file */ char *fold, *fnew; { if (!silent) -#ifdef MSDOS +#ifdef _WIN32 printf("\trename %s %s\n", fold, fnew); #else printf("\tmv %s %s\n", fold, fnew); @@ -1272,7 +1271,7 @@ char *fold, *fnew; } -#ifdef MSDOS +#ifdef _WIN32 setenv(vname, value) /* set an environment variable */ char *vname, *value; { @@ -1309,6 +1308,7 @@ char *s; } +void quit(ec) /* exit program */ int ec; {