Trailing-Edge
-
PDP-10 Archives
-
decuslib10-04
-
43,50322/errorx.com
There are no other files named errorx.com in the archive.
(DEFPROP ERFNS
(ERFNS (NOCALL EVALP BKTRACE BKFIND BKTR BKTRV BKPRINVAL BKACT CHNMX CHNM1 BKREAD ARGLIST GOFN)
ERRORX
//BREAK1
BREAK1ERX
EVALP
GOFN
%ERDEPTH
PLEV
FROM?=
USE
?=
&
EDBRK
*RSETERX
BKTRACE
FNDBRKPT
BKFIND
BKTR
BKTRV
BKPRINVAL
BKACT
CHNMX
CHNM1
BKREAD
BKPOS
ARGLIST
LXPD
PREVEV
STKNAME
STKNTH
STKSRCH
STKCOUNT
ARGPRINT)
VALUE)
(NOCALL EVALP BKTRACE BKFIND BKTR BKTRV BKPRINVAL BKACT CHNMX CHNM1 BKREAD ARGLIST GOFN)
(DEFPROP ERRORX
(LAMBDA NIL
(COND ((AND# USERERRORX (USERERRORX)))
(T
(PROG (%%ERREX LASTPOS)
(SETQ %%ERREX
(BREAK1 (COND ((SETQ LASTPOS (NEXTEV (SUB1 (STKSRCH (QUOTE ERRORX) (SPDLPT) NIL))))
(SETQ %%ERREX (SPDLRT LASTPOS)))
((ERR)))
(PROG (%%POS)
(RETURN
(COND ((CONSP %%ERREX))
((SETQ %%POS
(STKSRCH (QUOTE //BREAK1)
(STKSRCH (QUOTE ERRORX) (SPDLPT) NIL)
NIL))
(GREATERP (*DIF (SPDLPT) %%POS) %ERDEPTH))
((NEXTEV (SUB1 LASTPOS)) T))))
(COND ((ATOM %%ERREX) %%ERREX) ((CAR %%ERREX)))
NIL
(QUOTE ERRORX)))
(OUTVAL LASTPOS %%ERREX)))))
EXPR)
(DEFPROP //BREAK1
(LAMBDA NIL
(PROG (LASTPOS %%EVALFLAG !VALUE %%MSGFLAG %%BKPOS %%CMDL)
(OR BRKEXP (SETQ BRKEXP (QUOTE (QUOTE NIL))))
(AND (SETQ LASTPOS
(STKSRCH (COND ((EQ BRKTYPE (QUOTE ERRORX)) (QUOTE ERRORX)) ((QUOTE //BREAK1)))
(SPDLPT)
NIL))
(EQ (STKNAME (SETQ %%BKPOS (NEXTEV (SUB1 LASTPOS)))) (QUOTE BREAK1))
(SETQ LASTPOS %%BKPOS))
(SETQ %%BKPOS LASTPOS)
(SETQ #%IOCHANS%# (CONS (INC NIL NIL) (CONS (OUTC NIL NIL) #%IOCHANS%#)))
(SETQ #%PROMPTS%# (CONS (PROMPT 72) #%PROMPTS%#))
(COND (BRKWHEN) ((EQ BRKTYPE (QUOTE ERRORX)) (*RSETERX 1) (ERR NIL)) ((FROM?= BRKEXP)))
(SETQ LASTPOS (COND ((NEXTEV (SUB1 LASTPOS))) (LASTPOS)))
BRKLP
(COND (BRKCOMS (AND (ATOM (SETQ %%CMDL (CAR BRKCOMS))) (SETQ %%CMDL (NCONS %%CMDL)))
(SETQ BRKCOMS (CDR BRKCOMS)))
(T (TERPRI)
(TERPRI)
(COND ((NULL %%MSGFLAG) (PRINC (LIST BRKFN (QUOTE BROKEN))) (TERPRI) (SETQ %%MSGFLAG T)))
(PRINC (LENGTH #%PROMPTS%#))
(COND ((ATOM (SETQ %%CMDL (ERRSET (LINEREAD) ERRORX))) (GO BRKLP))
(T (SETQ %%CMDL (CAR %%CMDL))))))
BKLP2
(COND ((NULL %%CMDL) (PROMPT 72) (GO BRKLP)))
(SELECTQ
(CAR %%CMDL)
(^ (*RSETERX 1) (ERR NIL))
(^^ (*RSETERX (LENGTH #%PROMPTS%#)) (**TOP**))
(BK (BKTRACE (BKREAD 1000) (QUOTE (NIL T T T))))
(BKE (BKTRACE (BKREAD 1000) (QUOTE (NIL NIL T T))))
(BKF (BKTRACE (BKREAD 1000) (QUOTE (NIL NIL NIL T))))
(BKV (BKTRACE (BKREAD 1000) (QUOTE (T T T T))))
(BKEV (BKTRACE (BKREAD 1000) (QUOTE (T NIL T T))))
(BKFV (BKTRACE (BKREAD 1000) (QUOTE (T NIL NIL T))))
(>
(PROG (X Y Z)
(SETQ X (BKREAD))
(COND ((ATOM (SETQ Y (SPDLRT LASTPOS)))
(CHNM1 (COND ((SETQ Z (NEXTEV (SUB1 LASTPOS))) (SPDLRT Z))) Y X)
(RPLACD (STKPTR LASTPOS) X))
((AND (RPLACA BRKEXP X) (NOT (EQ (SETQ Z (BKREAD //BREAK1)) (QUOTE //BREAK1))))
(RPLACD BRKEXP (CONS Z (CDR BRKEXP)))))
(FROM?= NIL)))
(GO (COND (%%EVALFLAG) ((GOFN (CAR BRKEXP))) ((EVALP BRKEXP))) (TERPRI) (%PRINFN !VALUE) (GO LEAVE))
(OK (COND (%%EVALFLAG) ((GOFN (CAR BRKEXP))) ((EVALP BRKEXP))) (GO LEAVE))
(EVAL (EVALP BRKEXP) (%PRINFN !VALUE) (SETQ %%EVALFLAG T))
(EDIT (COND ((& (PROG2 0 (CDR %%CMDL) (SETQ %%CMDL (QUOTE (NIL))))) (ERRSET (EDBRK) ERRORX))))
(?= (?= (PROG2 0 (CDR %%CMDL) (SETQ %%CMDL (QUOTE (NIL))))))
(ARGS (MAPC (FUNCTION ARGPRINT) (ARGLIST BRKFN)))
(& (& (PROG2 0 (CDR %%CMDL) (SETQ %%CMDL (QUOTE (NIL))))))
(RETURN (EVALP (BKREAD)) (TERPRI) (GO LEAV2))
(FROM?= (FROM?= (BKREAD)))
(USE (USE))
(UNTRACE
(SETQ LASTPOS %%BKPOS)
(FROM?=
(LIST (NCONC
(LIST (QUOTE LAMBDA)
(QUOTE (%%V))
(LIST (QUOTE BKSETQ) (QUOTE %%V) BRKEXP)
(QUOTE (BKPOS (BKSETQ #%INDENT (*DIF #%INDENT 3))))
(LIST (QUOTE PRIN1) (LIST (QUOTE QUOTE) BRKFN)))
(QUOTE ((PRINC (QUOTE / =/ )) (%PRINFN %%V) %%V)))
NIL)))
(COND ((ASSOC (CAR %%CMDL) BREAKMACROS)
(SETQ BRKCOMS
(APPEND
(PROG (TEMP)
(RETURN
(COND ((AND (CAR (SETQ TEMP (CDR (ASSOC (CAR %%CMDL) BREAKMACROS))))
(LITATOM (CAR TEMP)))
(SUBST (CDR %%CMDL) (CAR TEMP) (CDR TEMP)))
(T (SUBPAIR (CAR TEMP) (CDR %%CMDL) (CDR TEMP))))))
BRKCOMS))
(GO BRKLP))
((EQ (NTHCHAR (CAR %%CMDL) 1) (QUOTE >))
(SETQ %%CMDL
(CONS (QUOTE >)
(RPLACA
%%CMDL
(READLIST
(COND ((EQ (NTHCHAR (CAR %%CMDL) 2) (QUOTE -)) (CDDR (EXPLODE (CAR %%CMDL))))
(T (CDR (EXPLODE (CAR %%CMDL)))))))))
(GO BKLP2))
(T (ERRSET (BREAK1ERX) ERRORX))))
(SETQ %%CMDL (CDR %%CMDL))
(GO BKLP2)
LEAVE
(AND %%MSGFLAG (TERPRI))
(SETQ LASTPOS %%BKPOS)
(COND ((ATOM BRKEXP))
((EQ (CAR BRKEXP) (QUOTE RETURN)) (FROM?= (LIST (CAR BRKEXP) (LIST (QUOTE QUOTE) !VALUE))))
((GOFN (CAR BRKEXP)) (FROM?= BRKEXP)))
LEAV2
(*RSETERX 1)
(RETURN !VALUE)))
EXPR)
(DEFPROP //BREAK1
(NIL)
VALUE)
(DEFPROP BREAK1ERX
(LAMBDA NIL (COND (%%MSGFLAG (TERPRI) (%PRINFN (BKEVAL (CAR %%CMDL)))) (T (BKEVAL (CAR %%CMDL)))))
EXPR)
(DEFPROP EVALP
(LAMBDA (#1) (COND ((CONSP (SETQ !VALUE (ERRSET (%ERDEPTH) ERRORX))) (SETQ !VALUE (CAR !VALUE)))))
EXPR)
(DEFPROP GOFN
(LAMBDA(FN)
(COND ((MEMQ FN (QUOTE (GO RETURN ERR))))
((SETQ FN (GET BRKFN (QUOTE ALIAS))) (MEMQ (CDR FN) (QUOTE (GO RETURN ERR))))))
EXPR)
(DEFPROP %ERDEPTH
(LAMBDA NIL (BKEVAL #1))
EXPR)
(DEFPROP %ERDEPTH
(NIL . 20)
VALUE)
(DEFPROP PLEV
(LAMBDA (X) (PRINLEV X %LOOKDPTH))
EXPR)
(DEFPROP FROM?=
(LAMBDA(X)
(*RSETERX (STKCOUNT (QUOTE //BREAK1) (SPDLPT) LASTPOS))
(COND (X (SPREVAL LASTPOS X)) (T (SPREDO LASTPOS))))
EXPR)
(DEFPROP USE
(LAMBDA NIL
(PROG (%%X %%Y %%Z)
(SETQ %%X (BKREAD))
(COND ((EQ (BKREAD) (QUOTE FOR)) (SETQ %%Y (BKREAD)))
((PRINT (QUOTE ?)) (SETQ %%CMDL (QUOTE (NIL))) (RETURN T)))
(COND
((ATOM (SETQ %%Z (SPDLRT LASTPOS)))
(COND ((EQ %%Y %%Z) (RPLACD (STKPTR LASTPOS) %%X)
(SETQ BRKEXP %%X)
(COND ((SETQ %%Z (NEXTEV (SUB1 LASTPOS))) (SETQ %%Z (SPDLRT %%Z))) ((RETURN T))))
((PRINT (QUOTE ?)) (RETURN T)))))
(COND ((CHNM1 %%Z %%Y %%X)) ((PRINT (CONS %%Y (APPEND (QUOTE (NOT FOUND IN)) (NCONS %%Z))))))))
EXPR)
(DEFPROP ?=
(LAMBDA(#COMS)
(PROG (#COM)
(COND ((NULL #COMS) (MAPC (FUNCTION ARGPRINT) (ARGLIST (STKNAME LASTPOS))) (RETURN T)))
LP (COND ((NUMBERP (SETQ #COM (CAR #COMS))) (ARGPRINT (CAR (NTH (ARGLIST (STKNAME LASTPOS)) #COM))))
((ATOM #COM) (ARGPRINT #COM))
((TERPRI T) (%PRINFN (BKEVAL #COM (PREVEV (ADD1 LASTPOS))))))
(AND (SETQ #COMS (CDR #COMS)) (GO LP))))
EXPR)
(DEFPROP &
(LAMBDA(COMS)
(PROG (POS COM FORFLAG)
(COND ((MEMQ (CAR COMS) (QUOTE (& F))) (SETQ POS LASTPOS) (GO NEXT))
((SETQ POS (COND ((NEXTEV (SUB1 %%BKPOS))) (%%BKPOS)))))
LP (COND ((NULL COMS) (SETQ LASTPOS POS) (PRINT (STKNAME LASTPOS)) (RETURN T))
((EQ (SETQ COM (CAR COMS)) (QUOTE _)) (SETQ FORFLAG T) (GO NEXT)))
(COND
((NULL
(SETQ POS
(COND ((NUMBERP COM) (STKNTH COM POS))
((ATOM COM) (PROG2 NIL (STKSRCH COM POS FORFLAG) (SETQ FORFLAG NIL))))))
(PRINT COM)
(PRINC (QUOTE ?))
(RETURN NIL)))
NEXT (SETQ COMS (CDR COMS))
(GO LP)))
EXPR)
(DEFPROP EDBRK
(LAMBDA NIL
(PROG (L POS EXPR)
(COND ((PATOM (SETQ L (SPDLRT (SETQ POS LASTPOS))))
(COND ((AND (SETQ POS (NEXTEV (SUB1 POS))) (BKFIND (SETQ EXPR (SPDLRT POS))))
(SETQ EXPR (EDITL (NCONS EXPR) (LIST (QUOTE F) L (QUOTE UP)) NIL NIL NIL))
(EDITL EXPR NIL NIL NIL NIL)
(RPLACD (STKPTR LASTPOS) (COND (EXPR (CAAR EXPR)))))
(T (PRINC (QUOTE NOT/ EDITABLE)) (RETURN NIL))))
(T (EDITE L NIL NIL)))
(COND ((EQ L BRKEXP) (SETQ BRKEXP (SPDLRT LASTPOS))))))
EXPR)
(DEFPROP *RSETERX
(LAMBDA(N)
(PROG NIL
LP (COND ((GREATERP 1 N) (RETURN NIL))
((EQ N 1) (ERRSET (INC (CAR #%IOCHANS%#) NIL) ERRORX)
(ERRSET (OUTC (CADR #%IOCHANS%#) NIL) ERRORX)
(SETQ #%IOCHANS%# (CDDR #%IOCHANS%#))
(PROMPT (CAR #%PROMPTS%#))
(SETQ #%PROMPTS%# (CDR #%PROMPTS%#))
(RETURN NIL)))
(SETQ #%IOCHANS%# (CDDR #%IOCHANS%#))
(SETQ #%PROMPTS%# (CDR #%PROMPTS%#))
(SETQ N (SUB1 N))
(GO LP)))
EXPR)
(DEFPROP BKTRACE
(LAMBDA(#M #ACTION)
(PROG (#SPD #NEXT %ACTION #NEXTEXPR)
(SETQ #SPD (PREVEV (ADD1 LASTPOS)))
(SETQ %PREVFN% (QUOTE " "))
L1 (COND ((LESSP (SETQ #M (SUB1 #M)) 0) (SETQ %PREVFN% (QUOTE " ")) (RETURN T)))
(SETQ #NEXT (FNDBRKPT (SETQ #SPD (SUB1 #SPD))))
(COND ((NULL #NEXT) (RETURN T)))
(SETQ %ACTION (BKACT (SETQ #NEXTEXPR (SPDLRT #NEXT))))
(COND ((AND (CAR #ACTION) (CAR %ACTION))
(BKTRV #SPD
#NEXT
(AND (CADR #ACTION) (CADR %ACTION))
(AND (CADDR #ACTION) (CADDR %ACTION))
(AND (CADDDR #ACTION) (CADDDR %ACTION))))
((AND (CADR #ACTION) (CADR %ACTION)) (BKTR #SPD #NEXT))
((AND (CADDR #ACTION) (CADDR %ACTION)) (SETQ %PREVFN% (PRINTLEV #NEXTEXPR 3)))
((AND (CADDDR #ACTION) (CADDDR %ACTION) (CONSP #NEXTEXPR)) (PRINT (CAR #NEXTEXPR))))
(SETQ #SPD #NEXT)
(GO L1)))
EXPR)
(DEFPROP FNDBRKPT
(LAMBDA(%SPD)
(PROG (%OLDSPD L %FUNAME)
(COND ((NULL (NEXTEV %SPD)) (RETURN NIL)))
(SETQ L (SPDLRT (SETQ %SPD (ADD1 %SPD))))
L1 (COND ((NULL (SETQ %SPD (NEXTEV (SUB1 (SETQ %OLDSPD %SPD))))) (RETURN %OLDSPD))
((ATOM (SETQ %FUNAME (SPDLRT %SPD))) (RETURN %SPD)))
(COND ((BKFIND %FUNAME) (SETQ L %FUNAME) (GO L1)))
(RETURN %SPD)))
EXPR)
(DEFPROP BKFIND
(LAMBDA(X)
(PROG NIL
L1 (COND ((OR (EQ (CAR X) L) (AND (NOT (PATOM (CAR X))) (BKFIND (CAR X)))) (RETURN T)))
(COND ((NOT (PATOM (SETQ X (CDR X)))) (GO L1)))))
EXPR)
(DEFPROP BKTR
(LAMBDA(%SPD %NEXT)
(PROG NIL
LP (SETQ %SPD (NEXTEV %SPD))
(SETQ %PREVFN% (PRINTLEV (SPDLRT %SPD) 3))
(COND ((EQ %SPD %NEXT) (RETURN NIL)))
(SETQ %SPD (SUB1 %SPD))
(GO LP)))
EXPR)
(DEFPROP BKTRV
(LAMBDA(%SPD %NEXT %ACT1 %ACT2 %ACT3)
(PROG (#ACTION)
(SETQ %SPD (ADD1 %SPD))
LP1 (SETQ %SPD (SUB1 %SPD))
(COND ((NOT (PATOM (SPDLFT %SPD))) (GO LP3)) ((SPDLFT %SPD) (GO LP1)))
(SETQ #ACTION (CDR (BKACT (SPDLRT %SPD))))
(COND ((OR (AND %ACT1 (CAR #ACTION)) (AND %ACT2 (CADR #ACTION) (EQ %SPD %NEXT)))
(SETQ %PREVFN% (PRINTLEV (SPDLRT %SPD) 3)))
((AND %ACT3 (CADDR #ACTION) (CONSP (SPDLRT %SPD)) (EQ %SPD %NEXT)) (PRINT (CAR (SPDLRT %SPD)))))
(COND ((EQ %SPD %NEXT) (RETURN NIL)) (T (GO LP1)))
LP3 (TERPRI)
(PRINC (QUOTE / / / ))
(BKPRINVAL %SPD)
(GO LP1)))
EXPR)
(DEFPROP BKPRINVAL
(LAMBDA(%SPD)
(PROG (NAM SPEC)
(PRIN1 (COND ((CAR (SETQ SPEC (SPDLFT %SPD)))) ((SETQ NAM (ASSOC SPEC LAPLST)) (CDR NAM))))
(PRINC (QUOTE / =/ ))
(PRINLEV (COND ((EQ (SETQ %SPD (EVALV (OR# (CAR SPEC) SPEC) (ADD1 %SPD))) (UNBOUND)) (QUOTE UNBOUND))
(%SPD))
3)))
EXPR)
(DEFPROP BKACT
(LAMBDA(#NEXT)
(COND
((OR (PATOM #NEXT) (NOT (LITATOM (CAR #NEXT))) (NULL (SETQ #NEXT (GET (CAR #NEXT) (QUOTE ERXACTION)))))
(SETQ #NEXT (QUOTE (T T T T)))))
#NEXT)
EXPR)
(DEFPROP CHNMX
(LAMBDA(IN)
(PROG NIL
LP (COND ((ATOM IN) (RETURN IN))
((EQUAL (CAR IN) FROM) (RPLACA IN TO) (SETQ CHNGDFLG T))
((CHNMX (CAR IN))))
(SETQ IN (CDR IN))
(GO LP)))
EXPR)
(DEFPROP CHNM1
(LAMBDA (IN FROM TO) (PROG (CHNGDFLG) (CHNMX IN) (RETURN (AND# CHNGDFLG IN))))
EXPR)
(DEFPROP BKREAD
(LAMBDA (X) (COND ((AND %%CMDL (CDR %%CMDL)) (PROG2 0 (CADR %%CMDL) (SETQ %%CMDL (CDR %%CMDL)))) (X (CAR X))))
FEXPR)
(DEFPROP BKPOS
(LAMBDA(COL)
(PROG (WHERE)
(SETQ COL (REMAINDER COL (*DIF (LINELENGTH NIL) 30)))
(TERPRI)
(SETQ WHERE 1)
LP (COND ((GREATERP WHERE COL) (RETURN COL))
((PRINC (QUOTE !/ / )) (SETQ WHERE (*PLUS WHERE 3)) (GO LP)))))
EXPR)
(DEFPROP ARGLIST
(LAMBDA(#FUNC)
(COND ((SETQ #FUNC (GETL #FUNC (QUOTE (EXPR FEXPR MACRO))))
(COND ((AND (SETQ #FUNC (CADADR #FUNC)) (ATOM #FUNC))
(EVAL (LIST (QUOTE LXPD) #FUNC) (PREVEV (ADD1 LASTPOS))))
(#FUNC)))
(T (TERPRI) (PRINC (QUOTE ARGUMENTS/ NOT/ FOUND)) NIL)))
EXPR)
(DEFPROP LXPD
(LAMBDA(NUMARGS)
(PROG (A)
LP (COND ((ZEROP NUMARGS) (RETURN A))
((SETQ A (CONS (LIST (QUOTE ARG) NUMARGS) A)) (SETQ NUMARGS (SUB1 NUMARGS)) (GO LP)))))
EXPR)
(DEFPROP PREVEV
(LAMBDA(#POS)
(PROG (#TOP)
(SETQ #TOP (SPDLPT))
LP (COND ((GREATERP #POS #TOP) (RETURN NIL))
((SPDLFT #POS) (SETQ #POS (ADD1 #POS)) (GO LP))
((RETURN #POS)))))
EXPR)
(DEFPROP STKNAME
(LAMBDA(#POS)
(COND ((NULL #POS) NIL) ((SPDLFT #POS) NIL) ((ATOM (SETQ #POS (SPDLRT #POS))) #POS) ((CAR #POS))))
EXPR)
(DEFPROP STKNTH
(LAMBDA(#N #POS)
(PROG (#FLAG)
(COND ((MINUSP #N) (SETQ #N (MINUS #N)) (SETQ #FLAG T)))
LP (COND ((OR (NULL #POS) (ZEROP #N)) (RETURN #POS))
(#FLAG (SETQ #POS (NEXTEV (SUB1 #POS))))
((SETQ #POS (PREVEV (ADD1 #POS)))))
(SETQ #N (SUB1 #N))
(GO LP)))
EXPR)
(DEFPROP STKSRCH
(LAMBDA(#NAME #POS #FLAG)
(PROG NIL
(COND ((NOT (NUMBERP #POS)) (RETURN #POS)))
LP (COND (#FLAG (SETQ #POS (PREVEV (ADD1 #POS)))) ((SETQ #POS (NEXTEV (SUB1 #POS)))))
(COND ((OR (NULL #POS) (EQ (STKNAME #POS) #NAME)) (RETURN #POS)))
(GO LP)))
EXPR)
(DEFPROP STKCOUNT
(LAMBDA(#NAME #P #PEND)
(PROG (#C)
(SETQ #C 0)
LP (COND ((OR (NULL #P) (NULL (SETQ #P (NEXTEV (SUB1 #P)))) (GREATERP #PEND #P)) (RETURN #C))
((EQ #NAME (STKNAME #P)) (SETQ #C (ADD1 #C))))
(GO LP)))
EXPR)
(DEFPROP ARGPRINT
(LAMBDA(//BREAK1)
(COND
(//BREAK1
(BKPOS #%INDENT)
(PRINC (QUOTE / / / ))
(PRIN1 //BREAK1)
(PRINC (QUOTE / =/ ))
(ERRSET (%PRINFN
(COND ((EQ (SETQ //BREAK1
(COND ((ATOM //BREAK1) (EVALV //BREAK1 (PREVEV (ADD1 LASTPOS))))
((BKEVAL //BREAK1 (PREVEV (ADD1 LASTPOS))))))
(UNBOUND))
(QUOTE UNBOUND))
(//BREAK1)))
ERRORX))))
EXPR)