File: loader.lisp

package info (click to toggle)
sbcl 2%3A2.5.8-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 50,756 kB
  • sloc: lisp: 516,661; ansic: 41,216; sh: 5,634; asm: 2,290; pascal: 717; makefile: 431; cpp: 27
file content (18 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(defun load-sbcl-file (file &optional (exit t))
  (labels ((exit-sbcl (code)
             #+sbcl #.(if (eq :external
                              (nth-value 1 (find-symbol "EXIT" :sb-ext)))
                          `(,(find-symbol "EXIT" :sb-ext) :code code)
                          `(,(find-symbol "QUIT" :sb-ext) :unix-status code))
             #+ccl (ccl:quit code)
             #+abcl (ext:quit :status code)
             #+cmucl (unix:unix-exit code)
             #+ecl (si:quit code)
             #+clisp (ext:quit code)
             (return-from load-sbcl-file)))
    (restart-case
        (load file)
      (abort-build ()
        :report "Abort building SBCL."
        (exit-sbcl 1)))
    (when exit (exit-sbcl 0))))