17 |
|
#define CHAN 4 |
18 |
|
#define FUNC 5 |
19 |
|
#define ARG 6 |
20 |
< |
#define TICK 7 |
20 |
> |
#define CLKT 7 |
21 |
|
#define SYM 8 |
22 |
|
/* also: '+', '-', '*', '/', '^', '=', ':' */ |
23 |
|
|
29 |
|
} LIBR; /* a library function */ |
30 |
|
|
31 |
|
typedef struct epnode { |
32 |
– |
int type; /* node type */ |
33 |
– |
struct epnode *sibling; /* next child this level */ |
32 |
|
union { |
33 |
|
struct epnode *kid; /* first child */ |
34 |
|
double num; /* number */ |
43 |
|
struct vardef *next; /* next in hash list */ |
44 |
|
} *ln; /* link */ |
45 |
|
} v; /* value */ |
46 |
+ |
struct epnode *sibling; /* next child this level */ |
47 |
+ |
int type; /* node type */ |
48 |
|
} EPNODE; /* an expression node */ |
49 |
|
|
50 |
|
typedef struct vardef VARDEF; /* a variable definition */ |
70 |
|
extern unsigned int esupport; |
71 |
|
extern EPNODE *curfunc; |
72 |
|
extern int nextc; |
73 |
+ |
extern int eofc; |
74 |
|
|
75 |
|
/* defined in biggerlib.c */ |
76 |
|
extern void biggerlib(void); |
80 |
|
extern void scompile(char *str, char *fname, int ln); |
81 |
|
extern double varvalue(char *vname); |
82 |
|
extern double evariable(EPNODE *ep); |
83 |
< |
extern void varset(char *fname, int assign, double val); |
83 |
> |
extern void varset(char *vname, int assign, double val); |
84 |
|
extern void dclear(char *name); |
85 |
|
extern void dremove(char *name); |
86 |
|
extern int vardefined(char *name); |
87 |
< |
extern char *setcontext(char *ctx); |
87 |
> |
extern char *calcontext(char *ctx); |
88 |
|
extern char *pushcontext(char *ctx); |
89 |
|
extern char *popcontext(void); |
90 |
|
extern char *qualname(char *nam, int lvl); |
143 |
|
/* defined in calprnt.c */ |
144 |
|
extern void eprint(EPNODE *ep, FILE *fp); |
145 |
|
extern void dprint(char *name, FILE *fp); |
145 |
– |
/* defined in savestr.c */ |
146 |
– |
//extern char *savestr(char *str); |
147 |
– |
//extern void freestr(char *s); |
148 |
– |
//extern int shash(char *s); |
149 |
– |
/* defined in ealloc.c */ |
150 |
– |
//extern char *emalloc(unsigned int n); |
151 |
– |
//extern char *ecalloc(unsigned int ne, unsigned int es); |
152 |
– |
//extern char *erealloc(char *cp, unsigned int n); |
153 |
– |
//extern void efree(char *cp); |
146 |
|
/* defined by client */ |
147 |
|
extern double chanvalue(int n); |
148 |
|
|