GNU bug report logs -
#67063
unread-string does not match documented functionality
Previous Next
Reported by: Juliana Sims <juli <at> incana.org>
Date: Sat, 11 Nov 2023 04:23:01 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Mon, 06 May 2024 11:49:34 +0200
with message-id <87r0efl175.fsf_-_ <at> gnu.org>
and subject line Re: bug#67063: unread-string does not match documented functionality
has caused the debbugs.gnu.org bug report #67063,
regarding unread-string does not match documented functionality
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
67063: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=67063
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hello,
The procedure unread-string is documented to only optionally accept a
port argument, but the implementation in fact requries it.
I've written a patch to resolve this and will be sending it along
shortly.
Thanks,
Juli
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Hi Juliana,
Juliana Sims <juli <at> incana.org> skribis:
> This patch simply fixes bug 67063.
>
> Thanks,
> Juli
>
> * doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
> procedure documentation in line with other procedures in the section.
> * libguile/ports.c (scm_unread_string): Make port argument optional.
> * test-suite/tests/ports.test: Test unread-char and unread-string
> without ports.
Finally applied with these changes:
[Message part 5 (text/x-patch, inline)]
diff --git a/NEWS b/NEWS
index 8a61bf65d..3c4854ca9 100644
--- a/NEWS
+++ b/NEWS
@@ -59,6 +59,8 @@ files. See "Random Access" in the manual for details.
(<https://bugs.gnu.org/55356>)
** 'read-u8' in (scheme base) now defaults to (current-input-port)
(<https://bugs.gnu.org/62690>)
+** Second argument of 'unread-string' is now optional, as previously documented
+ (<https://bugs.gnu.org/67063>)
** 'ftw' now correctly deals with directory permissions
(<https://bugs.gnu.org/55344>)
** 'make-custom-port' now honors its #:conversion-strategy argument
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index 3a0f7a9a1..79bc9e9d6 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -2001,6 +2001,7 @@ current input port, and the arguments are swapped. @xref{Textual I/O}.
@end deffn
@deffn {Scheme Procedure} unread-string str [port]
+@deffnx {C Function} scm_unread_string (str, port)
The same as @code{unget-string}, except that @var{port} defaults to the
current input port, and the arguments are swapped. @xref{Textual I/O}.
@end deffn
[Message part 6 (text/plain, inline)]
Not sure why the C functions aren’t documented for the other ones.
Thanks,
Ludo’.
This bug report was last modified 1 year and 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.