-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-utils.lisp
38 lines (34 loc) · 1.28 KB
/
app-utils.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
(defpackage :cl-wikidata.app-utils
(:use :cl)
(:export :internal-disable-debugger)
(:export :internal-quit))
(in-package :cl-wikidata.app-utils)
(defun internal-disable-debugger ()
(labels
((internal-exit (c h)
(declare (ignore h))
(format t "~a~%" c)
(internal-quit)))
(setf *debugger-hook* #'internal-exit)))
(defun internal-quit (&optional code)
"Taken from the cliki"
;; This group from "clocc-port/ext.lisp"
#+allegro (excl:exit code)
#+clisp (#+lisp=cl ext:quit #-lisp=cl lisp:quit code)
#+cmu (ext:quit code)
#+cormanlisp (win32:exitprocess code)
#+gcl (lisp:bye code) ; XXX Or is it LISP::QUIT?
#+lispworks (lw:quit :status code)
#+lucid (lcl:quit code)
#+sbcl (sb-ext:exit :code code)
;; This group from Maxima
#+kcl (lisp::bye) ; XXX Does this take an arg?
#+scl (ext:quit code) ; XXX Pretty sure this *does*.
#+(or openmcl mcl) (ccl::quit)
#+abcl (cl-user::quit)
#+ecl (si:quit)
;; This group from <[email protected]>
#+poplog (poplog::bye) ; XXX Does this take an arg?
#-(or allegro clisp cmu cormanlisp gcl lispworks lucid sbcl
kcl scl openmcl mcl abcl ecl)
(error 'not-implemented :proc (list 'quit code)))