fs_feof()

int  fs_feof (FS_FILE  *p_file);

File

Called from

Code enabled by

fs_api.c

Application

FS_CFG_API_EN

Test EOF indicator on a file.

Arguments

p_file

Pointer to a file.

Returned Value

0, if EOF indicator is not set or if an error occurred

Non-zero value, if EOF indicator is set.

Notes/Warnings

  1. The return value from this function should ALWAYS be tested against 0:

    rtn = fs_feof(p_file);
    if (rtn == 0) {
        // EOF indicator is NOT set
    } else {
        // EOF indicator is     set
    }
  2. If the end-of-file indicator is set (i.e., fs_feof() returns DEF_YES), fs_clearerr() can be used to clear that indicator.