2000-11-09 Gary Houston <ghouston@arglist.com>
authorGary Houston <ghouston@arglist.com>
Thu, 9 Nov 2000 22:44:09 +0000 (22:44 +0000)
committerGary Houston <ghouston@arglist.com>
Thu, 9 Nov 2000 22:44:09 +0000 (22:44 +0000)
* ports.c, ports.h (scm_close_all_ports_except): deprecated.
use port-for-each.  Updated its docstring.

libguile/ChangeLog
libguile/ports.c
libguile/ports.h

index 4d7f024..0c93cdb 100644 (file)
@@ -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,
index f6b9eea..d868e29 100644 (file)
@@ -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
 
 \f
 /* Utter miscellany.  Gosh, we should clean this up some time.  */
index 22d69db..9315c9d 100644 (file)
@@ -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 */