HP C/iX Library Reference Manual (30026-90004)
Chapter 5 187
HP C/iX Library Function Descriptions
fsetpos
fsetpos
Sets the file position for a stream.
Syntax
#include <stdio.h>
int fsetpos (FILE *
stream
, const fpos_t *
pos
);
Parameters
stream
Pointer to a file.
pos
A pointer to a structure that specifies the position of the file position
indicator.
Return Values
0 Success.
≠0 An error occurred, and errno is set to indicate the error condition.
Description
The fsetpos function sets the file position indicator for the stream pointed to by
stream
according to the value of the object pointed to by
pos
. The object pointed to by
pos
must be
an object obtained from a previous call to fgetpos() on the same stream.
A successful call to fsetpos() clears the end-of-file indicator for the stream and undoes
any effect of ungetc() on the stream. After an fsetpos() call, the next operation on an
update stream may be either input or output.
See Also
fgetpos(), fseek(), ANSI C 4.9.9.3