2022-01-02 22:09:06 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int feof(FILE *fp)
|
|
|
|
{
|
2022-01-10 17:10:49 +01:00
|
|
|
if(!fp->buf)
|
|
|
|
return fp->eof;
|
|
|
|
|
|
|
|
/* If there is read data to be accessed, the flag doesn't count */
|
|
|
|
if(fp->bufdir == __FILE_BUF_READ && fp->bufpos < fp->bufread)
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
return fp->eof;
|
2022-01-02 22:09:06 +01:00
|
|
|
}
|