24 |
|
|
25 |
|
#include <errno.h> |
26 |
|
|
27 |
+ |
#include <math.h> |
28 |
+ |
|
29 |
|
#include "calcomp.h" |
30 |
|
|
31 |
|
#define MAXLINE 256 /* maximum line length */ |
37 |
|
#ifndef atof |
38 |
|
extern double atof(); |
39 |
|
#endif |
38 |
– |
extern double pow(); |
40 |
|
extern char *fgets(), *savestr(); |
41 |
|
extern char *emalloc(), *ecalloc(); |
42 |
|
extern EPNODE *curfunc; |
43 |
|
extern double efunc(), evariable(); |
44 |
< |
static double euminus(), echannel(), eargument(), enumber(); |
44 |
> |
static double euminus(), eargument(), enumber(); |
45 |
> |
#ifdef INCHAN |
46 |
> |
static double echannel(); |
47 |
> |
#endif |
48 |
|
static double eadd(), esubtr(), emult(), edivi(), epow(); |
49 |
|
static double ebotch(); |
50 |
|
|
152 |
|
break; |
153 |
|
|
154 |
|
default: |
155 |
< |
for (ep = epar->v.kid; ep != NULL; ep = ep->sibling) |
155 |
> |
while ((ep = epar->v.kid) != NULL) { |
156 |
> |
epar->v.kid = ep->sibling; |
157 |
|
epfree(ep); |
158 |
+ |
} |
159 |
|
break; |
160 |
|
|
161 |
|
} |
377 |
|
|
378 |
|
|
379 |
|
char * |
380 |
< |
ltoa(l) /* convert long to ascii */ |
380 |
> |
long2ascii(l) /* convert long to ascii */ |
381 |
|
long l; |
382 |
|
{ |
383 |
|
static char buf[16]; |
411 |
|
if (infile != NULL) eputs(infile); |
412 |
|
if (lineno != 0) { |
413 |
|
eputs(infile != NULL ? ", line " : "line "); |
414 |
< |
eputs(ltoa((long)lineno)); |
414 |
> |
eputs(long2ascii((long)lineno)); |
415 |
|
} |
416 |
|
eputs(":\n"); |
417 |
|
} |