Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

Code Block
languagecpp
int  fs_ferror (FS_FILE  *p_file);

...

1109708
HTML Table
summary
classPlain_Table
Table Row (tr)
Table Cell (td)
Anchor
1109708


File

...

Called from

...

Code enabled by

...

fs_api..c

...

...

Application

...

FS_CFG_API_EN

...

1091873Test error indicator on a file. Anchor11045751104575

Arguments

...

p_file Anchor11405321140532

Pointer to a file.

...

...

Returned Value

...

10918770, if error indicator is not set or if an error occurred

Anchor10918781091878Non-zero value, if error indicator is set.anchor10999731099973

Notes/Warnings

...

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

...

  1. Code Block

...

rowspan6
  1. languagecpp
    rtn = fs_ferror(p_file);

...

  1. 
    if (rtn == 0)

...

  1.  {
        // Error indicator is NOT

...

  1.  set
    } else {
        // Error indicator is     set
    }


  2. If the error indicator is set (i.e., fs_ferror() returns a non-zero value), fs_clearerr() can be used to clear that indicator.