summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-11-04 22:10:15 -0800
committerKaz Kylheku <kaz@kylheku.com>2018-11-04 22:10:15 -0800
commitce6ada3b340607177bec7cbfa2b5eaa47ebb07a4 (patch)
tree11808552fdee0ba62ba5555f2a1a6df280872aba /txr.1
parent44c8e70f810ad52b0f26f06147d5613ed1271900 (diff)
downloadtxr-ce6ada3b340607177bec7cbfa2b5eaa47ebb07a4.tar.gz
txr-ce6ada3b340607177bec7cbfa2b5eaa47ebb07a4.tar.bz2
txr-ce6ada3b340607177bec7cbfa2b5eaa47ebb07a4.zip
buffers: implement copy-buf.
* buf.c (copy_buf): New function. (buf_init): Register copy-buf intrinsic. * buf.h (copy_buf): Declared. * lib.c (copy): Handle BUF via copy_buf. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.122
1 files changed, 22 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 1aa8f26f..f1c71f4c 100644
--- a/txr.1
+++ b/txr.1
@@ -26177,6 +26177,12 @@ is a structure, it returns
.cble
If
.meta object
+is a buffer, it returns
+.cblk
+.meti (copy-buf << object ).
+.cble
+If
+.meta object
is a
.codn carray ,
it returns
@@ -56985,6 +56991,22 @@ If
is specified, its value must be in the range 0 to 255.
It defaults to zero.
+.coNP Function @ copy-buf
+.synb
+.mets (copy-buf << buf )
+.syne
+.desc
+The
+.code copy-buf
+function returns a duplicate of
+.metn buf :
+an object distinct from
+.meta buf
+which has the same length and contents, and compares
+.code equal
+to
+.metn buf .
+
.coNP Function @ buf-put-i8
.synb
.mets (buf-put-i8 < buf < pos << val )