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.9 by greg, Thu Nov 19 20:25:55 1992 UTC vs.
Revision 2.12 by greg, Tue Sep 7 16:11:12 1993 UTC

# Line 58 | Line 58 | char  *devname = dev_default;          /* output device name *
58  
59   struct driver  *dev = NULL;             /* driver functions */
60  
61 + char  rifname[128];                     /* rad input file name */
62 +
63   VIEW  oldview;                          /* previous view parameters */
64  
65   PNODE  ptrunk;                          /* the base of our image */
# Line 74 | Line 76 | static char  *reserve_mem = NULL;      /* pre-allocated res
76   quit(code)                      /* quit program */
77   int  code;
78   {
79 + #ifdef MSTATS
80 +        if (code == 2 && errno == ENOMEM)
81 +                printmemstats(stderr);
82 + #endif
83          devclose();
84          exit(code);
85   }
# Line 185 | Line 191 | again:
191          else *++args = '\0';
192          
193          switch (inpbuf[0]) {
194 <        case 'f':                               /* new frame */
195 <                if (badcom("frame"))
196 <                        goto commerr;
194 >        case 'f':                               /* new frame (or free mem.) */
195 >                if (badcom("frame")) {
196 >                        if (badcom("free"))
197 >                                goto commerr;
198 >                        free_objmem();
199 >                        break;
200 >                }
201                  getframe(args);
202                  break;
203          case 'v':                               /* view */
# Line 200 | Line 210 | again:
210                          goto commerr;
211                  lastview(args);
212                  break;
213 +        case 'V':                               /* save view */
214 +                if (badcom("V"))
215 +                        goto commerr;
216 +                saveview(args);
217 +                break;
218 +        case 'L':                               /* load view */
219 +                if (badcom("L"))
220 +                        goto commerr;
221 +                loadview(args);
222 +                break;
223          case 'e':                               /* exposure */
224                  if (badcom("exposure"))
225                          goto commerr;
# Line 225 | Line 245 | again:
245                          goto commerr;
246                  getaim(args);
247                  break;
248 <        case 'm':                               /* move camera */
248 >        case 'm':                               /* move camera (or memstats) */
249                  if (badcom("move"))
250   #ifdef  MSTATS
251                  {
# Line 307 | Line 327 | rsample()                      /* sample the image */
327           * difference, we subsample the super-pixels.  The testing process
328           * includes initialization of the next row.
329           */
330 <        xsiz = (((pframe.r-pframe.l)<<pdepth)+hresolu-1) / hresolu;
331 <        ysiz = (((pframe.u-pframe.d)<<pdepth)+vresolu-1) / vresolu;
330 >        xsiz = (((long)(pframe.r-pframe.l)<<pdepth)+hresolu-1) / hresolu;
331 >        ysiz = (((long)(pframe.u-pframe.d)<<pdepth)+vresolu-1) / vresolu;
332          rl = (RECT *)malloc(xsiz*sizeof(RECT));
333          if (rl == NULL)
334                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines