diff --git a/src/port.c b/src/port.c index 2c7fd2c7..e569ca3d 100644 --- a/src/port.c +++ b/src/port.c @@ -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),