ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rtmain.c
(Generate patch)

Comparing ray/src/rt/rtmain.c (file contents):
Revision 2.13 by greg, Sun Feb 5 22:22:20 2006 UTC vs.
Revision 2.17 by greg, Mon Jun 22 20:52:56 2009 UTC

# Line 227 | Line 227 | main(int  argc, char  *argv[])
227                                          /* initialize object types */
228          initotypes();
229                                          /* initialize urand */
230 <        initurand(2048);
231 <        srandom(rand_samp ? (long)time(0) : 0L);
230 >        if (rand_samp) {
231 >                srandom((long)time(0));
232 >                initurand(0);
233 >        } else {
234 >                srandom(0L);
235 >                initurand(2048);
236 >        }
237                                          /* set up signal handling */
238          sigdie(SIGINT, "Interrupt");
239   #ifdef SIGHUP
# Line 304 | Line 309 | main(int  argc, char  *argv[])
309                          while ((rval=fork()) == 0) {    /* keep on forkin' */
310                                  pflock(1);
311                                  pfhold();
312 +                                ambsync();              /* load new values */
313                          }
314                          if (rval < 0)
315                                  error(SYSTEM, "cannot fork child for persist function");
316 <                        pfdetach();             /* parent exits */
316 >                        pfdetach();             /* parent will run then exit */
317                  }
318          }
319   runagain:
# Line 330 | Line 336 | runagain:
336                  }
337          }
338          if (persist == PCHILD) {        /* wait for a signal then go again */
333                close(duped1);                  /* release output handle */
339                  pfhold();
340                  raynum = nrays = 0;             /* reinitialize */
341                  goto runagain;
# Line 420 | Line 425 | printdefaults(void)                    /* print default values to stdou
425  
426          if (imm_irrad)
427                  printf("-I+\t\t\t\t# immediate irradiance on\n");
428 <        printf("-x  %-9d\t\t\t# x resolution (flush interval)\n", hresolu);
429 <        printf("-y  %-9d\t\t\t# y resolution\n", vresolu);
428 >        printf("-x %-9d\t\t\t# x resolution (flush interval)\n", hresolu);
429 >        printf("-y %-9d\t\t\t# y resolution\n", vresolu);
430          printf(lim_dist ? "-ld+\t\t\t\t# limit distance on\n" :
431                          "-ld-\t\t\t\t# limit distance off\n");
432          printf("-h%c\t\t\t\t# %s header\n", loadflags & IO_INFO ? '+' : '-',

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines