|
|
1.1 ! root 1: static char *sccsid = "@(#)trace.c 34.1 10/3/80"; ! 2: ! 3: #include "global.h" ! 4: lispval ! 5: Leval1(){ ! 6: register struct nament *bindptr; ! 7: register lispval handy; ! 8: snpand(2); ! 9: if (np-lbot == 2) { /*if two arguments to eval */ ! 10: if (TYPE((lbot+1)->val) != INT) ! 11: error("Eval: 2nd arg not legal alist pointer", FALSE); ! 12: bindptr = orgbnp + (lbot+1)->val->i; ! 13: if (rsetsw == 0 || rsetatom->a.clb == nil) ! 14: error("Not in *rsetmode; second arg is useless - eval", TRUE); ! 15: if (bptr_atom->a.clb != nil) ! 16: error("WARNING - Nesting 2nd args to eval will give spurious values", TRUE); ! 17: if (bindptr < orgbnp || bindptr >bnplim) ! 18: error("Illegal pdl pointer as 2nd arg - eval", FALSE); ! 19: handy = newdot(); ! 20: handy->d.car = (lispval)bindptr; ! 21: handy->d.cdr = (lispval)bnp; ! 22: PUSHDOWN(bptr_atom, handy); ! 23: handy = eval(lbot->val); ! 24: POP; ! 25: return(handy); ! 26: } else { /* normal case - only one arg */ ! 27: chkarg(1,"eval"); ! 28: handy = eval(lbot->val); ! 29: return(handy); ! 30: }; ! 31: } ! 32: ! 33: lispval ! 34: Levalhook() ! 35: { ! 36: register lispval handy; ! 37: snpand(1); ! 38: chkarg(2,"evalhook"); ! 39: if (evalhsw == 0) ! 40: error("evalhook called before doing sstatus-evalhook", TRUE); ! 41: if (rsetsw == 0 || rsetatom->a.clb == nil) ! 42: error("evalhook called while not in *rset mode", TRUE); ! 43: PUSHDOWN(evalhatom,(lispval)(lbot+1)->val); ! 44: /* eval checks evalhcall to see if this is a LISP call to evalhook ! 45: in which case it avoids call to evalhook function, but clobbers ! 46: value to nil so recursive calls will check. */ ! 47: PUSHDOWN(evalhcall,tatom); ! 48: handy = eval(lbot->val); ! 49: POP; ! 50: POP; ! 51: return(handy); ! 52: } ! 53: ! 54: lispval ! 55: Lrset () ! 56: { ! 57: chkarg(1,"rset"); ! 58: ! 59: rsetsw = (lbot->val == nil) ? 0 : 1; ! 60: rsetatom->a.clb = (lbot->val == nil) ? nil: tatom; ! 61: return(lbot->val); ! 62: } ! 63:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.