diff options
Diffstat (limited to 'libc-top-half/musl/src/stdio/ext2.c')
-rw-r--r-- | libc-top-half/musl/src/stdio/ext2.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stdio/ext2.c b/libc-top-half/musl/src/stdio/ext2.c new file mode 100644 index 0000000..3416278 --- /dev/null +++ b/libc-top-half/musl/src/stdio/ext2.c @@ -0,0 +1,24 @@ +#include "stdio_impl.h" +#include <stdio_ext.h> + +size_t __freadahead(FILE *f) +{ + return f->rend ? f->rend - f->rpos : 0; +} + +const char *__freadptr(FILE *f, size_t *sizep) +{ + if (f->rpos == f->rend) return 0; + *sizep = f->rend - f->rpos; + return (const char *)f->rpos; +} + +void __freadptrinc(FILE *f, size_t inc) +{ + f->rpos += inc; +} + +void __fseterr(FILE *f) +{ + f->flags |= F_ERR; +} |