From 9fbf7e191494803172d61722314105308f1b2842 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 16 Jan 2014 20:27:39 +0900 Subject: [PATCH] cleanup --- include/picrin/port.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/picrin/port.h b/include/picrin/port.h index 44f2299f..6bb4b173 100644 --- a/include/picrin/port.h +++ b/include/picrin/port.h @@ -58,12 +58,14 @@ struct pic_port *pic_stdin(pic_state *); struct pic_port *pic_stdout(pic_state *); struct pic_port *pic_stderr(pic_state *); +/* generic file constructor */ +pic_file *pic_funopen(void *cookie, int (*read)(void *, char *, int), int (*write)(void *, const char *, int), long (*seek)(void *, long, int), int (*close)(void *)); + +/* buffering */ int pic_setvbuf(pic_file *, char *, int, size_t); int pic_fflush(pic_file *); int pic_ffill(pic_file *); -pic_file *pic_funopen(void *cookie, int (*read)(void *, char *, int), int (*write)(void *, const char *, int), long (*seek)(void *, long, int), int (*close)(void *)); - /* file access */ pic_file *pic_fopen(const char *, const char *); int pic_fclose(pic_file *);