From: Christophe Rhodes Date: Tue, 2 Mar 2004 16:23:21 +0000 (+0000) Subject: 0.8.8.12: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=af296975b301138518c6088ac012818df39abf37;p=sbcl.git 0.8.8.12: PFDFixes ... ECHO-STREAM and end-of-file ... *PRINT-BASE*, *PRINT-RADIX* and ratios --- diff --git a/NEWS b/NEWS index d53b1a0..83d872a 100644 --- a/NEWS +++ b/NEWS @@ -2328,6 +2328,10 @@ changes in sbcl-0.8.9 relative to sbcl-0.8.8: element-type NIL. ** CLEAR-INPUT accepts NIL and T for its (optional) stream argument. + ** Ratios can now be printed correctly with *PRINT-BASE* bound to + 2, 8 or 16. + ** ECHO-STREAMs no longer attempt to echo the end of file value to + their output stream on EOF from read. planned incompatible changes in 0.8.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/src/code/print.lisp b/src/code/print.lisp index 7cd5d36..0989d83 100644 --- a/src/code/print.lisp +++ b/src/code/print.lisp @@ -1163,8 +1163,8 @@ (2 (write-char #\b stream)) (8 (write-char #\o stream)) (16 (write-char #\x stream)) - (t (write *print-base* :stream stream :radix nil :base 10))) - (write-char #\r stream)) + (t (write *print-base* :stream stream :radix nil :base 10) + (write-char #\r stream)))) (let ((*print-radix* nil)) (output-integer (numerator ratio) stream) (write-char #\/ stream) diff --git a/src/code/stream.lisp b/src/code/stream.lisp index 43a7fce..47667bd 100644 --- a/src/code/stream.lisp +++ b/src/code/stream.lisp @@ -921,9 +921,12 @@ (or (pop (echo-stream-unread-stuff stream)) (let* ((in (echo-stream-input-stream stream)) (out (echo-stream-output-stream stream)) - (result (,in-fun in ,@args))) - (,out-fun result out) - result))))) + (result (if eof-error-p + (,in-fun in ,@args) + (,in-fun in nil in)))) + (cond + ((eql result in) eof-value) + (t (,out-fun result out) result))))))) (in-fun echo-in read-char write-char eof-error-p eof-value) (in-fun echo-bin read-byte write-byte eof-error-p eof-value)) diff --git a/version.lisp-expr b/version.lisp-expr index e4d7463..5565e61 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.8.11" +"0.8.8.12"