[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/02: Revert "Add 'set-port-binary/text-mode!' procedur
From: |
Jan Nieuwenhuizen |
Subject: |
[Guile-commits] 01/02: Revert "Add 'set-port-binary/text-mode!' procedure for MinGW." |
Date: |
Tue, 13 Apr 2021 09:04:27 -0400 (EDT) |
janneke pushed a commit to branch wip-mingw
in repository guile.
commit 237a3a051bb8ef75135aaff236213e0f072e1a9f
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Apr 13 15:03:57 2021 +0200
Revert "Add 'set-port-binary/text-mode!' procedure for MinGW."
This reverts commit 57de0742475e128bd1bc71957b3e73ff29648ded.
---
doc/ref/api-io.texi | 13 -------------
libguile/ports.c | 42 ------------------------------------------
libguile/ports.h | 1 -
module/ice-9/ports.scm | 1 -
4 files changed, 57 deletions(-)
diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi
index aee4525..87d4af4 100644
--- a/doc/ref/api-io.texi
+++ b/doc/ref/api-io.texi
@@ -1143,19 +1143,6 @@ source of data, but only the value that is returned by
Determine whether @var{obj} is a port that is related to a file.
@end deffn
-@deffn {Scheme Procedure} set-port-binary/text-mode! port mode
-On MinGW, set the binary/text mode for @var{port}. @var{mode} can be one
-of the following:
-@table @code
-@item O_BINARY
-binary mode
-@item O_TEXT
-text mode
-@end table
-
-Only open file ports are supported. On POSIX, this is a no-op.
-@end deffn
-
@node Bytevector Ports
@subsubsection Bytevector Ports
diff --git a/libguile/ports.c b/libguile/ports.c
index be6b4bc..c25c207 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -4134,41 +4134,6 @@ SCM_DEFINE (scm_sys_make_void_port, "%make-void-port",
1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE (scm_set_port_binary_text_mode_x, "set-port-binary/text-mode!", 2,
0, 0,
- (SCM port, SCM mode),
- "On MinGW, set the binary/text mode for @var{port}. @var{mode} can
be one\n"
- "of the following:\n"
- "@table @code\n"
- "@item O_BINARY\n"
- "binary mode\n"
- "@item O_TEXT\n"
- "text mode\n"
- "@end table\n\n"
- "Only open file ports are supported. On POSIX, this is a no-op.")
-#define FUNC_NAME s_scm_set_port_binary_text_mode_x
-{
- int cmode = 0;
- int fd;
-
- if (scm_is_integer (port))
- fd = scm_to_int (port);
- else
- {
- SCM_VALIDATE_OPFPORT (1, port);
- fd = SCM_FPORT_FDES (port);
- }
-
- SCM_VALIDATE_NUMBER (2, mode);
- cmode = scm_to_int (mode);
-
-#if __MINGW32__
- _setmode (fd, cmode);
-#endif
-
- return SCM_UNSPECIFIED;
-}
-#undef FUNC_NAME
-
@@ -4208,13 +4173,6 @@ scm_init_ports (void)
sym_escape = scm_from_latin1_symbol ("escape");
sym_error = scm_from_latin1_symbol ("error");
-#ifdef O_BINARY
- scm_c_define ("O_BINARY", scm_from_int (O_BINARY));
-#endif
-#ifdef O_TEXT
- scm_c_define ("O_TEXT", scm_from_int (O_TEXT));
-#endif
-
trampoline_to_c_read_subr =
scm_c_make_gsubr ("port-read", 4, 0, 0,
(scm_t_subr) trampoline_to_c_read);
diff --git a/libguile/ports.h b/libguile/ports.h
index c40b18d..44ef29d 100644
--- a/libguile/ports.h
+++ b/libguile/ports.h
@@ -218,7 +218,6 @@ SCM_API SCM scm_drain_input (SCM port);
SCM_API void scm_end_input (SCM port);
SCM_API SCM scm_force_output (SCM port);
SCM_API void scm_flush (SCM port);
-SCM_API SCM scm_set_binary_text_mode_x (SCM port, SCM mode);
SCM_INTERNAL SCM scm_port_random_access_p (SCM port);
SCM_INTERNAL SCM scm_port_read_buffering (SCM port);
diff --git a/module/ice-9/ports.scm b/module/ice-9/ports.scm
index 6252845..b219fee 100644
--- a/module/ice-9/ports.scm
+++ b/module/ice-9/ports.scm
@@ -69,7 +69,6 @@
port-for-each
flush-all-ports
%make-void-port
- set-port-binary/text-mode!
;; Definitions from fports.c.
open-file