summaryrefslogtreecommitdiffstats
path: root/autoload.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-12-19 19:32:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2023-12-19 19:32:28 -0800
commitdaf60d254b0f47fcdd2dec4046a4e97476da9eee (patch)
treea7340760fa611c16ec048f4a35bbab0951c90845 /autoload.c
parent5253d51f5139008cf86c24235e394b409fd82808 (diff)
downloadtxr-daf60d254b0f47fcdd2dec4046a4e97476da9eee.tar.gz
txr-daf60d254b0f47fcdd2dec4046a4e97476da9eee.tar.bz2
txr-daf60d254b0f47fcdd2dec4046a4e97476da9eee.zip
New functions: read-objects, file-get-objects, ...
* parser.c (read_objects_common): New static function, formed from read_objects_from-string. (read_objects_from_string): Now wrapper for read_objects_common. (read_objects): New function. * parser.h (read_objects): Declared. * eval.c (eval_init): Register read-objects intrinsic. * autoload.c (getput_set_entries): Add three new symbols: file-get-objects, file-put-objects and file-append-objects. * stdlib/getput.tl (put-objects): New system function. (file-get-objects, file-put-objects, file-append-objects): New functions. * txr.1: Documented. * tests/018/getput.tl: New file.
Diffstat (limited to 'autoload.c')
-rw-r--r--autoload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/autoload.c b/autoload.c
index 2b2b8f27..6d6deb4a 100644
--- a/autoload.c
+++ b/autoload.c
@@ -464,6 +464,7 @@ static val getput_set_entries(val fun)
val name[] = {
lit("get-jsons"), lit("put-jsons"),
lit("file-get"), lit("file-put"), lit("file-append"),
+ lit("file-get-objects"), lit("file-put-objects"), lit("file-append-objects"),
lit("file-get-string"), lit("file-put-string"), lit("file-append-string"),
lit("file-get-lines"), lit("file-put-lines"), lit("file-append-lines"),
lit("file-get-buf"), lit("file-put-buf"),