1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Add port-line-buffered?

* libguile/ports.c (scm_port_line_buffered_p): New function.
* module/ice-9/ports.scm: Plump port-line-buffered? and
  port-auxiliary-write-buffer through to the internals module
This commit is contained in:
Andy Wingo 2016-05-25 21:48:56 +02:00
parent 2f836e2384
commit 1123002a9e
2 changed files with 15 additions and 0 deletions

View file

@ -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

View file

@ -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