Reposition within an open file.
int fsetpos (FILE * stream, fpos_t * offset);
Required Header |
<stdio.h> |
Return Value
This function returns zero if the seek was successful. -1 indicates an error.
Parameters
stream
A pointer to the open FILE structure
offset
A pointer to a presaved position
Remarks
The fsetpos function repositions stream by, possibly rewinding the file, then reading the number of bytes required by the seek operation, to the required position. The position should have been presaved by the fgetpos function.
The file read operation in this instance uses a special read mode which bypasses the buffer calculations which normally occur when reading a file in the JCC library.