#define getfunction(x) ((x)->n_vdata[1]) /* xlgetfunction - get the functional value of a symbol (with check) */ LVAL xlgetfunction(sym) LVAL sym; { LVAL val; /* look for the functional value of the symbol */ while ((val = xlxgetfunction(sym)) == s_unbound) xlfunbound(sym); /* return the value */ return (val); } /* xlxgetfunction - get the functional value of a symbol */ LVAL xlxgetfunction(sym) LVAL sym; { register LVAL fp,ep; /* check the environment list */ for (fp = xlfenv; fp; fp = cdr(fp)) for (ep = car(fp); ep; ep = cdr(ep)) if (sym == car(car(ep))) return (cdr(car(ep))); /* return the global value */ return (getfunction(sym)); }