zkFtell - return a file offset in a stream
#include "zkStdio.h"
long int zkFtell(FILE* stream);
The zkFtell() function obtains the current value of the file-position indicator for the stream pointed to by stream.
Upon successful completion, zkFtell() returns the current value of the file-position indicator for the stream measured in bytes from the beginning of the file.
Otherwise, zkFtell() returns -1, cast to long, and set errno to indicate the error.
The zkFtell() function will fail if:
- [EBADF]
- The file descriptor underlying stream is not an open file descriptor.
- [EOVERFLOW]
- The current file offset cannot be represented correctly in an object of type long.
- [ESPIPE]
- The file descriptor underlying stream is associated with a pipe or FIFO.