Document scm_with_current_<foo>_port.
authorMarius Vollmer <mvo@zagadka.de>
Sun, 4 Jan 2004 23:44:19 +0000 (23:44 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Sun, 4 Jan 2004 23:44:19 +0000 (23:44 +0000)
doc/ref/scheme-io.texi

index 54688c0..58deaf9 100644 (file)
@@ -634,6 +634,18 @@ Change the ports returned by @code{current-input-port},
 so that they use the supplied @var{port} for input or output.
 @end deffn
 
+@deftypefn {C Function} void scm_with_current_input_port (SCM port)
+@deftypefnx {C Function} void scm_with_current_output_port (SCM port)
+@deftypefnx {C Function} void scm_with_current_error_port (SCM port)
+These functions must be used inside a pair of calls to
+@code{scm_begin_frame} and @code{scm_end_frame} (@pxref{Frames}).
+During the dynamic extent of the frame, the indicated port is set to
+@var{port}.
+
+More precisely, the the current port is saved when the dynamic extent is
+entered and set to @var{port}.  When the dynamic extent is left, the
+current port is stored in @var{port} and reset to the saved value.
+@end deftypefn
 
 @node Port Types
 @section Types of Port