mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +02:00
2000-11-04 Gary Houston <ghouston@arglist.com>
* ports.c (scm_port_p): new function, implements "port?" which is mentioned in R5RS. * ports.h: declare scm_port_p.
This commit is contained in:
parent
53a53bd75e
commit
eb5c0a2a6c
4 changed files with 22 additions and 0 deletions
5
NEWS
5
NEWS
|
@ -169,6 +169,11 @@ Guile.
|
|||
|
||||
Instead, use scm_memq, scm_memv, scm_member.
|
||||
|
||||
** New function: port? X
|
||||
|
||||
Returns a boolean indicating whether X is a port. Equivalent to
|
||||
`(or (input-port? X) (output-port? X))'.
|
||||
|
||||
* Changes to the gh_ interface
|
||||
|
||||
* Changes to the scm_ interface
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2000-11-04 Gary Houston <ghouston@arglist.com>
|
||||
|
||||
* ports.c (scm_port_p): new function, implements "port?" which
|
||||
is mentioned in R5RS.
|
||||
* ports.h: declare scm_port_p.
|
||||
|
||||
2000-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
|
||||
|
||||
* backtrace.c (display_expression, display_error_body), fports.c
|
||||
|
|
|
@ -735,6 +735,16 @@ SCM_DEFINE (scm_output_port_p, "output-port?", 1, 0, 0,
|
|||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
SCM_DEFINE (scm_port_p, "port?", 1, 0, 0,
|
||||
(SCM x),
|
||||
"Returns a boolean indicating whether @var{x} is a port.\n"
|
||||
"Equivalent to @code{(or (input-port? X) (output-port? X))}.")
|
||||
#define FUNC_NAME s_scm_port_p
|
||||
{
|
||||
return SCM_BOOL (SCM_PORTP (x));
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
||||
SCM_DEFINE (scm_port_closed_p, "port-closed?", 1, 0, 0,
|
||||
(SCM port),
|
||||
"Returns @code{#t} if @var{port} is closed or @code{#f} if it is open.")
|
||||
|
|
|
@ -269,6 +269,7 @@ extern SCM scm_close_port (SCM port);
|
|||
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);
|
||||
extern SCM scm_port_closed_p (SCM port);
|
||||
extern SCM scm_eof_object_p (SCM x);
|
||||
extern SCM scm_force_output (SCM port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue