--- ray/src/rt/rpmain.c 2005/01/18 00:33:16 2.9 +++ ray/src/rt/rpmain.c 2008/03/11 02:21:47 2.14 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rpmain.c,v 2.9 2005/01/18 00:33:16 greg Exp $"; +static const char RCSid[] = "$Id: rpmain.c,v 2.14 2008/03/11 02:21:47 greg Exp $"; #endif /* * rpmain.c - main for rpict batch rendering program @@ -7,7 +7,7 @@ static const char RCSid[] = "$Id: rpmain.c,v 2.9 2005/ #include "copyright.h" -#include +#include #include #include "platform.h" @@ -226,7 +226,13 @@ main(int argc, char *argv[]) /* initialize object types */ initotypes(); /* initialize urand */ - initurand(2048); + if (rand_samp) { + srandom((long)time(0)); + initurand(0); + } else { + srandom(0L); + initurand(2048); + } /* set up signal handling */ sigdie(SIGINT, "Interrupt"); #ifdef SIGHUP @@ -311,10 +317,11 @@ main(int argc, char *argv[]) pflock(1); pfhold(); tstart = time((time_t *)NULL); + ambsync(); /* load new values */ } if (rval < 0) error(SYSTEM, "cannot fork child for persist function"); - pfdetach(); /* parent exits */ + pfdetach(); /* parent will run then exit */ } } runagain: @@ -435,6 +442,7 @@ printdefaults(void) /* print default values to stdou ourview.type==VT_HEM ? "hemispherical" : ourview.type==VT_ANG ? "angular" : ourview.type==VT_CYL ? "cylindrical" : + ourview.type==VT_PLS ? "planisphere" : "unknown"); printf("-vp %f %f %f\t# view point\n", ourview.vp[0], ourview.vp[1], ourview.vp[2]);