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