impl pic_fflush

This commit is contained in:
Yuichi Nishiwaki 2014-01-16 18:36:59 +09:00
parent eca456f875
commit 3d72464e80
1 changed files with 6 additions and 0 deletions

View File

@ -63,6 +63,12 @@ pic_setvbuf(pic_file *file, char *buf, int mode, size_t bufsiz)
return 0;
}
int
pic_fflush(pic_file *file)
{
return file->vtable.write(file->vtable.cookie, file->s, file->c - file->s);
}
pic_file *
pic_funopen(void *cookie,
int (*read)(void *, char *, int),