diff options
-rw-r--r-- | libguile/ports.c | 11 | ||||
-rw-r--r-- | module/ice-9/ports.scm | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/libguile/ports.c b/libguile/ports.c index 5660984b5..d04adc676 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -2703,6 +2703,17 @@ SCM_DEFINE (scm_port_auxiliary_write_buffer, "port-auxiliary-write-buffer", } #undef FUNC_NAME +SCM_INTERNAL SCM scm_port_line_buffered_p (SCM); +SCM_DEFINE (scm_port_line_buffered_p, "port-line-buffered?", 1, 0, 0, + (SCM port), + "Return true if the port is line buffered.") +#define FUNC_NAME s_scm_port_line_buffered_p +{ + SCM_VALIDATE_OPPORT (1, port); + return scm_from_bool (SCM_CELL_WORD_0 (port) & SCM_BUFLINE); +} +#undef FUNC_NAME + diff --git a/module/ice-9/ports.scm b/module/ice-9/ports.scm index 4b7462585..3fc2f6465 100644 --- a/module/ice-9/ports.scm +++ b/module/ice-9/ports.scm @@ -164,6 +164,8 @@ interpret its input and output." #:use-module (ice-9 ports) #:export (port-read-buffer port-write-buffer + port-auxiliary-write-buffer + port-line-buffered? expand-port-read-buffer! port-buffer-bytevector port-buffer-cur @@ -219,6 +221,8 @@ interpret its input and output." (private-port-bindings port-read-buffer port-write-buffer + port-auxiliary-write-buffer + port-line-buffered? expand-port-read-buffer! port-read port-write |