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

Comparing ray/src/common/calexpr.c (file contents):
Revision 1.15 by greg, Wed Aug 14 08:18:14 1991 UTC vs.
Revision 2.2 by greg, Thu Dec 19 14:45:47 1991 UTC

# Line 32 | Line 32 | static char SCCSid[] = "$SunId$ LBL";
32  
33   #define  isdecimal(c)   (isdigit(c) || (c) == '.')
34  
35 < extern double  atof(), pow();
35 > #ifndef atof
36 > extern double  atof();
37 > #endif
38 > extern double  pow();
39   extern char  *fgets(), *savestr();
40   extern char  *emalloc(), *ecalloc();
41   extern EPNODE  *curfunc;
# Line 585 | Line 588 | getE4()                                /* E4 -> ADDOP E5 */
588          if (ep2->type == NUM) {
589                  ep2->v.num = -ep2->v.num;
590                  return(ep2);
591 +        }
592 +        if (ep2->type == UMINUS) {      /* don't generate -(-E5) */
593 +            efree((char *)ep2);
594 +            return(ep2->v.kid);
595          }
596          ep1 = newnode();
597          ep1->type = UMINUS;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines