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.2 by greg, Mon Nov 25 10:11:01 1991 UTC vs.
Revision 2.7 by greg, Wed Sep 9 22:19:42 1992 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1987 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ LBL";
# Line 38 | Line 38 | int  vspretest = 128;                  /* virtual source pretest dens
38   int  directinvis = 0;                   /* sources invisible? */
39   double  srcsizerat = 0.;                /* maximum ratio source size/dist. */
40  
41 + double  specthresh = .3;                /* specular sampling threshold */
42 + double  specjitter = 1.;                /* specular sampling jitter */
43 +
44   int  maxdepth = 4;                      /* maximum recursion depth */
45   double  minweight = 1e-2;               /* minimum ray weight */
46  
# Line 65 | Line 68 | static char  *reserve_mem = NULL;      /* pre-allocated res
68  
69   #define RESERVE_AMT     32768           /* amount of memory to reserve */
70  
71 < #define  CTRL(c)        ('c'-'@')
71 > #define  CTRL(c)        ((c)-'@')
72  
73  
74   quit(code)                      /* quit program */
# Line 170 | Line 173 | command(prompt)                        /* get/execute command */
173   char  *prompt;
174   {
175   #define  badcom(s)      strncmp(s, inpbuf, args-inpbuf-1)
173        double  atof();
176          char  inpbuf[256];
177          char  *args;
178   again:
# Line 249 | Line 251 | again:
251                          goto commerr;
252                  getpivot(args);
253                  break;
254 <        case CTRL(R):                           /* redraw */
254 >        case CTRL('R'):                         /* redraw */
255                  redraw();
256                  break;
257          case 'w':                               /* write */
# Line 261 | Line 263 | again:
263                  if (badcom("quit"))
264                          goto commerr;
265                  quit(0);
266 <        case CTRL(C):                           /* interrupt */
266 >        case CTRL('C'):                         /* interrupt */
267                  goto again;
268   #ifdef  SIGTSTP
269 <        case CTRL(Z):                           /* stop */
269 >        case CTRL('Z'):                         /* stop */
270                  devclose();
271                  kill(0, SIGTSTP);
272                  /* pc stops here */
# Line 309 | Line 311 | rsample()                      /* sample the image */
311          if (rl == NULL)
312                  return;
313          pl = (PNODE **)malloc(xsiz*sizeof(PNODE *));
314 <        if (pl == NULL)
314 >        if (pl == NULL) {
315 >                free((char *)rl);
316                  return;
317 +        }
318          /*
319           * Initialize the bottom row.
320           */
# Line 400 | Line 404 | int  pd;
404                          return(0);
405                  /*
406                   *  The following paint order can leave a black pixel
407 <                 *  when redraw() is called in (*dev->paintr)().
407 >                 *  if redraw() is called in (*dev->paintr)().
408                   */
409                  if (p->x >= mx && p->y >= my)
410                          pcopy(p, p->kid+UR);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines