summaryrefslogtreecommitdiffstats
path: root/man3/fseek.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/fseek.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man3/fseek.3')
-rw-r--r--man3/fseek.323
1 files changed, 11 insertions, 12 deletions
diff --git a/man3/fseek.3 b/man3/fseek.3
index 4b7a9af..c97c4d7 100644
--- a/man3/fseek.3
+++ b/man3/fseek.3
@@ -12,7 +12,7 @@
.\"
.\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu
.\"
-.TH fseek 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH fseek 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
fgetpos, fseek, fsetpos, ftell, rewind \- reposition a stream
.SH LIBRARY
@@ -21,12 +21,12 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <stdio.h>
-.PP
+.P
.BI "int fseek(FILE *" stream ", long " offset ", int " whence );
.BI "long ftell(FILE *" stream );
-.PP
+.P
.BI "void rewind(FILE *" stream );
-.PP
+.P
.BI "int fgetpos(FILE *restrict " stream ", fpos_t *restrict " pos );
.BI "int fsetpos(FILE *" stream ", const fpos_t *" pos );
.fi
@@ -54,27 +54,27 @@ function clears the end-of-file indicator for the stream and undoes
any effects of the
.BR ungetc (3)
function on the same stream.
-.PP
+.P
The
.BR ftell ()
function obtains the current value of the file position indicator for the
stream pointed to by
.IR stream .
-.PP
+.P
The
.BR rewind ()
function sets the file position indicator for the stream pointed to by
.I stream
to the beginning of the file.
It is equivalent to:
-.PP
+.P
.RS
(void) fseek(stream, 0L, SEEK_SET)
.RE
-.PP
+.P
except that the error indicator for the stream is also cleared (see
.BR clearerr (3)).
-.PP
+.P
The
.BR fgetpos ()
and
@@ -94,7 +94,7 @@ On some non-UNIX systems, an
.I fpos_t
object may be a complex object and these routines may be the only way to
portably reposition a text stream.
-.PP
+.P
If the stream refers to a regular file
and the resulting stream offset is beyond the size of the file,
subsequent writes will extend the file with a hole, up to the offset,
@@ -135,7 +135,7 @@ Or: the resulting file offset would be negative.
The file descriptor underlying
.I stream
is not seekable (e.g., it refers to a pipe, FIFO, or socket).
-.PP
+.P
The functions
.BR fgetpos (),
.BR fseek (),
@@ -168,7 +168,6 @@ T{
.BR fsetpos ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
C11, POSIX.1-2008.
.SH HISTORY