projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.6.28:
[sbcl.git]
/
src
/
code
/
fd-stream.lisp
diff --git
a/src/code/fd-stream.lisp
b/src/code/fd-stream.lisp
index
cc71851
..
2fbafbf
100644
(file)
--- a/
src/code/fd-stream.lisp
+++ b/
src/code/fd-stream.lisp
@@
-214,6
+214,11
@@
(+ (fd-stream-obuf-tail stream)
,size))
(flush-output-buffer stream)))
(+ (fd-stream-obuf-tail stream)
,size))
(flush-output-buffer stream)))
+ ,(unless (eq (car buffering) :none)
+ `(when (> (fd-stream-ibuf-tail stream)
+ (fd-stream-ibuf-head stream))
+ (file-position stream (file-position stream))))
+
,@body
(incf (fd-stream-obuf-tail stream) ,size)
,(ecase (car buffering)
,@body
(incf (fd-stream-obuf-tail stream) ,size)
,(ecase (car buffering)
@@
-305,6
+310,9
@@
(let ((start (or start 0))
(end (or end (length (the (simple-array * (*)) thing)))))
(declare (type index start end))
(let ((start (or start 0))
(end (or end (length (the (simple-array * (*)) thing)))))
(declare (type index start end))
+ (when (> (fd-stream-ibuf-tail fd-stream)
+ (fd-stream-ibuf-head fd-stream))
+ (file-position fd-stream (file-position fd-stream)))
(let* ((len (fd-stream-obuf-length fd-stream))
(tail (fd-stream-obuf-tail fd-stream))
(space (- len tail))
(let* ((len (fd-stream-obuf-length fd-stream))
(tail (fd-stream-obuf-tail fd-stream))
(space (- len tail))
@@
-871,7
+879,6
@@
(:element-type
(fd-stream-element-type fd-stream))
(:interactive-p
(:element-type
(fd-stream-element-type fd-stream))
(:interactive-p
- ;; FIXME: sb!unix:unix-isatty is undefined.
(= 1 (the (member 0 1)
(sb!unix:unix-isatty (fd-stream-fd fd-stream)))))
(:line-length
(= 1 (the (member 0 1)
(sb!unix:unix-isatty (fd-stream-fd fd-stream)))))
(:line-length
@@
-1226,7
+1233,7
@@
(open-error "~@<The path ~2I~_~S ~I~_does not exist.~:>"
pathname))
(t nil)))
(open-error "~@<The path ~2I~_~S ~I~_does not exist.~:>"
pathname))
(t nil)))
- ((and (eql errno sb!unix:eexist) if-exists)
+ ((and (eql errno sb!unix:eexist) (null if-exists))
nil)
(t
(vanilla-open-error)))))))))
nil)
(t
(vanilla-open-error)))))))))