--- ray/src/util/rad.c 2015/10/28 02:52:17 2.123 +++ ray/src/util/rad.c 2019/02/26 23:31:11 2.126 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rad.c,v 2.123 2015/10/28 02:52:17 greg Exp $"; +static const char RCSid[] = "$Id: rad.c,v 2.126 2019/02/26 23:31:11 greg Exp $"; #endif /* * Executive program for oconv, rpict and pfilt @@ -17,7 +17,7 @@ static const char RCSid[] = "$Id: rad.c,v 2.123 2015/1 #include "paths.h" #include "vars.h" -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) #define DELCMD "del" #define RENAMECMD "rename" #else @@ -556,9 +556,10 @@ oconv(void) /* run oconv and mkillum if necessary * return; /* make octree0 */ if ((oct0date < scenedate) | (oct0date < illumdate)) { - if (touchonly && oct0date) - touch(oct0name); - else { /* build command */ + if (touchonly && (oct0date || oct1date)) { + if (oct0date) + touch(oct0name); + } else { /* build command */ if (octreedate) sprintf(combuf, "%s%s -i %s %s > %s", c_oconv, ocopts, vval(OCTREE), @@ -583,7 +584,7 @@ oconv(void) /* run oconv and mkillum if necessary * oct0date = octreedate; if (oct0date < illumdate) /* ditto */ oct0date = illumdate; - } + } if (touchonly && oct1date) touch(oct1name); else { @@ -752,7 +753,10 @@ mkpmapopts( /* get mkpmap options */ { /* BEWARE: This may be called via setdefaults(), so no assumptions */ - *mo = '\0'; + if (nprocs > 1) + sprintf(mo, " -n %d", nprocs); + else + *mo = '\0'; if (!vdef(MKPMAP)) return; if (vval(MKPMAP)[0] != '-') { @@ -1074,7 +1078,7 @@ hiqopts( /* high quality rendering options */ } -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) static void setenv( /* set an environment variable */ char *vname, @@ -1121,7 +1125,7 @@ xferopts( /* transfer options if indicated */ syserr(vval(OPTFILE)); sprintf(ro, " @%s", vval(OPTFILE)); } -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) else if (n > 50) { setenv("ROPT", ro+1); strcpy(ro, " $ROPT"); @@ -1299,7 +1303,7 @@ specview( /* get proper view spec from vs */ if (cp == viewopts) /* append any additional options */ vs++; /* skip prefixed space if unneeded */ strcpy(cp, vs); -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) if (strlen(viewopts) > 40) { setenv("VIEW", viewopts); return("$VIEW"); @@ -1367,14 +1371,14 @@ myprintview( /* print out selected view */ VIEW vwr; char buf[128]; char *cp; -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) /* XXX Should we allow something like this for all platforms? */ /* XXX Or is it still required at all? */ again: #endif if (vopts == NULL) return(-1); -#ifdef _WIN32 +#if defined(_WIN32) || defined(_WIN64) if (vopts[0] == '$') { vopts = getenv(vopts+1); goto again;