summaryrefslogtreecommitdiff
path: root/libguile/posix.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2011-02-10 22:50:51 +0100
committerLudovic Courtès <ludo@gnu.org>2011-02-10 23:04:43 +0100
commit9d9c66ba82217a3c96febda51cc9ddbb5f8ce3e3 (patch)
treec639dd8edc39f7d82704aaec0b51c6197dc80ac7 /libguile/posix.c
parent064c27c4ef8987218e01a2a7dd9c51c9c88ef50b (diff)
downloadguile-9d9c66ba82217a3c96febda51cc9ddbb5f8ce3e3.tar.gz
Add `scm_i_set_default_port_encoding' and `scm_i_default_port_encoding'.
* libguile/ports.c (scm_i_set_default_port_encoding, scm_i_default_port_encoding): New function. Replace `scm_i_set_port_encoding_x' and `scm_i_get_port_encoding' with PORT == SCM_BOOL_F. (scm_i_set_port_encoding_x): Assume PORT is a port. (scm_i_get_port_encoding): Remove. (scm_port_encoding): Adjust accordingly. (scm_new_port_table_entry): Use `scm_i_default_port_encoding'. * libguile/ports.h (scm_i_get_port_encoding): Remove declarations. (scm_i_default_port_encoding, scm_i_set_default_port_encoding): New declarations. * libguile/posix.c (setlocale): Use `scm_i_set_default_port_encoding'.
Diffstat (limited to 'libguile/posix.c')
-rw-r--r--libguile/posix.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libguile/posix.c b/libguile/posix.c
index 939e2488d..97e30df2b 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1631,8 +1631,10 @@ SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0,
}
enc = locale_charset ();
+
/* Set the default encoding for new ports. */
- scm_i_set_port_encoding_x (SCM_BOOL_F, enc);
+ scm_i_set_default_port_encoding (enc);
+
/* Set the encoding for the stdio ports. */
scm_i_set_port_encoding_x (scm_current_input_port (), enc);
scm_i_set_port_encoding_x (scm_current_output_port (), enc);