guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-96-gbfb85d


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-96-gbfb85df
Date: Fri, 11 Mar 2011 19:59:48 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=bfb85df7084e26a276142cdc62315a85c7a0ba20

The branch, stable-2.0 has been updated
       via  bfb85df7084e26a276142cdc62315a85c7a0ba20 (commit)
      from  06fc34c23f2c6987ba1dc8cbf5a084ff24a83e53 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit bfb85df7084e26a276142cdc62315a85c7a0ba20
Author: Andy Wingo <address@hidden>
Date:   Fri Mar 11 20:53:13 2011 +0100

    fix port-filename without readline to match the docs
    
    * libguile/init.c (stream_body, scm_standard_stream_to_port): Don't name
      stdin, stdout, and stderr -- at least not as strings.  That confuses
      any code which tries to treat port-filename as a real filename, like
      the syntax expander, or the `load' procedure/macro.  Also this
      behavior matches the docs now.

-----------------------------------------------------------------------

Summary of changes:
 libguile/init.c |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/libguile/init.c b/libguile/init.c
index 9b8c4d0..d6a7105 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -157,7 +157,6 @@ typedef struct
 {
   int fdes;
   char *mode;
-  char *name;
 } stream_body_data;
 
 /* proc to be called in scope of exception handler stream_handler. */
@@ -165,8 +164,7 @@ static SCM
 stream_body (void *data)
 {
   stream_body_data *body_data = (stream_body_data *) data;
-  SCM port = scm_fdes_to_port (body_data->fdes, body_data->mode,
-                              scm_from_locale_string (body_data->name));
+  SCM port = scm_fdes_to_port (body_data->fdes, body_data->mode, SCM_BOOL_F);
 
   SCM_REVEALED (port) = 1;
   return port;
@@ -182,21 +180,19 @@ stream_handler (void *data SCM_UNUSED,
 }
 
 /* Convert a file descriptor to a port, using scm_fdes_to_port.
-   - NAME is a C string, not a Guile string
    - set the revealed count for FILE's file descriptor to 1, so
    that fdes won't be closed when the port object is GC'd.
    - catch exceptions: allow Guile to be able to start up even
    if it has been handed bogus stdin/stdout/stderr.  replace the
    bad ports with void ports.  */
 static SCM
-scm_standard_stream_to_port (int fdes, char *mode, char *name)
+scm_standard_stream_to_port (int fdes, char *mode)
 {
   SCM port;
   stream_body_data body_data;
 
   body_data.fdes = fdes;
   body_data.mode = mode;
-  body_data.name = name;
   port = scm_internal_catch (SCM_BOOL_T, stream_body, &body_data, 
                             stream_handler, NULL);
   if (scm_is_false (port))
@@ -223,17 +219,11 @@ scm_init_standard_ports ()
      block buffering for higher performance.  */
 
   scm_set_current_input_port 
-    (scm_standard_stream_to_port (0, 
-                                 isatty (0) ? "r0" : "r",
-                                 "standard input"));
+    (scm_standard_stream_to_port (0, isatty (0) ? "r0" : "r"));
   scm_set_current_output_port
-    (scm_standard_stream_to_port (1,
-                                 isatty (1) ? "w0" : "w",
-                                 "standard output"));
+    (scm_standard_stream_to_port (1, isatty (1) ? "w0" : "w"));
   scm_set_current_error_port
-    (scm_standard_stream_to_port (2,
-                                 isatty (2) ? "w0" : "w",
-                                 "standard error"));
+    (scm_standard_stream_to_port (2, isatty (2) ? "w0" : "w"));
 }
 
 


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]