summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-02-07 19:01:35 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-02-07 19:01:35 -0800
commit177964f81055367da1b7aec8638dfc8a63ec99c5 (patch)
tree5f8711876f77c0a3d85adee02bff07344fef5b46 /txr.1
parent52c1aef14849e0f3f4ecb4f6177c48af3b352631 (diff)
downloadtxr-177964f81055367da1b7aec8638dfc8a63ec99c5.tar.gz
txr-177964f81055367da1b7aec8638dfc8a63ec99c5.tar.bz2
txr-177964f81055367da1b7aec8638dfc8a63ec99c5.zip
file-put-buf: new argument; also, new file-place-buf
Like file-put-buf but doesn't overwrite the file. * lisplib.c (getput_set_entries): New autoload for file-place-buf. * share/txr/stdlib/getput.tl (file-put-buf): New argument for seeking into the file. (file-place-buf): New function. * txr.1: Documented.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.117
1 files changed, 16 insertions, 1 deletions
diff --git a/txr.1 b/txr.1
index 04d68357..9765dc2f 100644
--- a/txr.1
+++ b/txr.1
@@ -24990,7 +24990,8 @@ stream doesn't support seeking.
.coNP Functions @, file-put-buf @ file-append-buf and @ command-put-buf
.synb
-.mets (file-put-buf < name << buf )
+.mets (file-put-buf < name < buf << skip-bytes )
+.mets (file-place-buf < name < buf << skip-bytes )
.mets (file-append-buf < name << buf )
.mets (command-put-buf < cmd << buf )
.syne
@@ -25003,6 +25004,20 @@ writes the contents of the buffer object
.meta buf
into the file, and then closes the file. If the file doesn't exist, it is
created. If it exists, it is truncated to zero length and overwritten.
+The default value of the optional
+.meta skip-bytes
+parameter is zero. If an argument is given, it must be a non-negative integer.
+If it is nonzero, then after opening the file, before writing the buffer,
+the function will seek to an offset of that many bytes from the start of the
+file. The contents of
+.meta buf
+will be written at that offset.
+
+The
+.code file-place-buf
+function doees not truncate an existing file to zero length.
+In all other regards, it is equivalent to
+.codn file-put-buf .
The
.code file-append-buf