/[slime]/slime/swank-cmucl.lisp
ViewVC logotype

Diff of /slime/swank-cmucl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.78 by heller, Sun Mar 7 16:41:11 2004 UTC revision 1.79 by heller, Mon Mar 8 23:45:19 2004 UTC
# Line 24  Line 24 
24               :format-control "Trying to read characters from a binary stream."))               :format-control "Trying to read characters from a binary stream."))
25      ;; Let's go as low level as it seems reasonable.      ;; Let's go as low level as it seems reasonable.
26      (let* ((numbytes (- end start))      (let* ((numbytes (- end start))
27             (bytes-read (system:read-n-bytes stream s start numbytes t)))             (total-bytes 0))
28        (if (< bytes-read numbytes)        ;; read-n-bytes may return fewer bytes than requested, so we need
29            (+ start bytes-read)        ;; to keep trying.
30            end)))        (loop while (plusp numbytes) do
31                (let ((bytes-read (system:read-n-bytes stream s start numbytes nil)))
32                  (when (zerop bytes-read)
33                    (return-from read-into-simple-string total-bytes))
34                  (incf total-bytes bytes-read)
35                  (incf start bytes-read)
36                  (decf numbytes bytes-read)))
37          total-bytes))
38    
39    (let ((s (find-symbol (string :*enable-package-locked-errors*) :lisp)))    (let ((s (find-symbol (string :*enable-package-locked-errors*) :lisp)))
40      (when s      (when s

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

  ViewVC Help
Powered by ViewVC 1.1.5