1 .\" @(#)fseek.3s 6.3 (Berkeley) 2/24/86
3 .TH FSEEK 3 "February 24, 1986"
6 fseek, ftell, rewind \- reposition a stream
12 int fseek(FILE *\fIstream\fP, long \fIoffset\fP, int \fIptrname\fP)
13 long ftell(FILE *\fIstream\fP)
14 void rewind(FILE *\fIstream\fP)
19 sets the position of the next input or output
22 The new position is at the signed distance
25 from the beginning, the current position, or the end of the file,
28 has the value 0, 1, or 2.
35 returns the current value of the offset relative to the beginning
36 of the file associated with the named
38 It is measured in bytes on UNIX;
39 on some other systems it is a magic cookie,
40 and the only foolproof way to obtain an
45 .BR Rewind "(\fIstream\fR)"
47 .BR fseek "(\fIstream\fR, 0L, 0)."
53 returns \-1 for improper seeks, otherwise zero.