GNU bug report logs - #10491
unread-char and eof

Previous Next

Package: guile;

Reported by: Aleix Conchillo Flaqué <aconchillo <at> gmail.com>

Date: Thu, 12 Jan 2012 20:31:02 UTC

Severity: normal

Done: Daniel Hartwig <mandyke <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 10491 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Hartwig <mandyke <at> gmail.com>
To: Aleix Conchillo Flaqué <aconchillo <at> gmail.com>
Cc: 10491 <at> debbugs.gnu.org
Subject: Re: bug#10491: unread-char and eof
Date: Fri, 13 Jan 2012 18:34:39 +0800
On 13 January 2012 04:14, Aleix Conchillo Flaqué <aconchillo <at> gmail.com> wrote:
> Whenever eof is reach in a port, a call to unread-char passing eof
> triggers an error. I'm not sure what's the right behavior for this,
> but I guess the way it is now is just as the user should be
> responsible to check eof.

The user should indeed be checking for this because eof is not a
character, rather, a special value used to indicate that no more data
is available on the port.  This value is not read from the port, it
does not make sense to unread it.

>
> A note in the documentation would help in any case.

Suggestions welcome.  Personally I find the documentation sufficiently
clear on the usage of unread-char only accepting a character value and
equally clear that an eof value is not a character.




This bug report was last modified 13 years and 178 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.