1 |
< |
/* Copyright (c) 1986 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
22 |
|
|
23 |
|
#include "calcomp.h" |
24 |
|
|
25 |
< |
|
25 |
> |
/* bits in argument flag (better be right!) */ |
26 |
> |
#define AFLAGSIZ (8*sizeof(unsigned long)) |
27 |
|
#define ALISTSIZ 6 /* maximum saved argument list */ |
28 |
|
|
29 |
|
typedef struct activation { |
131 |
|
act.name = fname; |
132 |
|
act.prev = curact; |
133 |
|
act.ap = a; |
134 |
< |
act.an = (1L<<n)-1; |
134 |
> |
if (n >= AFLAGSIZ) |
135 |
> |
act.an = ~0; |
136 |
> |
else |
137 |
> |
act.an = (1L<<n)-1; |
138 |
|
act.fun = NULL; |
139 |
|
curact = &act; |
140 |
|
|
208 |
|
quit(1); |
209 |
|
} |
210 |
|
/* already computed? */ |
211 |
< |
if (1L<<n & actp->an) |
211 |
> |
if (n < AFLAGSIZ && 1L<<n & actp->an) |
212 |
|
return(actp->ap[n]); |
213 |
|
|
214 |
|
if (actp->fun == NULL || (ep = ekid(actp->fun, n+1)) == NULL) { |