HP 3000 Manuals

fsetpos [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation


HP C/iX Library Reference Manual

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



MPE/iX 5.0 Documentation