summaryrefslogtreecommitdiff
path: root/static/v10/man3/fseek.3
diff options
context:
space:
mode:
Diffstat (limited to 'static/v10/man3/fseek.3')
-rw-r--r--static/v10/man3/fseek.351
1 files changed, 51 insertions, 0 deletions
diff --git a/static/v10/man3/fseek.3 b/static/v10/man3/fseek.3
new file mode 100644
index 00000000..02e0e125
--- /dev/null
+++ b/static/v10/man3/fseek.3
@@ -0,0 +1,51 @@
+.TH FSEEK 3S
+.CT 2 file_io
+.SH NAME
+fseek, ftell, rewind \(mi reposition a stream
+.SH SYNOPSIS
+.nf
+.B #include <stdio.h>
+.PP
+.B int fseek(stream, offset, ptrname)
+.B FILE *stream;
+.B long offset;
+.PP
+.B long ftell(stream)
+.B FILE *stream;
+.PP
+.B int rewind(stream)
+.fi
+.SH DESCRIPTION
+.I Fseek
+sets the position of the next input or output
+operation on the
+.IR stream .
+The new position is at the signed distance
+.I offset
+bytes
+from the beginning, the current position, or the end of the file,
+as
+.I ptrname
+has the value 0, 1 or 2 respectively.
+.PP
+.I Ftell
+returns the current value of the file pointer for the file
+associated with the named
+.IR stream .
+.PP
+.IR Rewind ( stream )
+is equivalent to
+.BR "fseek(stream, 0L, 0)" .
+.SH "SEE ALSO"
+.IR lseek (2),
+.IR stdio (3)
+.SH DIAGNOSTICS
+.I Fseek
+returns \-1
+for improper seeks.
+.SH BUGS
+The interaction of
+.I fseek
+and
+.IR ungetc (3)
+is undefined.