| 206 |
|
if (!vdef(TIME) || vflt(TIME) <= FTINY) |
| 207 |
|
endtime = 0; |
| 208 |
|
else |
| 209 |
< |
endtime = starttime + vflt(TIME)*3600.; |
| 209 |
> |
endtime = starttime + vflt(TIME)*3600. + .5; |
| 210 |
|
/* set up memory cache */ |
| 211 |
|
if (outdev == NULL) |
| 212 |
|
hdcachesize = 0; /* manual flushing */ |
| 233 |
|
goto memerr; |
| 234 |
|
freepacks[--i].nr = 0; |
| 235 |
|
freepacks[i].next = NULL; |
| 236 |
< |
if (!vbool(OBSTRUCTIONS)) { |
| 236 |
> |
if (!vdef(OBSTRUCTIONS) || !vbool(OBSTRUCTIONS)) { |
| 237 |
|
freepacks[i].offset = (float *)bmalloc( |
| 238 |
|
RPACKSIZ*sizeof(float)*(i+1) ); |
| 239 |
|
if (freepacks[i].offset == NULL) |
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
|
| 318 |
– |
report(t) /* report progress so far */ |
| 319 |
– |
time_t t; |
| 320 |
– |
{ |
| 321 |
– |
static time_t seconds2go = 1000000; |
| 322 |
– |
|
| 323 |
– |
if (t == 0L) |
| 324 |
– |
t = time(NULL); |
| 325 |
– |
sprintf(errmsg, "%ld packets (%ld rays) done after %.2f hours\n", |
| 326 |
– |
npacksdone, nraysdone, (t-starttime)/3600.); |
| 327 |
– |
eputs(errmsg); |
| 328 |
– |
if (seconds2go == 1000000) |
| 329 |
– |
seconds2go = vdef(REPORT) ? (long)(vflt(REPORT)*60. + .5) : 0L; |
| 330 |
– |
if (seconds2go) |
| 331 |
– |
reporttime = t + seconds2go; |
| 332 |
– |
} |
| 333 |
– |
|
| 334 |
– |
|
| 318 |
|
setdefaults(gp) /* set default values */ |
| 319 |
|
register HDGRID *gp; |
| 320 |
|
{ |
| 337 |
|
sprintf(vval(OCTREE), "%s.oct", froot); |
| 338 |
|
vdef(OCTREE)++; |
| 339 |
|
} |
| 357 |
– |
if (!vdef(OBSTRUCTIONS)) { |
| 358 |
– |
vval(OBSTRUCTIONS) = "T"; |
| 359 |
– |
vdef(OBSTRUCTIONS)++; |
| 360 |
– |
} |
| 340 |
|
if (!vdef(VDIST)) { |
| 341 |
|
vval(VDIST) = "F"; |
| 342 |
|
vdef(VDIST)++; |
| 544 |
|
{ |
| 545 |
|
int status = 0; |
| 546 |
|
|
| 547 |
< |
if (hdlist[0] != NULL) { /* flush holodeck */ |
| 547 |
> |
if (hdlist[0] != NULL) { /* close holodeck */ |
| 548 |
|
if (nprocs > 0) |
| 549 |
< |
status = done_rtrace(); |
| 571 |
< |
hdflush(NULL); |
| 549 |
> |
status = done_rtrace(); /* calls hdsync() */ |
| 550 |
|
if (ncprocs > 0 && vdef(REPORT)) { |
| 551 |
|
long fsiz, fuse; |
| 552 |
|
fsiz = hdfilen(hdlist[0]->fd); |