Skip to contentSkip to conversation

fread.3: Explain that file position is moved after calling fread()/fwrite()

PATCH In review Arkadiusz Drabczyk 2 participants 2 messages Jun 16, 2020 – Jun 19, 2020 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 fread.3: Explain that file position is moved after calling fread()/fwrite()

Corresponding manpage on FreeBSD already contains that information.

---
 man3/fread.3 | 3 +++
 1 file changed, 3 insertions(+)
man3/fread.3 +3 -0
index 2dd7be9..2dcca9b 100644
@@ -92,6 +92,9 @@ is 1.
 If an error occurs, or the end of the file is reached,
 the return value is a short item count (or zero).
 .PP
+The file position indicator for the stream is advanced by the number
+of bytes successfully read or written.
+.PP
 .BR fread ()
 does not distinguish between end-of-file and error, and callers must use
 .BR feof (3)
Signature · 1 line
2.9.0
#1 lore raw

Hello Arkadiusz

Quoted 3 lines · Arkadiusz Drabczyk

Corresponding manpage on FreeBSD already contains that information.

Thanks. Patch applied.

Cheers,

Michael

Quoted 19 lines
---
 man3/fread.3 | 3 +++
 1 file changed, 3 insertions(+)
man3/fread.3 +3 -0
index 2dd7be9..2dcca9b 100644
@@ -92,6 +92,9 @@ is 1.
 If an error occurs, or the end of the file is reached,
 the return value is a short item count (or zero).
 .PP
+The file position indicator for the stream is advanced by the number
+of bytes successfully read or written.
+.PP
 .BR fread ()
 does not distinguish between end-of-file and error, and callers must use
 .BR feof (3)
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/