summaryrefslogtreecommitdiff
path: root/guile-readline
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2013-01-15 14:41:26 +0100
committerAndy Wingo <wingo@pobox.com>2013-01-15 16:32:17 +0100
commit08467a7e6116de5e21e9622b79657e113ce4b072 (patch)
treecea07109be9e1f95b73a8ec7f42bb01f5721adee /guile-readline
parent99d716b6f681f5d39288efffd0ee534bb9866fa9 (diff)
add scm_from_port_string and friends
* doc/ref/api-data.texi (Conversion to/from C): * libguile/strings.h: * libguile/strings.c (scm_from_port_string, scm_from_port_stringn): (scm_to_port_string, scm_to_port_stringn): New functions. * guile-readline/readline.c (internal_readline): * libguile/strports.c (scm_strport_to_string): * libguile/read.c (scm_read_number, scm_read_mixed_case_symbol): (scm_read_number_and_radix, scm_read_character): Use the new functions.
Diffstat (limited to 'guile-readline')
-rw-r--r--guile-readline/readline.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index 0e4ad2902..1e697eb5d 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -1,6 +1,6 @@
/* readline.c --- line editing support for Guile */
-/* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2000,2001, 2002, 2003, 2006, 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -257,12 +257,7 @@ internal_readline (SCM text)
promptp = 1;
s = readline (prompt);
if (s)
- {
- scm_t_port *pt = SCM_PTAB_ENTRY (output_port);
-
- ret = scm_from_stringn (s, strlen (s), pt->encoding,
- SCM_FAILED_CONVERSION_ESCAPE_SEQUENCE);
- }
+ ret = scm_from_port_string (s, output_port);
else
ret = SCM_EOF_VAL;