Re: Buffered stream output bug report

Raymond Toy <[email protected]>
Newsgroups gmane.lisp.cmucl.general
Message-ID <[email protected]>
Steven Edwards wrote:
> Banner:
>
> CMU Common Lisp 19e (19E), running on gail
> With core: /Users/sje/cmucl-19e-x86-darwin/lib/cmucl/lib/lisp.core
> Dumped on: Thu, 2008-05-01 20:38:02-04:00 on macmini
> See <http://www.cons.org/cmucl/> for support information.
> Loaded subsystems:
>    Python 1.1, target Intel x86
>    CLOS based on Gerd's PCL 2004/04/14 03:32:47
>
>
> Three related bugs:
>
> (defun bug0 (my-stream)
>  (write-char #\1 my-stream)
>  (format my-stream "~D" 2)
>  (write-char #\3 my-stream))
>
Let's see.  CLHS says for write-char, T means *terminal-io*.  And T for
format means *standard-output*.  Hence, write-char and format send their
output to different places.  On cmucl,  *standard-output* and
*terminal-io* are different streams.  Looking at the stream objects,
they go to different Unix file descriptors, and the file descriptors are
different.

For all the tests you provide, if you specify *standard-output*, you get
the results you want.  I guess gcl and clisp have *terminal-io* and
*standard-output* being essentially the same stream.

I think this is allowed behavior.

Ray, who hopes he got this right.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.