Skip to content

Commit

Permalink
Implement feof and ferror from PDCLib
Browse files Browse the repository at this point in the history
  • Loading branch information
mysterymath committed May 21, 2024
1 parent bd1e670 commit 904a51d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mos-platform/common/c/stdio-full.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,8 @@ void rewind(FILE *stream) { __stdio_not_yet_implemented(); }

void clearerr(FILE *stream) { __stdio_not_yet_implemented(); }

int feof(FILE *stream) { __stdio_not_yet_implemented(); }
int feof(FILE *stream) { return stream->status & EOFFLAG; }

int ferror(FILE *stream) { __stdio_not_yet_implemented(); }
int ferror(FILE *stream) { return stream->status & ERRORFLAG; }

void perror(const char *s) { __stdio_not_yet_implemented(); }

0 comments on commit 904a51d

Please sign in to comment.