From 6466208ec051e58b824cc3c839b6b086ae910fe6 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jul 2016 23:39:51 +0200 Subject: Progress on stdio impementation --- src/lib/include/stdio.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/lib/include') diff --git a/src/lib/include/stdio.h b/src/lib/include/stdio.h index a67553c..5bb3b71 100644 --- a/src/lib/include/stdio.h +++ b/src/lib/include/stdio.h @@ -10,13 +10,22 @@ void setup_libc_stdio(); +#define BUFSIZ 256 + -//TODO below struct file_t { fd_t fd; stat_t st; - int mode; - int flags; + int file_mode; + + size_t pos; + + int buf_mode; + char *out_buf; + size_t out_buf_size, out_buf_used; + bool out_buf_owned; + + int ungetc_char; }; typedef struct file_t FILE; @@ -52,7 +61,6 @@ int fclose(FILE* f); extern FILE *stdin, *stdout, *stderr; -#define BUFSIZ 1024 void setbuf(FILE *stream, char *buf); void setbuffer(FILE *stream, char *buf, size_t size); void setlinebuf(FILE *stream); -- cgit v1.2.3