Table of Contents | Previous | Next |
fseek
sets the file position for stream
;
a subsequent read or write will access data beginning at the new
position. For a binary file, the position is set to
offset
characters from origin
, which may be
SEEK_SET
(beginning), SEEK_CUR
(current
position), or SEEK_END
(end of file). For a text
stream, offset
must be zero, or a value returned by ftell (in which case origin
must be
SEEK_SET
).ftell
returns the current file position for
stream
, or -1L
on error.rewind(fp)
is equivalent to fseek(fp, 0L,
SEEK_SET); clearerr(fp)
.fgetpos
records the current position in
stream
in *ptr
, for subsequent use by fsetpos. The type fpos_t
is
suitable for recording such values. fgetpos
returns
non-zero on error.fsetpos
positions stream
at the position
recorded by fgetpos in *ptr
.
fsetpos
returns non-zero on error.Table of Contents | Previous | Next |
Last modified: Wed May 03 13:09:25 2000