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.29 by gregl, Tue Dec 16 15:45:55 1997 UTC vs.
Revision 3.32 by gregl, Mon Dec 22 11:06:53 1997 UTC

# Line 88 | Line 88 | char   *argv[];
88                          goto userr;
89                  }
90                                                  /* get root file name */
91 +        if (i >= argc)
92 +                goto userr;
93          rootname(froot, hdkfile=argv[i++]);
94                                                  /* load variables? */
95          if (i < argc)
# Line 262 | Line 264 | memerr:
264  
265   rholo()                         /* holodeck main loop */
266   {
267 <        static int      idle = 1;
267 >        static int      idle = 0;
268          PACKET  *pl = NULL, *plend;
269          register PACKET *p;
270          time_t  t;
271          long    l;
272 <
273 <        if (outdev != NULL)             /* check display */
272 <                if (!disp_check(idle))
273 <                        return(0);
274 <                                        /* display only? */
275 <        if (nprocs <= 0) {
272 >                                        /* check display */
273 >        if (nprocs <= 0)
274                  idle = 1;
275 <                return(outdev != NULL);
276 <        }
275 >        if (outdev != NULL) {
276 >                if (!disp_check(idle))
277 >                        return(0);      /* quit request */
278 >                if (nprocs <= 0)
279 >                        return(1);
280 >        } else if (idle)
281 >                return(0);              /* all done */
282                                          /* check file size */
283          if (maxdisk > 0 && hdfilen(hdlist[0]->fd) >= maxdisk) {
284                  error(WARNING, "file limit exceeded");
# Line 488 | Line 491 | PACKET *pl;
491                  p->next = freepacks;
492                  freepacks = p;
493          }
494 <        if (n2flush > 512*RPACKSIZ*nprocs) {
494 >        if (n2flush > 1024*RPACKSIZ*nprocs) {
495                  hdflush(NULL);                  /* flush holodeck buffers */
496                  n2flush = 0;
497          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines