Returns a boolean indicating whether X is a port. Equivalent to
`(or (input-port? X) (output-port? X))'.
+** New function: file-port?
+
+Determines whether a given object is a port that is related to a file.
+
** New function: port-for-each proc
Apply PROC to each port in the Guile port table in turn. The
+2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * fports.[ch] (scm_file_port_p): New primitive.
+
2001-01-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
* tags.h (scm_tc16_fport, scm_tc16_strport, scm_tc16_sfport):
}
}
+
+SCM_DEFINE (scm_file_port_p, "file-port?", 1, 0, 0,
+ (SCM obj),
+ "Determine whether OBJ is a port that is related to a file.")
+#define FUNC_NAME s_scm_file_port_p
+{
+ return SCM_BOOL (SCM_FPORTP (obj));
+}
+#undef FUNC_NAME
+
+
/* scm_open_file
* Return a new port open on a given file.
*
extern void scm_evict_ports (int fd);
extern SCM scm_open_file (SCM filename, SCM modes);
extern SCM scm_fdes_to_port (int fdes, char *mode, SCM name);
+extern SCM scm_file_port_p (SCM obj);
extern void scm_init_fports (void);
#endif /* FPORTSH */