add IO buffering (setvbuf)
This commit is contained in:
@@ -16,6 +16,9 @@ enum pic_port_status {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
char *buf;
|
||||
int mode;
|
||||
int bufsiz;
|
||||
struct {
|
||||
void *cookie;
|
||||
int (*read)(void *, char *, int);
|
||||
@@ -41,6 +44,7 @@ struct pic_port *pic_stdin(pic_state *);
|
||||
struct pic_port *pic_stdout(pic_state *);
|
||||
struct pic_port *pic_stderr(pic_state *);
|
||||
|
||||
int pic_setvbuf(pic_file *, char *, int, size_t);
|
||||
int pic_fflush(pic_file *);
|
||||
|
||||
pic_file *pic_funopen(void *cookie, int (*read)(void *, char *, int), int (*write)(void *, const char *, int), fpos_t (*seek)(void *, fpos_t, int), int (*close)(void *));
|
||||
|
||||
Reference in New Issue
Block a user