(FILECREATED " 8-Feb-86 15:21:50" {DSK}<LISPFILES2>IMPROVEDDCOMS>ERROR.;1 2801   

      changes to:  (VARS ERRORCOMS))


(* Copyright (c) 1986 by Quintus Computer Systems, Inc. All rights reserved.)

(PRETTYCOMPRINT ERRORCOMS)

(RPAQQ ERRORCOMS ((ADDVARS (GLOBALVARS QP.LAST.ERROR.CULPRIT2) (GLOBALVARS QP.LAST.ERROR.CULPRIT) (
GLOBALVARS QP.LAST.ERROR.NUMBER) (GLOBALVARS QP.ERROR.TABLE.SIZE) (GLOBALVARS QP.ERROR.TABLE)) (VARS (
QP.ERROR.TABLE.SIZE 100)) (MACROS QP.ERROR.PRINT) (FNS QP.DELIVER.ERRORS QP.ERROR QP.ERROR.EVENT 
QP.FATAL.ERROR QP.INIT.ERROR QP.MAKE.REMARK QP.NERROR QP.NERROR2)))

(ADDTOVAR GLOBALVARS QP.LAST.ERROR.CULPRIT2)

(ADDTOVAR GLOBALVARS QP.LAST.ERROR.CULPRIT)

(ADDTOVAR GLOBALVARS QP.LAST.ERROR.NUMBER)

(ADDTOVAR GLOBALVARS QP.ERROR.TABLE.SIZE)

(ADDTOVAR GLOBALVARS QP.ERROR.TABLE)

(RPAQQ QP.ERROR.TABLE.SIZE 100)
(DECLARE: EVAL@COMPILE 
(PUTPROPS QP.ERROR.PRINT MACRO (**MACROARG** (LET ((OUTPUT.STRING (CAR (NTH **MACROARG** 1)))) (BQUOTE
 (PROGN (PRINTOUT (QIO.STREAM QP.STANDARD.ERROR) (\, OUTPUT.STRING)))))))
)
(DEFINEQ

(QP.DELIVER.ERRORS
(LAMBDA (CODEP CULP1 CULP2) (SETQ QP.LAST.ERROR.NUMBER 0) (VALUES CODEP CULP1 CULP2)))

(QP.ERROR
(LAMBDA (MESSAGE) (PRINTOUT (QIO.STREAM QP.STANDARD.ERROR) 0 "[ Error: " MESSAGE " ]" 0) (
QP.PROLOG.EVENT (QUOTE EV←ABORT))))

(QP.ERROR.EVENT
(LAMBDA (EVENT) (SELECTQ EVENT (EV←OVSTACK (QUOTE OV←STACK)) (EV←OVHEAP (QUOTE OV←HEAP)) (EV←OVTRAIL (
QUOTE OV←TRAIL)) (EV←OVPDL (QUOTE OV←PDL)) (EV←OVATOMSYM (QUOTE OV←SYMATOM)) (EV←OVPROCSYM (QUOTE 
OV←SYMPROC)) (EV←OVCODE (QUOTE OV←CODE)) (QUOTE SI←INVEV))))

(QP.FATAL.ERROR
(LAMBDA (MESSAGE) (PRINTOUT (QIO.STREAM QP.STANDARD.ERROR) 0 "[ FATAL ERROR: " MESSAGE " ]" 0 
"[ Exit ]" 0) (QP.EXIT -1)))

(QP.INIT.ERROR
(LAMBDA NIL (SETQ QP.LAST.ERROR.NUMBER 0) (SETQ QP.LAST.ERROR.CULPRIT (QUOTE NOCULPRIT)) (SETQ 
QP.LAST.ERROR.CULPRIT2 (QUOTE NOCULPRIT))))

(QP.MAKE.REMARK
(LAMBDA (SECURE) (if (EQ SECURE -1) then (QP.ERROR.PRINT 
"
[ Prolog cannot find the codes file - see your system manager ]
  ") else (QP.ERROR.PRINT 
"
[ Quintus Prolog is not licensed for this machine ]
[ See your system manager and contact Quintus to extend your license ]"))))

(QP.NERROR
(LAMBDA (ERROR.HANDLE CULPRIT) (SETQ QP.LAST.ERROR.NUMBER (GETHASH ERROR.HANDLE QP.ERROR.TABLE)) (SETQ
 QP.LAST.ERROR.CULPRIT CULPRIT) (SETQ QP.LAST.ERROR.CULPRIT2 (QUOTE NOCULPRIT)) (QP.PROLOG.EVENT (
QUOTE EV←ERROR))))

(QP.NERROR2
(LAMBDA (ERROR.HANDLE CULPRIT CULPRIT2) (SETQ QP.LAST.ERROR.NUMBER (GETHASH ERROR.HANDLE 
QP.ERROR.TABLE)) (SETQ QP.LAST.ERROR.CULPRIT CULPRIT) (SETQ QP.LAST.ERROR.CULPRIT2 CULPRIT2) (
QP.PROLOG.EVENT (QUOTE EV←ERROR))))
)
(PUTPROPS ERROR COPYRIGHT ("Quintus Computer Systems, Inc" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (1084 2713 (QP.DELIVER.ERRORS 1094 . 1203) (QP.ERROR 1205 . 1345) (QP.ERROR.EVENT 1347
 . 1629) (QP.FATAL.ERROR 1631 . 1774) (QP.INIT.ERROR 1776 . 1934) (QP.MAKE.REMARK 1936 . 2236) (
QP.NERROR 2238 . 2473) (QP.NERROR2 2475 . 2711)))))
STOP