diff options
-rw-r--r-- | libguile/ChangeLog | 5 | ||||
-rw-r--r-- | libguile/ports.c | 11 | ||||
-rw-r--r-- | libguile/ports.h | 3 |
3 files changed, 15 insertions, 4 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 4d7f024b9..0c93cdbe9 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2000-11-09 Gary Houston <ghouston@arglist.com> + + * ports.c, ports.h (scm_close_all_ports_except): deprecated. + use port-for-each. Updated its docstring. + 2000-11-07 Gary Houston <ghouston@arglist.com> * ports.c (scm_port_for_each): new proc. implements port-for-each, diff --git a/libguile/ports.c b/libguile/ports.c index f6b9eeaff..d868e2971 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -688,12 +688,16 @@ SCM_DEFINE (scm_port_for_each, "port-for-each", 1, 0, 0, } #undef FUNC_NAME +#if (SCM_DEBUG_DEPRECATED == 0) + SCM_DEFINE (scm_close_all_ports_except, "close-all-ports-except", 0, 0, 1, (SCM ports), - "Close all open file ports used by the interpreter\n" + "[DEPRECATED] Close all open file ports used by the interpreter\n" "except for those supplied as arguments. This procedure\n" - "is intended to be used before an exec call to close file descriptors\n" - "which are not needed in the new process.") + "was intended to be used before an exec call to close file descriptors\n" + "which are not needed in the new process. However it has the\n" + "undesirable side-effect of flushing buffes, so it's deprecated.\n" + "Use port-for-each instead.") #define FUNC_NAME s_scm_close_all_ports_except { int i = 0; @@ -723,6 +727,7 @@ SCM_DEFINE (scm_close_all_ports_except, "close-all-ports-except", 0, 0, 1, } #undef FUNC_NAME +#endif /* Utter miscellany. Gosh, we should clean this up some time. */ diff --git a/libguile/ports.h b/libguile/ports.h index 22d69db47..9315c9d9f 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -267,7 +267,6 @@ extern SCM scm_close_input_port (SCM port); extern SCM scm_close_output_port (SCM port); extern SCM scm_close_port (SCM port); extern SCM scm_port_for_each (SCM proc); -extern SCM scm_close_all_ports_except (SCM ports); extern SCM scm_input_port_p (SCM x); extern SCM scm_output_port_p (SCM x); extern SCM scm_port_p (SCM x); @@ -316,6 +315,8 @@ extern SCM scm_pt_member (SCM member); #define SCM_INPORTP(x) SCM_INPUT_PORT_P (x) #define SCM_OUTPORTP(x) SCM_OUTPUT_PORT_P (x) +extern SCM scm_close_all_ports_except (SCM ports); + #endif /* SCM_DEBUG_DEPRECATED == 0 */ #endif /* PORTSH */ |