Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 186 -
------------------------------------------------------------------------------
6.32 Get the current file position of a stream
. <Main,Alarm,Comm>
------------------------------------------------------------------------------
[Name]
fgetpos
[Syntax]
#include <stdio.h>
int fgetpos( FILE *stream, fpos_t *pos ) ;
[Arguments]
stream Pointer to a FILE structure.
pos Pointer to a position indicator to be stored.
[Return]
Returns zero if successful. If not, returns non-zero value and sets
an one of following values, which are defined in stdio.h, in a global
variable "errno".
Symbol Meaning
---------------+-----------------------------------------------------
EBADF File handle linked to the specified stream is
invalid, or cannot be accessed.
EINVAL Specified stream is invalid.
[Description]
Gets a file position indicator of the specified stream, and stores
it in the buffer pointed by "pos". It is able to restore the pointer
of the stream at calling "fgetpos" function by "fsetpos" function
using an information stored in "pos". Data format of "pos" is internal
one, it is used only by "fgetpos" and "fsetpos" functions.