fmemopen.3: Expand discussion of "current position" for fmemopen() stream

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-03-09 04:06:07 +01:00
parent 1e9eb6c1b6
commit c7de29d451
1 changed files with 10 additions and 0 deletions

View File

@ -79,8 +79,18 @@ The buffer contents are truncated
Append; open the stream for reading and writing,
with the file initial position set to the first null byte.
.PP
The stream maintains the notion of a current position,
the location where the next I/O operation will be performed.
The current position is implicitly updated by I/O operations.
It can be explicitly updated using
.BR fseek (3),
and determined using
.BR ftell (3).
In all modes other than append,
the initial position is set to the start of the buffer.
In append mode, if no null byte is found within the buffer,
then the initial position is
.IR size+1 .
.PP
If
.I buf