search for: _io_eof

Displaying 2 results from an estimated 2 matches for "_io_eof".

Did you mean: _io_feof
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...s), (n), (f)) __extern_inline int fileno(FILE *__f) { return __f->_IO_fileno; } +#define fileno_unlocked(f) fileno(f) __extern_inline int ferror(FILE *__f) { return __f->_IO_error; } +#define ferror_unlocked(f) ferror(f) __extern_inline int feof(FILE *__f) { return __f->_IO_eof; } +#define feof_unlocked(f) feof(f) __extern_inline void clearerr(FILE *__f) { __f->_IO_error = 0; __f->_IO_eof = 0; } +#define clearerr_unlocked(f) clearerr(f) #endif #endif /* _STDIO_H */ diff --git a/usr/klibc/fgets.c b/usr/klibc/fgets.c index dbf742c6..b6e6f3ea 100644 --...
2020 Jul 25
0
[klibc:master] stdio: Add extern definition of clearerr()
...--git a/usr/klibc/stdio/clearerr.c b/usr/klibc/stdio/clearerr.c new file mode 100644 index 00000000..fb565144 --- /dev/null +++ b/usr/klibc/stdio/clearerr.c @@ -0,0 +1,8 @@ +#define __NO_STDIO_INLINES +#include "stdioint.h" + +void clearerr(FILE *__f) +{ + __f->_IO_error = 0; + __f->_IO_eof = 0; +}