blob: 5052636eadc075dab58410cf2ccf469790a680e7 [file] [log] [blame]
Travis Geiselbrechteb946052008-09-07 22:32:49 -07001#ifndef __STDIO_H
2#define __STDIO_H
3
4#include <debug.h>
5#include <printf.h>
6
Unnati Gandhi7c536732014-07-17 14:37:49 +05307typedef 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 Geiselbrechteb946052008-09-07 22:32:49 -070017void putc(char c);
18int puts(const char *str);
19int getc(char *c); // XXX not really getc
Unnati Gandhi7c536732014-07-17 14:37:49 +053020size_t fwrite(const void *buf, size_t size, size_t count, FILE *stream);
21int sscanf(const char *str, const char *format, ...);
Travis Geiselbrechteb946052008-09-07 22:32:49 -070022
23#endif
24