fsetpos(3C) fsetpos(3C)
NAME
fsetpos, fgetpos, fsetpos64, fgetpos64 - reposition a file pointer in
a stream
SYNOPSIS
#include <stdio.h>
int fsetpos(FILE *stream, const fpost *pos);
int fgetpos(FILE *stream, fpost *pos);
int fsetpos64(FILE *stream, const fpos64t *pos);
int fgetpos64(FILE *stream, fpos64t *pos);
DESCRIPTION
fsetpos() sets the position of the next input or output operation on
the stream according to the value of the object pointed to by pos. The
object pointed to by pos must be a value returned by an earlier call
to fgetpos() on the same stream.
fsetpos() clears the end-of-file indicator for the stream and undoes
any effects of the ungetc() function on the same stream. After
fsetpos(), the next operation on a file opened for update may be
either input or output.
fsetpos() stores the current value of the file position indicator for
stream in the object pointed to by pos. The value stored contains
information usable by fsetpos() for repositioning the stream to its
position at the time of the call to fsetpos().
There is no functional difference between fsetpos()/fgetpos() and
fsetpos64()/fgetpos64(), except for the interpretation of
fpost/fpos64t [see lfs(5)].
If successful, both fsetpos() and fsetpos() return zero. Otherwise,
they both return nonzero.
SEE ALSO
lseek(2), fseek(3S), ungetc(3S), lfs(5).
Page 1 Reliant UNIX 5.44 Printed 11/98