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 2.7 by greg, Sat Sep 26 08:13:32 1992 UTC vs.
Revision 2.14 by greg, Fri Jun 4 15:04:48 1993 UTC

# Line 24 | Line 24 | static char SCCSid[] = "$SunId$ LBL";
24  
25   #include  <errno.h>
26  
27 + #include  <math.h>
28 +
29   #include  "calcomp.h"
30  
31   #define  MAXLINE        256             /* maximum line length */
# Line 32 | Line 34 | static char SCCSid[] = "$SunId$ LBL";
34  
35   #define  isdecimal(c)   (isdigit(c) || (c) == '.')
36  
37 < #ifndef atof
36 < extern double  atof();
37 < #endif
38 < extern double  pow();
39 < extern char  *fgets(), *savestr();
37 > extern char  *savestr();
38   extern char  *emalloc(), *ecalloc();
39   extern EPNODE  *curfunc;
40   extern double  efunc(), evariable();
41 < static double  euminus(), echannel(), eargument(), enumber();
41 > static double  euminus(), eargument(), enumber();
42 > #ifdef  INCHAN
43 > static double  echannel();
44 > #endif
45   static double  eadd(), esubtr(), emult(), edivi(), epow();
46   static double  ebotch();
47  
# Line 148 | Line 149 | register EPNODE         *epar;
149              break;
150  
151          default:
152 <            for (ep = epar->v.kid; ep != NULL; ep = ep->sibling)
152 >            while ((ep = epar->v.kid) != NULL) {
153 >                epar->v.kid = ep->sibling;
154                  epfree(ep);
155 +            }
156              break;
157  
158      }
# Line 371 | Line 374 | scan()                         /* scan next character, return literal next
374  
375  
376   char *
377 < ltoa(l)                         /* convert long to ascii */
377 > long2ascii(l)                         /* convert long to ascii */
378   long  l;
379   {
380      static char  buf[16];
# Line 405 | Line 408 | char  *err;
408          if (infile != NULL) eputs(infile);
409          if (lineno != 0) {
410              eputs(infile != NULL ? ", line " : "line ");
411 <            eputs(ltoa((long)lineno));
411 >            eputs(long2ascii((long)lineno));
412          }
413          eputs(":\n");
414      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines