diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-12 11:26:08 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-08-12 11:26:08 -0300 |
| commit | 09b4e527a008687a2fd90202b5e7b2f175d8ebed (patch) | |
| tree | bed6d9e6512aaba8b95109b752d3c9d5e4756eac | |
| parent | 35a28a58b38fb90cbe7c9596d60af2b3c1bd52a3 (diff) | |
| download | lua-09b4e527a008687a2fd90202b5e7b2f175d8ebed.tar.gz lua-09b4e527a008687a2fd90202b5e7b2f175d8ebed.tar.bz2 lua-09b4e527a008687a2fd90202b5e7b2f175d8ebed.zip | |
Detail in the manual (method 'file:setvbuf')
ANSI C is vague about 'setvbuf'; most details are implementation
defined. So, the manual cannot give any guaranties, either.
| -rw-r--r-- | manual/manual.of | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/manual/manual.of b/manual/manual.of index c1ee8eb7..ff27a7d4 100644 --- a/manual/manual.of +++ b/manual/manual.of | |||
| @@ -8142,24 +8142,12 @@ end of the file, and returns its size. | |||
| 8142 | 8142 | ||
| 8143 | @LibEntry{file:setvbuf (mode [, size])| | 8143 | @LibEntry{file:setvbuf (mode [, size])| |
| 8144 | 8144 | ||
| 8145 | Sets the buffering mode for an output file. | 8145 | Sets the buffering mode for a file. |
| 8146 | There are three available modes: | 8146 | There are three available modes: |
| 8147 | @description{ | 8147 | @description{ |
| 8148 | 8148 | @item{@St{no}| no buffering.} | |
| 8149 | @item{@St{no}| | 8149 | @item{@St{full}| full buffering.} |
| 8150 | no buffering; the result of any output operation appears immediately. | 8150 | @item{@St{line}| line buffering.} |
| 8151 | } | ||
| 8152 | |||
| 8153 | @item{@St{full}| | ||
| 8154 | full buffering; output operation is performed only | ||
| 8155 | when the buffer is full or when | ||
| 8156 | you explicitly @T{flush} the file @seeF{io.flush}. | ||
| 8157 | } | ||
| 8158 | |||
| 8159 | @item{@St{line}| | ||
| 8160 | line buffering; output is buffered until a newline is output | ||
| 8161 | or there is any input from some special files | ||
| 8162 | (such as a terminal device). | ||
| 8163 | } | 8151 | } |
| 8164 | 8152 | ||
| 8165 | } | 8153 | } |
| @@ -8167,6 +8155,10 @@ For the last two cases, | |||
| 8167 | @id{size} is a hint for the size of the buffer, in bytes. | 8155 | @id{size} is a hint for the size of the buffer, in bytes. |
| 8168 | The default is an appropriate size. | 8156 | The default is an appropriate size. |
| 8169 | 8157 | ||
| 8158 | The specific behavior of each mode is non portable; | ||
| 8159 | check the underlying @ANSI{setvbuf} in your platform for | ||
| 8160 | more details. | ||
| 8161 | |||
| 8170 | } | 8162 | } |
| 8171 | 8163 | ||
| 8172 | @LibEntry{file:write (@Cdots)| | 8164 | @LibEntry{file:write (@Cdots)| |
