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.18 by gregl, Mon Dec 8 20:27:34 1997 UTC vs.
Revision 3.19 by gregl, Thu Dec 11 12:09:33 1997 UTC

# Line 279 | Line 279 | rholo()                                /* holodeck main loop */
279                  if (!disp_check(idle))
280                          return(0);
281                                          /* display only? */
282 <        if (ncprocs <= 0)
282 >        if (nprocs <= 0)
283                  return(1);
284                                          /* check file size */
285          if (maxdisk > 0 && hdfilen(hdlist[0]->fd) >= maxdisk) {
# Line 500 | Line 500 | PACKET *pl;
500                  p->next = freepacks;
501                  freepacks = p;
502          }
503 <        if (n2flush > 512*RPACKSIZ*ncprocs) {
503 >        if (n2flush > 512*RPACKSIZ*nprocs) {
504                  hdflush(NULL);                  /* flush holodeck buffers */
505                  n2flush = 0;
506          }
# Line 610 | Line 610 | int    ec;
610          int     status = 0;
611  
612          if (hdlist[0] != NULL) {        /* flush holodeck */
613 <                if (ncprocs > 0) {
613 >                if (nprocs > 0) {
614                          done_packets(flush_queue());
615                          status = end_rtrace();  /* close rtrace */
616 <                        hdflush(NULL);
617 <                        if (vdef(REPORT)) {
618 <                                long    fsiz, fuse;
619 <                                report(0);
620 <                                fsiz = hdfilen(hdlist[0]->fd);
621 <                                fuse = hdfiluse(hdlist[0]->fd, 1);
622 <                                fprintf(stderr,
616 >                }
617 >                hdflush(NULL);
618 >                if (ncprocs > 0 && vdef(REPORT)) {
619 >                        long    fsiz, fuse;
620 >                        report(0);
621 >                        fsiz = hdfilen(hdlist[0]->fd);
622 >                        fuse = hdfiluse(hdlist[0]->fd, 1);
623 >                        fprintf(stderr,
624                          "%s: %.1f Mbyte holodeck file, %.1f%% fragmentation\n",
625 <                                                hdkfile, fsiz/(1024.*1024.),
626 <                                                100.*(fsiz-fuse)/fsiz);
627 <                        }
627 <                } else
628 <                        hdflush(NULL);
625 >                                        hdkfile, fsiz/(1024.*1024.),
626 >                                        100.*(fsiz-fuse)/fsiz);
627 >                }
628          }
629          if (orig_mode >= 0)             /* reset holodeck access mode */
630                  fchmod(hdlist[0]->fd, orig_mode);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines