From fdb8f90b22f8d4993b5937d55f5cbffc45ae940c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 31 May 2021 07:49:38 -0700 Subject: New: mkdtemp and mkstemp functions. * configure: check for mkstemp and mkdtemp. * stream.c (stdio_set_prop): Implement setting the :name property. We need this in mkstemp_wrap in order to punch in the temporary name, so that the application can retrieve it. (mkdtemp_wrap, mkstemp_wrap): New functions. (stream_init): Register mkdtemp and mkstemp intrinsics. * stream.h (mkdtemp_wrap, mkstemp_wrap): Declared. * txr.1: Documented. * share/txr/stdlib/doc-syms.tl: Updated. --- stream.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stream.h') diff --git a/stream.h b/stream.h index 8e6874dc..cdfe9d8c 100644 --- a/stream.h +++ b/stream.h @@ -252,4 +252,6 @@ val iobuf_get(void); void iobuf_put(val buf); void iobuf_list_empty(void); val tmpfile_wrap(void); +val mkdtemp_wrap(val template); +val mkstemp_wrap(val prefix, val suffix); void stream_init(void); -- cgit v1.2.3