Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 187 -
------------------------------------------------------------------------------
6.33 Move the current file pointer
. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
fseek
[Syntax]
#include <stdio.h>
int fseek( FILE *streem, long offset, int orign ) ;
[Arguments]
stream Pointer to a FILE structure.
offset Offset from origin in byte.
orign Origin position.
[Return]
Returns zero if successful. If not, returns non-zero value. For non-
seekable devices, returns unstable value.
[Description]
Moves a file pointer (if exists) linked to the stream to "offset"
bytes position from "orign". The following operations to the stream
are performed at this new position. It is possible to both read and
write as the next operation to the streams which are opened with
updating mode. It is possible to move the pointer to any arbitrary
position, also beyond the end of file. Calling this function clears
the end of file indicator. "orign" is one of the following constants
which are defined in stdio.h.
Symbol Meaning
---------------+-----------------------------------------------------
SEEK_CUR Current position.
SEEK_END End of file.
SEEK_SET Beginning of file.