From: Kevin M. Rosenberg Date: Thu, 11 Nov 2004 21:58:12 +0000 (+0000) Subject: r10151: updates X-Git-Tag: v1.96~46 X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=commitdiff_plain;h=ea921dd2ce51a46bb3ca92a07df095d5ace99dcf r10151: updates --- diff --git a/io.lisp b/io.lisp index aedca99..4f896ed 100644 --- a/io.lisp +++ b/io.lisp @@ -45,7 +45,7 @@ (defun read-file-to-usb8-array (file) "Opens a reads a file. Returns the contents as single unsigned-byte array" - (with-open-file (in file :direction :input) + (with-open-file (in file :direction :input :element-type '(unsigned-byte 8)) (let* ((file-len (file-length in)) (usb8 (make-array file-len :element-type '(unsigned-byte 8))) (pos (read-sequence usb8 in))) @@ -322,7 +322,7 @@ (write-char #\: stream) (write-string (aref +datetime-number-strings+ minute) stream))) -(defun copy-binary-stream (in out &key (chunk-size 4096)) +(defun copy-binary-stream (in out &key (chunk-size 16384)) (do* ((buf (make-array chunk-size :element-type '(unsigned-byte 8))) (pos (read-sequence buf in) (read-sequence buf in))) ((zerop pos)) diff --git a/lists.lisp b/lists.lisp index c18fe7e..dfa9d38 100644 --- a/lists.lisp +++ b/lists.lisp @@ -199,3 +199,5 @@ (unless (find value uniq :test test) (push value uniq)))))) + + diff --git a/processes.lisp b/processes.lisp index f89d010..88aa051 100644 --- a/processes.lisp +++ b/processes.lisp @@ -43,7 +43,7 @@ #+lispworks `(mp:with-lock (,lock) ,@body) #+sb-thread - `(sb-thread:with-recursive-lock (,lock) ,@body) + `(sb-thread:with-mutex (,lock) ,@body) #-(or allegro cmu lispworks sb-thread) `(progn ,@body) ) diff --git a/sockets.lisp b/sockets.lisp index 2fa8547..f105501 100644 --- a/sockets.lisp +++ b/sockets.lisp @@ -117,7 +117,6 @@ setsockopt SO_REUSEADDR if :reuse is not nil" (defun close-active-socket (socket) (close socket)) -#+sbcl (defun ipaddr-to-dotted (ipaddr &key values) "Convert from 32-bit integer to dotted string." (declare (type (unsigned-byte 32) ipaddr)) @@ -129,7 +128,6 @@ setsockopt SO_REUSEADDR if :reuse is not nil" (values a b c d) (format nil "~d.~d.~d.~d" a b c d)))) -#+sbcl (defun dotted-to-ipaddr (dotted &key (errorp t)) "Convert from dotted string to 32-bit integer." (declare (string dotted))