summaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-04 12:13:31 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-04 12:13:31 -0700
commite87581b27ea4635ffda306e9711bd1a63323c5f6 (patch)
tree7521af2febd00f8ba92c238182a803e9f8b1c689 /socket.c
parent6cb7fdec4cebacda48c5610a45e28ecef16f2ce2 (diff)
downloadtxr-e87581b27ea4635ffda306e9711bd1a63323c5f6.tar.gz
txr-e87581b27ea4635ffda306e9711bd1a63323c5f6.tar.bz2
txr-e87581b27ea4635ffda306e9711bd1a63323c5f6.zip
streams: put-buf and fill-buf functions.
* stream.h (struct strm_ops): New function pointer members, put_buf and fill_buf. (strm_ops_init): Two new parameters in macro. (put_buf, fill_buf): Declared. * stream.c (unimpl_put_buf, unimpl_fill_buf, generic_put_buf, generic_fill_buf): New static functions. (fill_stream_ops): Default new fill_buf and fill_buf virtual functions intelligently based on whether get_byte and put_byte are available. (stdio_put_buf, stdio_fill_buf): New static functions. (stdio_ops, tail_ops, pipe_ops, dir_ops, string_in_ops, byte_in_ops, strlist_in_ops, string_out_ops, strlist_out_ops, cat_stream_ops): Add arguments to strm_ops_init macro for get_buf and fill_buf. (delegate_put_buf, delegate_fill_buf): New static functions. (record_adapter_ops): Add arguments to strm_ops_init macro for get_buf and fill_buf. (put_buf, fill_buf): New functions. (stream_init): Register put-buf and fill-buf intrinsics. * socket.c (dgram_strm_ops): Add arguments to strm_ops_init macro call. * syslog.c (syslog_strm_ops): Likewise.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/socket.c b/socket.c
index 51db01a9..6b583f1d 100644
--- a/socket.c
+++ b/socket.c
@@ -658,6 +658,8 @@ static_def(struct strm_ops dgram_strm_ops =
dgram_get_byte,
dgram_unget_char,
dgram_unget_byte,
+ 0,
+ 0,
dgram_close,
dgram_flush,
0,