]> git.jsancho.org Git - gacela.git/blobdiff - gacela.lisp
(no commit message)
[gacela.git] / gacela.lisp
index fb8438b9c9ff674edb540cbbbd7fd0a7cf47ae7e..8517a9c87c41a8d86189dab2e791dd2530123389 100644 (file)
     (when (and socket (si::listen socket)) (push (si:accept socket) clients)))
 
   (defun eval-from-clients ()
-    (dolist (cli clients) (when (si::listen cli) (eval (read cli))))))
+    (dolist (cli clients)
+      (when (si::listen cli)
+       (secure-block cli (eval (read-from-string (read-line cli)))))))
 
+  (defun stop-server ()
+    (when socket
+      (dolist (cli clients) (si::close cli))
+      (si::close socket)
+      (setq socket nil clients nil))))
 
-;;; GaCeLa Functions
-(let (commands)
-  (defun prog-command (command)
-    (setq commands (cons command commands)))
-
-  (defun run-commands ()
-    (cond (commands
-          (let (running)
-            (setq running commands)
-            (setq commands nil)
-            (labels ((run-com (comlst)
-                              (cond (comlst (run-com (cdr comlst))
-                                            (eval (read-from-string (concatenate 'string "(progn " (car comlst) ")")))))))
-                    (run-com running)))))))
 
+;;; GaCeLa Functions
 (let (time (time-per-frame (/ 1000.0 *frames-per-second*)))
   (defun set-frames-per-second (fps)
     (setq time-per-frame (/ 1000.0 fps)))