summaryrefslogtreecommitdiffstats
path: root/buf.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-19 19:15:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-19 19:15:48 -0700
commitc99dd869357f2afd0b79dfc24f9e9953d9129837 (patch)
tree5297cdf3c4745d8225e98281071db50aa71f424e /buf.h
parent17725d8ac6a5bbc96e888ae6e346f909fe77f3e5 (diff)
downloadtxr-c99dd869357f2afd0b79dfc24f9e9953d9129837.tar.gz
txr-c99dd869357f2afd0b79dfc24f9e9953d9129837.tar.bz2
txr-c99dd869357f2afd0b79dfc24f9e9953d9129837.zip
New function: get-line-as-buf
* buf.c (buf_put_bytes, buf_get_bytes): static functions become external. * buf.h (buf_put_bytes, buf_get_bytes): Declared. * stream.c (get_line_as_buf): New fucntnion. (stream_init): Registered get-line-as-buf intrinsic. * stream.h (get_line_as_buf): Declared. * txr.1: Documented.
Diffstat (limited to 'buf.h')
-rw-r--r--buf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/buf.h b/buf.h
index 578bc5aa..bafd1bd4 100644
--- a/buf.h
+++ b/buf.h
@@ -41,6 +41,8 @@ val replace_buf(val buf, val items, val from, val to);
val buf_list(val list);
val buf_put_buf(val dbuf, val sbuf, val pos);
+void buf_put_bytes(val buf, val pos, mem_t *ptr, cnum size, val self);
+
#if HAVE_I8
val buf_put_i8(val buf, val pos, val num);
val buf_put_u8(val buf, val pos, val num);
@@ -73,6 +75,8 @@ val buf_put_float(val buf, val pos, val num);
val buf_put_double(val buf, val pos, val num);
val buf_put_cptr(val buf, val pos, val cptr);
+void buf_get_bytes(val buf, val pos, mem_t *ptr, cnum size, val self);
+
#if HAVE_I8
val buf_get_i8(val buf, val pos);
val buf_get_u8(val buf, val pos);