From 3d72464e80a0124aa276e8dae7f09d39365684ab Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 16 Jan 2014 18:36:59 +0900 Subject: [PATCH] impl pic_fflush --- src/port.c | 6 ++++++ 1 file changed, 6 insertions(+) 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),