tell
Determines the current file position
#include <nwfileio.h>
LONG tell (
int fildes);
When an error occurs, a value of -1 is returned. Otherwise, the current file position is returned in a system-dependent manner. A value of 0 indicates the start of the file.
If an error occurs, errno is set to:
The handle value is the file handle returned by a successful execution of the open, sopen, creat, or fileno function. This function can be used in conjunction with lseek to reset the current file position.
close, creat, eof, filelength, fileno, fstat, ftell, isatty, lseek, open, read, sopen, write
#include <fcntl.h> LONG position; int handle; position = tell (handle);