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

Comparing ray/src/hd/rholo.c (file contents):
Revision 3.65 by schorsch, Fri Jan 2 11:54:50 2004 UTC vs.
Revision 3.66 by greg, Thu Sep 9 00:25:59 2004 UTC

# Line 345 | Line 345 | rholo(void)                            /* holodeck main loop */
345          }
346   #if FRAGWARN
347          if (fsiz >= nextfragwarn &&
348 <                (fsiz-hdfiluse(hdlist[0]->fd,0))/(fsiz/100) > FRAGWARN) {
349 <                sprintf(errmsg, "holodeck file fragmentation is %.0f%%",
350 <                                100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz);
351 <                error(WARNING, errmsg);
352 <                nextfragwarn = fsiz + (fsiz>>2);        /* decent interval */
348 >                    (fsiz-hdfiluse(hdlist[0]->fd,0))/(fsiz/100) > FRAGWARN) {
349 >                double  pctfrag = 100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz;
350 >                if (pctfrag >= (double)FRAGWARN) {
351 >                        sprintf(errmsg, "holodeck file fragmentation is %.0f%%",
352 >                                        pctfrag);
353 >                        error(WARNING, errmsg);
354 >                        nextfragwarn = fsiz + (fsiz>>2);
355 >                }
356          }
357   #endif
358          t = time(NULL);                 /* check time */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines