提交 e15171b8 编写于 作者: R Rich Felker

add new stdio extension functions to make gnulib happy

this is mildly ugly, but less ugly than gnulib trying to poke at the
definition of the FILE structure...
上级 a71e0af2
#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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册