File:  [Research Unix] / researchv10dc / man / adm / man3 / fseek.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.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.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.