From b0ebc5943d7de0e76e3e908fb2d543f34396b69f Mon Sep 17 00:00:00 2001 From: Kaz Kyheku Date: Fri, 31 Jan 2020 06:06:39 -0800 Subject: open-files: add mode string argument. The open-files and open-files* functions are missing a mode string argument, which makes it impossible to, say, open all of the files in "rb" mode on a platform where that matters. * stream.c (open_files, open_files_star): Take mode as a third optional parameter. If it is present, then pass it to open_file. * txr.1: Document mode string parameter for the two functions. --- txr.1 | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index dc0fad41..d58ff298 100644 --- a/txr.1 +++ b/txr.1 @@ -50010,8 +50010,8 @@ of .coNP Functions @ open-files and @ open-files* .synb -.mets (open-files < path-list <> [ alternative-stream ]) -.mets (open-files* < path-list <> [ alternative-stream ]) +.mets (open-files < path-list >> [ alternative-stream <> [ mode-string ]]) +.mets (open-files* < path-list >> [ alternative-stream <> [ mode-string ]]) .syne .desc The @@ -50019,8 +50019,19 @@ The and .code open-files* functions create a list of streams by invoking -the open-file function on each element of +the +.code open-file +function on each element of .metn path-list . +By default, the mode string +.str r +is passed to +.codn open-file ; +if the +.meta mode-string +argument specified, it overrides this default. In that situation, +the specified mode should permit reading. + These streams are turned into a catenated stream as if applied as arguments to .codn make-catenated-stream . -- cgit v1.2.3