mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-28 15:34:31 +00:00
feat(userspace/libc): implement feof() and ferror() functions
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
parent
77136acccd
commit
db5a42289a
@ -91,8 +91,8 @@ extern "C"
|
|||||||
int dprintf(int, const char *restrict, ...);
|
int dprintf(int, const char *restrict, ...);
|
||||||
int fclose(FILE *stream);
|
int fclose(FILE *stream);
|
||||||
FILE *fdopen(int, const char *);
|
FILE *fdopen(int, const char *);
|
||||||
int feof(FILE *);
|
int feof(FILE *stream);
|
||||||
int ferror(FILE *);
|
int ferror(FILE *stream);
|
||||||
int fflush(FILE *stream);
|
int fflush(FILE *stream);
|
||||||
int fgetc(FILE *stream);
|
int fgetc(FILE *stream);
|
||||||
int fgetpos(FILE *restrict, fpos_t *restrict);
|
int fgetpos(FILE *restrict, fpos_t *restrict);
|
||||||
|
@ -81,8 +81,20 @@ export int fclose(FILE *stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
export FILE *fdopen(int, const char *);
|
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)
|
export int fflush(FILE *stream)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user