diff options
author | Gary Houston <ghouston@arglist.com> | 2000-03-12 19:58:56 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 2000-03-12 19:58:56 +0000 |
commit | 19b27fa236d0a5e20a01443070a4bcffe025af05 (patch) | |
tree | 47acaaa74c16538afcd08006a57901c56e205559 /libguile/ioext.c | |
parent | f8a72ca4c983b3e4c19bffb9ec1e9b433331df8b (diff) | |
download | guile-19b27fa236d0a5e20a01443070a4bcffe025af05.tar.gz |
* fports.c (scm_fdes_to_port): call fcntl F_GETFL to test that
the fdes is valid before doing anything else. check that
the file descriptor supports the modes required.
(scm_fport_buffer_add): don't throw an error if fstat doesn't
work: just use the default buffer size.
* throw.c: change an outdated comment about scm_internal_catch
BODY: it doesn't take a jumpbuf arg.
* init.c (scm_standard_stream_to_port): install a handler in case
scm_fdes_to_port throws an error. don't check here whether the
file descriptor is valid, since scm_fdes_to_port will do that.
set the revealed count depending on whether the port got the
standard file descriptor.
(stream_body_data): new type.
(stream_body, stream_handler): new procs.
Diffstat (limited to 'libguile/ioext.c')
-rw-r--r-- | libguile/ioext.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/ioext.c b/libguile/ioext.c index 56cdcea6d..98b9fff1a 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -448,13 +448,11 @@ SCM_DEFINE (scm_fdopen, "fdopen", 2, 0, 0, "by @ref{File Ports, open-file}.") #define FUNC_NAME s_scm_fdopen { - SCM port; - SCM_VALIDATE_INUM (1,fdes); SCM_VALIDATE_ROSTRING (2,modes); SCM_COERCE_SUBSTR (modes); - port = scm_fdes_to_port (SCM_INUM (fdes), SCM_ROCHARS (modes), SCM_BOOL_F); - return port; + + return scm_fdes_to_port (SCM_INUM (fdes), SCM_ROCHARS (modes), SCM_BOOL_F); } #undef FUNC_NAME |