mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-05 20:39:16 +00:00
feat(userspace/libc): implement feof() and ferror() functions
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user