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 1.21 by greg, Mon Oct 21 12:58:00 1991 UTC vs.
Revision 2.4 by greg, Mon Dec 23 23:18:29 1991 UTC

# Line 65 | Line 65 | static char  *reserve_mem = NULL;      /* pre-allocated res
65  
66   #define RESERVE_AMT     32768           /* amount of memory to reserve */
67  
68 < #define  CTRL(c)        ('c'-'@')
68 > #define  CTRL(c)        ((c)-'@')
69  
70  
71   quit(code)                      /* quit program */
# Line 170 | Line 170 | command(prompt)                        /* get/execute command */
170   char  *prompt;
171   {
172   #define  badcom(s)      strncmp(s, inpbuf, args-inpbuf-1)
173        double  atof();
173          char  inpbuf[256];
174          char  *args;
175   again:
# Line 223 | Line 222 | again:
222                  break;
223          case 'm':                               /* move camera */
224                  if (badcom("move"))
225 + #ifdef  MSTATS
226 +                {
227 +                        if (badcom("memory"))
228 +                                goto commerr;
229 +                        printmemstats(stderr);
230 +                        break;
231 +                }
232 + #else
233                          goto commerr;
234 + #endif
235                  getmove(args);
236                  break;
237          case 'r':                               /* rotate/repaint */
# Line 240 | Line 248 | again:
248                          goto commerr;
249                  getpivot(args);
250                  break;
251 <        case CTRL(R):                           /* redraw */
251 >        case CTRL('R'):                         /* redraw */
252                  redraw();
253                  break;
254          case 'w':                               /* write */
# Line 252 | Line 260 | again:
260                  if (badcom("quit"))
261                          goto commerr;
262                  quit(0);
263 <        case CTRL(C):                           /* interrupt */
263 >        case CTRL('C'):                         /* interrupt */
264                  goto again;
265   #ifdef  SIGTSTP
266 <        case CTRL(Z):                           /* stop */
266 >        case CTRL('Z'):                         /* stop */
267                  devclose();
268                  kill(0, SIGTSTP);
269                  /* pc stops here */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines