1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 18:20:22 +02:00

* ioext.h: removed scm_duplicate_port prototype.

* ioext.c (scm_primitive_dup2): return the new file descriptor
instead of SCM_UNSPECIFIED, since similarity to scm_primitive_dup
is convenient.
(scm_fdopen): bug fix: don't try to make port unbuffered until its
stream has been set.
(scm_duplicate_port): deleted, there's now an implementation in
boot-9.scm.
(scm_primitive_dup2): do nothing if newfd == oldfd.

* boot-9.scm (dup->port, dup->inport, dup->outport, dup->fdes,
dup, fdes->inport, fdes->outport, port->fdes): new procedures.
(duplicate-port): was a C primitive, now it's here.
(move->fdes): allow the first argument to be a file descriptor.
Return the modified port or file descriptor (was unspecified.)
This commit is contained in:
Gary Houston 1997-07-21 08:52:26 +00:00
parent a9488d1218
commit e38303a26d
5 changed files with 96 additions and 57 deletions

View file

@ -53,7 +53,6 @@ extern SCM scm_write_line SCM_P ((SCM obj, SCM port));
extern SCM scm_ftell SCM_P ((SCM port));
extern SCM scm_fseek SCM_P ((SCM port, SCM offset, SCM whence));
extern SCM scm_freopen SCM_P ((SCM filename, SCM modes, SCM port));
extern SCM scm_duplicate_port SCM_P ((SCM oldpt, SCM modes));
extern SCM scm_redirect_port SCM_P ((SCM into_pt, SCM from_pt));
extern SCM scm_primitive_dup (SCM fd_or_port);
extern SCM scm_primitive_dup2 (SCM fd_or_port, SCM newfd);