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

Comparing ray/src/rt/rview.c (file contents):
Revision 2.29 by greg, Thu Aug 21 07:05:59 2008 UTC vs.
Revision 2.33 by greg, Sat Dec 12 23:08:13 2009 UTC

# Line 19 | Line 19 | static const char      RCSid[] = "$Id$";
19  
20  
21   void
22 + quit(code)                      /* quit program */
23 + int  code;
24 + {
25 + #ifdef MSTATS
26 +        if (code == 2 && errno == ENOMEM)
27 +                printmemstats(stderr);
28 + #endif
29 +        if (ray_pnprocs > 0)    /* close children if any */
30 +                ray_pclose(0);
31 +        else if (!ray_pnprocs)  /* in parent */
32 +                devclose();
33 +        exit(code);
34 + }
35 +
36 +
37 + void
38   devopen(                                /* open device driver */
39          char  *dname
40   )
# Line 85 | Line 101 | rview(void)                            /* do a view */
101                          (*dev->comout)(buf);
102                          refine(&ptrunk, pdepth+1);
103                  }
88                if (waitrays() < 0)
89                        quit(1);
104                  if (dev->inpready)              /* noticed some input */
105                          command(": ");
106                  else                            /* finished this depth */
# Line 109 | Line 123 | again:
123                  ;
124          if (*args) *args++ = '\0';
125          else *++args = '\0';
126 +
127 +        if (waitrays() < 0)                     /* clear ray queue */
128 +                quit(1);
129          
130          switch (inpbuf[0]) {
131          case 'f':                               /* new frame (|focus|free) */
# Line 395 | Line 412 | refine(                                /* refine a node */
412                          growth += refine(p->kid+DR, pd-1);
413                  if (my < pframe.u)
414                          growth += refine(p->kid+UR, pd-1);
398        }
399                                                /* recompute sum */
400        if (growth) {
401                setcolor(p->v, 0.0, 0.0, 0.0);
402                for (i = 0; i < 4; i++)
403                        addcolor(p->v, p->kid[i].v);
404                scalecolor(p->v, 0.25);
415          }
416          return(growth);
417   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines