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

Comparing ray/src/hd/holofile.c (file contents):
Revision 3.22 by gwlarson, Thu Feb 12 16:30:04 1998 UTC vs.
Revision 3.24 by gwlarson, Tue Sep 15 14:26:23 1998 UTC

# Line 379 | Line 379 | int    n;                      /* list length */
379   int     (*bf)();                /* callback function (optional) */
380   {
381          unsigned        origcachesize, memuse;
382        register BEAM   *bp;
382          int     bytesloaded, needbytes, bytes2free;
383 +        register BEAM   *bp;
384          register int    i;
385                                          /* precheck consistency */
386          for (i = n; i--; )
# Line 390 | Line 390 | int    (*bf)();                /* callback function (optional) */
390          qsort((char *)hb, n, sizeof(HDBEAMI), hdfilord);
391          bytesloaded = 0;                /* run through loaded beams */
392          for ( ; n && (bp = hb->h->bl[hb->b]) != NULL; n--, hb++) {
393 <                bp->tick = hdclock;             /* preempt swap */
393 >                bp->tick = hdclock;     /* preempt swap */
394                  bytesloaded += bp->nrm;
395                  if (bf != NULL)
396 <                        (*bf)(bp, hb->h, hb->b);
396 >                        (*bf)(bp, hb);
397          }
398          bytesloaded *= sizeof(RAYVAL);
399          if ((origcachesize = hdcachesize) > 0) {
# Line 412 | Line 412 | int    (*bf)();                /* callback function (optional) */
412          }
413          for (i = 0; i < n; i++)
414                  if ((bp = hdgetbeam(hb[i].h, hb[i].b)) != NULL && bf != NULL)
415 <                        (*bf)(bp, hb[i].h, hb[i].b);
415 >                        (*bf)(bp, hb+i);
416          hdcachesize = origcachesize;    /* resume dynamic swapping */
417   }
418  
# Line 712 | Line 712 | register HOLO  *hp;            /* NULL means clean up all */
712          if (hp == NULL) {               /* NULL means clean up everything */
713                  while (hdlist[0] != NULL)
714                          hddone(hdlist[0]);
715 +                free((char *)hdfragl);
716 +                hdfragl = NULL; nhdfragls = 0;
717                  return;
718          }
719                                          /* flush all data and free memory */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines