FAT | RFS | XFS | ZFS
feof()
PROTOTYPE
#include <stdio.h>
int feof(FILE *file);
DESCRIPTION
feof() tests the end-of-file indicator of the open file identified by file. It returns nonzero if the end-of-file indicator for the file is set, zero if it is clear.
If an error occurs, feof() sets errno and returns -1.
ERROR CODES
| EBADF | file is not the handle of an open file. |
EXAMPLE
file = fopen("/flash/temp.txt", "r");
/*-------------------------------------------------------------*/
/* Output the file, a character at a time. */
/*-------------------------------------------------------------*/
while (feof(file) == 0)
putchar(fgetc(file));