summaryrefslogtreecommitdiffstats
path: root/buf.c
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.c
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.c')
-rw-r--r--buf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/buf.c b/buf.c
index 09bdd0ee..c59c282a 100644
--- a/buf.c
+++ b/buf.c
@@ -397,7 +397,7 @@ val buf_put_buf(val dbuf, val sbuf, val pos)
return sbuf;
}
-static void buf_put_bytes(val buf, val pos, mem_t *ptr, cnum size, val self)
+void buf_put_bytes(val buf, val pos, mem_t *ptr, cnum size, val self)
{
struct buf *b = buf_handle(buf, self);
cnum p = buf_check_index(b, pos, self);
@@ -589,7 +589,7 @@ val buf_put_cptr(val buf, val pos, val cptr)
return cptr;
}
-static void buf_get_bytes(val buf, val pos, mem_t *ptr, cnum size, val self)
+void buf_get_bytes(val buf, val pos, mem_t *ptr, cnum size, val self)
{
struct buf *b = buf_handle(buf, self);
cnum p = buf_check_index(b, pos, self);