From ce6ada3b340607177bec7cbfa2b5eaa47ebb07a4 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 4 Nov 2018 22:10:15 -0800 Subject: 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. --- txr.1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'txr.1') 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 ) -- cgit v1.2.3