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
+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
}
#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.")
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);