#define getvalue(x) ((x)->n_vdata[0]) /* xlgetvalue - get the value of a symbol (with check) */ LVAL xlgetvalue(sym) LVAL sym; { LVAL val; /* look for the value of the symbol */ while ((val = xlxgetvalue(sym)) == s_unbound) xlunbound(sym); /* return the value */ return (val); } /* xlxgetvalue - get the value of a symbol */ LVAL xlxgetvalue(sym) LVAL sym; { register LVAL fp,ep; LVAL val; /* check the environment list */ for (fp = xlenv; fp; fp = cdr(fp)) /* check for an instance variable */ if ((ep = car(fp)) && objectp(car(ep))) { if (xlobgetvalue(ep,sym,&val)) return (val); } /* check an environment stack frame */ else { for (; ep; ep = cdr(ep)) if (sym == car(car(ep))) return (cdr(car(ep))); } /* return the global value */ return (getvalue(sym)); }