The f_eof function tests for end-of-file on a file.
int f_eof ( FIL* fp /* [IN] File object */ );
The f_eof function returns a non-zero value if the read/write pointer has reached end of the file; otherwise it returns a zero.
In this revision, this function is implemented as a macro. It does not have any validation and mutual exclusion.
#define f_eof(fp) ((int)((fp)->fptr == (fp)->fsize))
Always available.