From: jsancho Date: Sun, 6 Dec 2009 08:39:04 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=6bb158a2df19ab3f72322b47ad76084f205c1196;p=gacela.git --- diff --git a/gacela.lisp b/gacela.lisp index 9f56389..f207e4b 100644 --- a/gacela.lisp +++ b/gacela.lisp @@ -65,10 +65,6 @@ (init-video-mode) (fill-surface screen (getf color :red) (getf color :green) (getf color :blue))) - (defun flip () - (cond ((null screen) nil) - (t (SDL_Flip screen)))) - (defun quit-video-mode () (setq screen nil))) @@ -220,14 +216,25 @@ (cond ((listen server-socket) (setq clients (cons (si::accept server-socket) clients))))) (defun eval-from-skin () - - (when (si::listen socket) - (secure-block socket (eval (read socket))))) - - (defun stop-skin-client () - (when socket - (si::close socket) - (setq socket nil)))) + (labels ((eval-clients (cli-socks) + (cond (cli-socks + (let ((cli (car cli-socks))) + (cond ((si::listen cli) + (secure-block cli (eval (read cli))) + (si::close cli) + (eval-clients (cdr cli-socks))) + (t + (cons cli (eval-clients (cdr cli-socks)))))))))) + (setq clients (eval-clients clients)))) + + (defun stop-skin-server () + (cond (server-socket (si::close server-socket) (setq server-socket nil))) + (cond (clients + (labels ((close-clients (cli-socks) + (si::close (car cli-socks)) + (close-clients (cdr cli-socks)))) + (close-clients clients)) + (setq clients nil))))) ;;; GaCeLa Functions