feat(userspace/libc): implement feof() and ferror() functions

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-02-21 02:43:00 +02:00
parent 77136acccd
commit db5a42289a
2 changed files with 16 additions and 4 deletions

View File

@ -81,8 +81,20 @@ export int fclose(FILE *stream)
}
export FILE *fdopen(int, const char *);
export int feof(FILE *);
export int ferror(FILE *);
export int feof(FILE *stream)
{
if (!stream)
return 0;
return stream->eof;
}
export int ferror(FILE *stream)
{
if (!stream)
return 0;
return stream->error;
}
export int fflush(FILE *stream)
{