Reposition within an open file.
int fseek (FILE * stream, long offset, int origin);
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 character offset from the origin
origin
One of the following constants:
SEEK_SET the begining of the fileRemarks
The fseek function repositions stream by, possibly rewinding the file, then reading the number of bytes required by the seek operation, to the required position. It is not possible to extend a file by positioning past the End Of File in the JCC library.
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.