Travis Geiselbrecht | eb94605 | 2008-09-07 22:32:49 -0700 | [diff] [blame] | 1 | #ifndef __STDIO_H |
| 2 | #define __STDIO_H |
| 3 | |
| 4 | #include <debug.h> |
| 5 | #include <printf.h> |
| 6 | |
Unnati Gandhi | 7c53673 | 2014-07-17 14:37:49 +0530 | [diff] [blame] | 7 | typedef struct { |
| 8 | char *fpos; /* Current position of file pointer (absolute address) */ |
| 9 | void *base; /* Pointer to the base of the file */ |
| 10 | unsigned short handle; /* File handle */ |
| 11 | short flags; /* Flags (see FileFlags) */ |
| 12 | short unget; /* 1-byte buffer for ungetc (b15=1 if non-empty) */ |
| 13 | unsigned long alloc; /* Number of currently allocated bytes for the file */ |
| 14 | unsigned short buffincrement; /* Number of bytes allocated at once */ |
| 15 | } FILE; |
| 16 | |
Travis Geiselbrecht | eb94605 | 2008-09-07 22:32:49 -0700 | [diff] [blame] | 17 | void putc(char c); |
| 18 | int puts(const char *str); |
| 19 | int getc(char *c); // XXX not really getc |
Unnati Gandhi | 7c53673 | 2014-07-17 14:37:49 +0530 | [diff] [blame] | 20 | size_t fwrite(const void *buf, size_t size, size_t count, FILE *stream); |
| 21 | int sscanf(const char *str, const char *format, ...); |
Travis Geiselbrecht | eb94605 | 2008-09-07 22:32:49 -0700 | [diff] [blame] | 22 | |
| 23 | #endif |
| 24 | |