Subject: [clisp-list] Bug in peek-char (clisp 2.27)

From: Barry Wilkes <[email-masked]>
Date: Fri Oct 11 11:31:10 2002

I have observed the following behaviour in clisp :

[54]> (with-output-to-string (out)
        (peek-char #\] (make-echo-stream
                (make-string-input-stream "ab cd e df s]") out)))
"ab cd e df s]"
[55]> 

This is not what I would expect to happen.  From the Hyperspec documentation
for peek-char:

 "When input-stream is an echo stream, characters that are only peeked at
are not echoed. In the case that peek-type is not nil, the characters that
are passed by peek-char are treated as if by read-char, and so are echoed
unless they have been marked otherwise by unread-char."

It would appear from the above that clisp does echo characters which
are only peeked at. 

Regards,

Barry.

---

From: Sam Steingold <[email-masked]>
Date: Fri Oct 11 12:53:05 2002

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Bug in peek-char (clisp 2.27)"
> * Sent on 11 Oct 2002 19:13:31 +0100
> * Honorable Barry Wilkes <[email-masked]> writes:
>

Indeed.  (LWL and ACL are correct while CMUCL is even worse than CLISP -
it is wrong even when peek-type is nil).

I just fixed this bug in the CVS.
Thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Your mouse pad is incompatible with MS Windows - your HD will be reformatted.