[Bese-devel] LOOP: FOR clauses should occur before the loop's main body

Pascal Bourguignon pjb at informatimago.com
Wed Apr 12 18:24:36 UTC 2006


In ucw_dev/src/backend/multithread-httpd.lisp:

clisp gives this:
WARNING: LOOP: FOR clauses should occur before the loop's main body

I'd suggest:

(defun httpd-accept-loop (backend)
  (loop
     ;; loop until we get a start message
     (receive
       ((start) (return))))
  (loop
     for stream = (and (socket backend) 
                       (accept-connection (socket backend)
                                          :element-type '(unsigned-byte 8)))
     while (socket backend)
     do (send (control-thread backend)
              'connection
              (make-instance 'pending-request :network-stream stream))))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
You never feed me.
Perhaps I'll sleep on your face.
That will sure show you.



More information about the bese-devel mailing list