fsetpos
From cppreference.com
Defined in header <stdio.h>
|
||
Sets the file position indicator and the multibyte parsing state (if any) for the file stream stream
according to the value pointed to by pos
.
Besides establishing new parse state and position, a call to this function undoes the effects of ungetc and clears the end-of-file state, if it is set.
If a read or write error occurs, the error indicator (ferror) for the stream is set.
Parameters
stream | - | file stream to modify |
pos | - | pointer to a fpos_t object to use as new value of file position indicator |
Return value
0 upon success, nonzero value otherwise.
Notes
After seeking to a non-end position in a wide stream, the next call to any output function may render the remainder of the file undefined, e.g. by outputting a multibyte sequence of a different length.