Add a function to quit the main loop

This commit is contained in:
Renaud Casenave-Péré 2014-01-20 23:08:15 +09:00
parent 282ebf2f44
commit 4a7ecc072c

View file

@ -6,7 +6,8 @@
(in-package :cl-user)
(defpackage stoe
(:use :cl
:utils))
:utils)
(:export :main :quit))
(in-package :stoe)
(defun main-loop (&optional unprotected)
@ -21,6 +22,10 @@ continue unless `unprotected' is t."
(eval-repl)
(sleep 0.01))))))
(defun quit ()
"Quit the main loop."
(throw 'exit-main-loop nil))
(defun main (&optional argv)
"Run the program."
(modules:initialize argv)