X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-simple-streams%2Fimpl.lisp;h=07732f32009acba532bc430250b036eed85e7072;hb=2d93dc5eb5e9a1c93b2163af83f427f83ae2095e;hp=d3e3293905b36c5221535f5496b653e3ffa625bd;hpb=f7e3e709f7c2207f1923375942f7fb1c092f92b0;p=sbcl.git diff --git a/contrib/sb-simple-streams/impl.lisp b/contrib/sb-simple-streams/impl.lisp index d3e3293..07732f3 100644 --- a/contrib/sb-simple-streams/impl.lisp +++ b/contrib/sb-simple-streams/impl.lisp @@ -126,7 +126,7 @@ (if (typep stream 'file-simple-stream) (with-stream-class (file-simple-stream stream) (setf (sm pathname stream) new-name) - (setf (sm filename stream) (sb-int:unix-namestring new-name nil)) + (setf (sm filename stream) (file-namestring new-name)) t) nil)) @@ -584,10 +584,12 @@ (index (or start 0) (1+ index)) (end (or end (* (length vector) (vector-elt-width vector)))) (endian-swap (endian-swap-value vector endian-swap)) - (byte (read-byte-internal encap nil nil t) - (read-byte-internal encap nil nil nil))) - ((or (null byte) (>= index end)) index) - (setf (bref vector (logxor index endian-swap)) byte)))))) + (flag t nil)) + ((>= index end) index) + (let ((byte (read-byte-internal encap nil nil flag))) + (unless byte + (return index)) + (setf (bref vector (logxor index endian-swap)) byte))))))) ((or ansi-stream fundamental-stream) (unless (typep vector '(or string (simple-array (signed-byte 8) (*)) @@ -1097,7 +1099,7 @@ is supported only on simple-streams." (cond (new-name (setf (sb-impl::fd-stream-pathname stream) new-name) (setf (sb-impl::fd-stream-file stream) - (sb-int:unix-namestring new-name nil)) + (file-namestring new-name)) t) (t (sb-impl::fd-stream-pathname stream))))))