--- ray/src/common/calexpr.c 1992/09/26 08:13:32 2.7 +++ ray/src/common/calexpr.c 1993/06/04 15:04:48 2.14 @@ -24,6 +24,8 @@ static char SCCSid[] = "$SunId$ LBL"; #include +#include + #include "calcomp.h" #define MAXLINE 256 /* maximum line length */ @@ -32,15 +34,14 @@ static char SCCSid[] = "$SunId$ LBL"; #define isdecimal(c) (isdigit(c) || (c) == '.') -#ifndef atof -extern double atof(); -#endif -extern double pow(); -extern char *fgets(), *savestr(); +extern char *savestr(); extern char *emalloc(), *ecalloc(); extern EPNODE *curfunc; extern double efunc(), evariable(); -static double euminus(), echannel(), eargument(), enumber(); +static double euminus(), eargument(), enumber(); +#ifdef INCHAN +static double echannel(); +#endif static double eadd(), esubtr(), emult(), edivi(), epow(); static double ebotch(); @@ -148,8 +149,10 @@ register EPNODE *epar; break; default: - for (ep = epar->v.kid; ep != NULL; ep = ep->sibling) + while ((ep = epar->v.kid) != NULL) { + epar->v.kid = ep->sibling; epfree(ep); + } break; } @@ -371,7 +374,7 @@ scan() /* scan next character, return literal next char * -ltoa(l) /* convert long to ascii */ +long2ascii(l) /* convert long to ascii */ long l; { static char buf[16]; @@ -405,7 +408,7 @@ char *err; if (infile != NULL) eputs(infile); if (lineno != 0) { eputs(infile != NULL ? ", line " : "line "); - eputs(ltoa((long)lineno)); + eputs(long2ascii((long)lineno)); } eputs(":\n"); }