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.64 by schorsch, Thu Jan 1 11:21:55 2004 UTC vs.
Revision 3.67 by greg, Thu Sep 9 01:06:19 2004 UTC

# Line 76 | Line 76 | static void initrholo(void);
76   static int rholo(void);
77   static void setdefaults(HDGRID  *gp);
78   static void creatholo(HDGRID    *gp);
79 < static int headline(char        *s);
79 > static gethfunc headline;
80   static void loadholo(void);
81   static void rootname(char       *rn, char       *fn);
82   static void badvalue(int        vc);
# Line 323 | Line 323 | rholo(void)                            /* holodeck main loop */
323          static long     nextfragwarn = 100*(1L<<20);
324          static int      idle = 0;
325          PACKET  *pl = NULL, *plend;
326 <        off_t   fsiz;
326 >        off_t   fsiz, fuse;
327          int     pksiz;
328          register PACKET *p;
329          time_t  t;
# 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) {
348 >                (fsiz-(fuse=hdfiluse(hdlist[0]->fd)))/(fsiz/100) > FRAGWARN) {
349                  sprintf(errmsg, "holodeck file fragmentation is %.0f%%",
350 <                                100.*(fsiz-hdfiluse(hdlist[0]->fd,1))/fsiz);
350 >                                         100.*(fsiz-fuse)/fsiz);
351                  error(WARNING, errmsg);
352 <                nextfragwarn = fsiz + (fsiz>>2);        /* decent interval */
352 >                nextfragwarn = fsiz + (fsiz>>2);
353          }
354   #endif
355          t = time(NULL);                 /* check time */
# Line 488 | Line 488 | creatholo(                     /* create a holodeck output file */
488  
489   static int
490   headline(                       /* process information header line */
491 <        char    *s
491 >        char    *s,
492 >        void    *p
493   )
494   {
495          extern char     FMTSTR[];
# Line 658 | Line 659 | int    ec;
659                  if ((ncprocs > 0) & (force >= 0) && vdef(REPORT)) {
660                          off_t   fsiz, fuse;
661                          fsiz = hdfilen(hdlist[0]->fd);
662 <                        fuse = hdfiluse(hdlist[0]->fd, 1);
662 >                        fuse = hdfiluse(hdlist[0]->fd);
663                          fprintf(stderr,
664                          "%s: %.1f Mbyte holodeck file, %.1f%% fragmentation\n",
665                                          hdkfile, fsiz/(1024.*1024.),

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines