1 #include "stdio_impl.h" 2 #include <stdio_ext.h> 3 __freadahead(FILE * f)4size_t __freadahead(FILE *f) 5 { 6 return f->rend ? f->rend - f->rpos : 0; 7 } 8 __freadptr(FILE * f,size_t * sizep)9const char *__freadptr(FILE *f, size_t *sizep) 10 { 11 if (f->rpos == f->rend) return 0; 12 *sizep = f->rend - f->rpos; 13 return (const char *)f->rpos; 14 } 15 __freadptrinc(FILE * f,size_t inc)16void __freadptrinc(FILE *f, size_t inc) 17 { 18 f->rpos += inc; 19 } 20 __fseterr(FILE * f)21void __fseterr(FILE *f) 22 { 23 f->flags |= F_ERR; 24 } 25