--- ray/src/hd/rholo.c 2004/01/02 11:54:50 3.65 +++ ray/src/hd/rholo.c 2004/09/09 00:25:59 3.66 @@ -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.66 2004/09/09 00:25:59 greg Exp $"; #endif /* * Radiance holodeck generation controller @@ -345,11 +345,14 @@ rholo(void) /* holodeck main loop */ } #if FRAGWARN if (fsiz >= nextfragwarn && - (fsiz-hdfiluse(hdlist[0]->fd,0))/(fsiz/100) > FRAGWARN) { - sprintf(errmsg, "holodeck file fragmentation is %.0f%%", - 100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz); - error(WARNING, errmsg); - nextfragwarn = fsiz + (fsiz>>2); /* decent interval */ + (fsiz-hdfiluse(hdlist[0]->fd,0))/(fsiz/100) > FRAGWARN) { + double pctfrag = 100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz; + if (pctfrag >= (double)FRAGWARN) { + sprintf(errmsg, "holodeck file fragmentation is %.0f%%", + pctfrag); + error(WARNING, errmsg); + nextfragwarn = fsiz + (fsiz>>2); + } } #endif t = time(NULL); /* check time */