Implementation status: to be implemented
int fgetpos(FILE *stream, fpos_t *pos);
The function gets the current file position of the stream and writes it to pos.
stream - the stream to be examined,
pos - a pointer to an object, in which the current file position of the stream is stored.
The function returns
0 on success, otherwise it returns
-1 and sets
errno to indicate the type of error.
EBADF] The file descriptor underlying stream is not valid.
EOVERFLOW] The current value of the file position cannot be represented correctly in an object of type
ESPIPE] The file descriptor underlying stream is associated with a pipe, FIFO, or socket.
- Implement the