summaryrefslogtreecommitdiff
path: root/libguile/posix.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-14 16:14:20 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-14 16:59:25 +0100
commitd6a6989e08a84cbf3c6b11c199536f665cbb6b50 (patch)
treeb444cbd57da811480c67d02125c5ae1e69ddecd1 /libguile/posix.c
parentc2be4e891c8cc085c4eb3f68125c95d86fae856c (diff)
downloadguile-d6a6989e08a84cbf3c6b11c199536f665cbb6b50.tar.gz
Replace `setbinary' by a public `%default-port-encoding' fluid.
* doc/ref/api-evaluation.texi (Character Encoding of Source Files): Add reference to the "Ports" node. * doc/ref/api-io.texi (Ports): Document `%default-port-encoding'. * libguile/ports.c (scm_port_encoding_var): Rename to... (default_port_encoding_var): ... this; update callers. Make `static'. * libguile/posix.c (scm_setbinary): Remove. * libguile/posix.h: Adjust accordingly. * test-suite/tests/numbers.test: Remove unneeded `setbinary' call. * test-suite/tests/ports.test: Replace `setbinary' call by equivalent `%default-port-encoding' mutation and `set-port-encoding!' calls. * test-suite/tests/r6rs-ports.test: Replace `setbinary' call by equivalent `%default-port-encoding' mutation.
Diffstat (limited to 'libguile/posix.c')
-rw-r--r--libguile/posix.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/libguile/posix.c b/libguile/posix.c
index 75469531c..5187ff943 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1554,34 +1554,6 @@ SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0,
}
#undef FUNC_NAME
#endif /* HAVE_SETLOCALE */
-SCM_DEFINE (scm_setbinary, "setbinary", 0, 0, 0,
- (void),
- "Sets the encoding for the current input, output, and error\n"
- "ports to ISO-8859-1. That character encoding allows\n"
- "ports to operate on binary data.\n"
- "\n"
- "It also sets the default encoding for newly created ports\n"
- "to ISO-8859-1.\n"
- "\n"
- "The previous default encoding for new ports is returned\n")
-#define FUNC_NAME s_scm_setbinary
-{
- const char *enc = scm_i_get_port_encoding (SCM_BOOL_F);
-
- /* Set the default encoding for new ports. */
- scm_i_set_port_encoding_x (SCM_BOOL_F, NULL);
- /* Set the encoding for the stdio ports. */
- scm_i_set_port_encoding_x (scm_current_input_port (), NULL);
- scm_i_set_port_encoding_x (scm_current_output_port (), NULL);
- scm_i_set_port_encoding_x (scm_current_error_port (), NULL);
-
- if (enc)
- return scm_from_locale_string (enc);
-
- return scm_from_locale_string ("ISO-8859-1");
-}
-#undef FUNC_NAME
-
#ifdef HAVE_MKNOD
SCM_DEFINE (scm_mknod, "mknod", 4, 0, 0,