--- ray/src/hd/rholo.c 2004/01/02 11:54:50 3.65 +++ ray/src/hd/rholo.c 2004/09/09 01:06:19 3.67 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: rholo.c,v 3.65 2004/01/02 11:54:50 schorsch Exp $"; +static const char RCSid[] = "$Id: rholo.c,v 3.67 2004/09/09 01:06:19 greg Exp $"; #endif /* * Radiance holodeck generation controller @@ -323,7 +323,7 @@ rholo(void) /* holodeck main loop */ static long nextfragwarn = 100*(1L<<20); static int idle = 0; PACKET *pl = NULL, *plend; - off_t fsiz; + off_t fsiz, fuse; int pksiz; register PACKET *p; time_t t; @@ -345,11 +345,11 @@ rholo(void) /* holodeck main loop */ } #if FRAGWARN if (fsiz >= nextfragwarn && - (fsiz-hdfiluse(hdlist[0]->fd,0))/(fsiz/100) > FRAGWARN) { + (fsiz-(fuse=hdfiluse(hdlist[0]->fd)))/(fsiz/100) > FRAGWARN) { sprintf(errmsg, "holodeck file fragmentation is %.0f%%", - 100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz); + 100.*(fsiz-fuse)/fsiz); error(WARNING, errmsg); - nextfragwarn = fsiz + (fsiz>>2); /* decent interval */ + nextfragwarn = fsiz + (fsiz>>2); } #endif t = time(NULL); /* check time */ @@ -659,7 +659,7 @@ int ec; if ((ncprocs > 0) & (force >= 0) && vdef(REPORT)) { off_t fsiz, fuse; fsiz = hdfilen(hdlist[0]->fd); - fuse = hdfiluse(hdlist[0]->fd, 1); + fuse = hdfiluse(hdlist[0]->fd); fprintf(stderr, "%s: %.1f Mbyte holodeck file, %.1f%% fragmentation\n", hdkfile, fsiz/(1024.*1024.),