From ac012a27a2e3c28f191d2c38b3d1ab1ef70ba8ba Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 28 Feb 2011 20:53:40 +0100 Subject: [PATCH] update port-filename docs * doc/ref/api-io.texi (File Ports): * libguile/ports.c (scm_port_filename): Fix docs to match implementation. --- doc/ref/api-io.texi | 5 ++--- libguile/ports.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index 52dfdd4fe..6a50424a4 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -949,9 +949,8 @@ used only during port creation are not retained. @deffn {Scheme Procedure} port-filename port @deffnx {C Function} scm_port_filename (port) -Return the filename associated with @var{port}. This function returns -the strings "standard input", "standard output" and "standard error" -when called on the current input, output and error ports respectively. +Return the filename associated with @var{port}, or @code{#f} if no +filename is associated with the port. @var{port} must be open, @code{port-filename} cannot be used once the port is closed. diff --git a/libguile/ports.c b/libguile/ports.c index 6a51ddc3c..a48cc8607 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1942,9 +1942,8 @@ SCM_DEFINE (scm_set_port_column_x, "set-port-column!", 2, 0, 0, SCM_DEFINE (scm_port_filename, "port-filename", 1, 0, 0, (SCM port), - "Return the filename associated with @var{port}. This function returns\n" - "the strings \"standard input\", \"standard output\" and \"standard error\"\n" - "when called on the current input, output and error ports respectively.") + "Return the filename associated with @var{port}, or @code{#f}\n" + "if no filename is associated with the port.") #define FUNC_NAME s_scm_port_filename { port = SCM_COERCE_OUTPORT (port);