| #ifndef _STDIO_IMPL_H |
| #define _STDIO_IMPL_H |
| |
| #include <stdio.h> |
| #include "libc.h" |
| |
| // Slimmed version of stdio_impl.h that only provides the definition of |
| // _IO_FILE, a.k.a. FILE. |
| |
| struct _IO_FILE { |
| unsigned flags; |
| unsigned char *rpos, *rend; |
| int (*close)(FILE *); |
| unsigned char *wend, *wpos; |
| unsigned char *mustbezero_1; |
| unsigned char *wbase; |
| size_t (*read)(FILE *, unsigned char *, size_t); |
| size_t (*write)(FILE *, const unsigned char *, size_t); |
| off_t (*seek)(FILE *, off_t, int); |
| unsigned char *buf; |
| size_t buf_size; |
| FILE *prev, *next; |
| int fd; |
| int pipe_pid; |
| long lockcount; |
| short dummy3; |
| signed char mode; |
| signed char lbf; |
| volatile int lock; |
| volatile int waiters; |
| void *cookie; |
| off_t off; |
| char *getln_buf; |
| void *mustbezero_2; |
| unsigned char *shend; |
| off_t shlim, shcnt; |
| FILE *prev_locked, *next_locked; |
| struct __locale_struct *locale; |
| }; |
| |
| #endif |