--- ray/src/hd/rholo.c 1997/12/12 18:23:08 3.22 +++ ray/src/hd/rholo.c 1997/12/13 10:30:56 3.25 @@ -206,7 +206,7 @@ initrholo() /* get our holodeck running */ if (!vdef(TIME) || vflt(TIME) <= FTINY) endtime = 0; else - endtime = starttime + vflt(TIME)*3600.; + endtime = starttime + vflt(TIME)*3600. + .5; /* set up memory cache */ if (outdev == NULL) hdcachesize = 0; /* manual flushing */ @@ -233,7 +233,7 @@ initrholo() /* get our holodeck running */ goto memerr; freepacks[--i].nr = 0; freepacks[i].next = NULL; - if (!vbool(OBSTRUCTIONS)) { + if (!vdef(OBSTRUCTIONS) || !vbool(OBSTRUCTIONS)) { freepacks[i].offset = (float *)bmalloc( RPACKSIZ*sizeof(float)*(i+1) ); if (freepacks[i].offset == NULL) @@ -315,23 +315,6 @@ rholo() /* holodeck main loop */ } -report(t) /* report progress so far */ -time_t t; -{ - static time_t seconds2go = 1000000; - - if (t == 0L) - t = time(NULL); - sprintf(errmsg, "%ld packets (%ld rays) done after %.2f hours\n", - npacksdone, nraysdone, (t-starttime)/3600.); - eputs(errmsg); - if (seconds2go == 1000000) - seconds2go = vdef(REPORT) ? (long)(vflt(REPORT)*60. + .5) : 0L; - if (seconds2go) - reporttime = t + seconds2go; -} - - setdefaults(gp) /* set default values */ register HDGRID *gp; { @@ -354,10 +337,6 @@ register HDGRID *gp; sprintf(vval(OCTREE), "%s.oct", froot); vdef(OCTREE)++; } - if (!vdef(OBSTRUCTIONS)) { - vval(OBSTRUCTIONS) = "T"; - vdef(OBSTRUCTIONS)++; - } if (!vdef(VDIST)) { vval(VDIST) = "F"; vdef(VDIST)++; @@ -565,10 +544,9 @@ int ec; { int status = 0; - if (hdlist[0] != NULL) { /* flush holodeck */ + if (hdlist[0] != NULL) { /* close holodeck */ if (nprocs > 0) - status = done_rtrace(); - hdflush(NULL); + status = done_rtrace(); /* calls hdsync() */ if (ncprocs > 0 && vdef(REPORT)) { long fsiz, fuse; fsiz = hdfilen(hdlist[0]->fd);