diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-03-19 06:43:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-03-19 06:43:59 -0700 |
commit | d23a45711a9c6864f7c4adf962499fe3d1a4adb5 (patch) | |
tree | 5a8e0fe23cf069149181b52a772038333bf280ec /txr.1 | |
parent | 54ab368d20df1796106e2dae222a3b926c331dd9 (diff) | |
download | txr-d23a45711a9c6864f7c4adf962499fe3d1a4adb5.tar.gz txr-d23a45711a9c6864f7c4adf962499fe3d1a4adb5.tar.bz2 txr-d23a45711a9c6864f7c4adf962499fe3d1a4adb5.zip |
Buffer size digit in file open mode string.
* streamn.c (struct stdio_handle): New member, buf.
(stdio_stream_destroy): Free the stdio_handle's buf.
(parse_mode): Handle digit character, converting it
to integer value stored in m.buforder.
(set_mode_props): Allocate a buffer and install into
FILE * stream if the mode specifies a buforder.
(make_stdio_stream_common): Initialize buffer to null.
* stream.h (struct stdio_mode): New signed bitfield
member, buforder.
(stdio_mode_init_trivial): Initialize buforder member
to -1.
* txr.1: Documented size order digit.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -34469,6 +34469,19 @@ mode letter specifies that the stream will be line buffered, unless specified as unbuffered with .strn u . +In addition to option letters, decimal digit may be specified, influencing +the stream buffer size. This digit specifies the buffer size as binary +exponential buffer size order, such that +.str 0 +specifies 1024 bytes, +.str 1 +specifies 2048 and so forth up to +.str 9 +specifying 524288 bytes. If no such digit is specified, then the +stream uses a default buffer size. It is erroneous for the +size order digit to be present together with the option +.strn u . + .coNP Function @ open-tail .synb .mets (open-tail < path >> [ mode-string <> [ seek-to-end-p ]]) |