10 #include <stddef.h> // size_t
13 typedef struct sFILE FILE;
15 /* === CONSTANTS === */
29 #ifdef ARCHDIR_is_native
30 #define printf acess_printf
31 #define vsprintf acess_vsprintf
32 #define vsnprintf acess_vsnprintf
33 #define sprintf acess_sprintf
34 #define snprintf acess_snprintf
35 #define vprintf acess_vprintf
36 #define vfprintf acess_vfprintf
37 #define fopen acess_fopen
38 #define fdopen acess_fdopen
39 #define freopen acess_freopen
40 #define fclose acess_fclose
42 #define putchar acess_putchar
43 #define getchar acess_getchar
45 #define stdin acess_stdin
46 #define stdout acess_stdout
49 /* --- Standard IO --- */
50 extern int printf(const char *format, ...);
51 extern int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list args);
52 extern int vsprintf(char *buf, const char *format, va_list args);
53 extern int sprintf(char *buf, const char *format, ...);
54 extern int snprintf(char *buf, size_t maxlen, const char *format, ...);
55 extern void perror(const char *s);
57 extern FILE *fopen(const char *file, const char *mode);
58 extern FILE *freopen(const char *file, const char *mode, FILE *fp);
59 extern FILE *fdopen(int fd, const char *modes);
60 extern int fclose(FILE *fp);
61 extern void fflush(FILE *fp);
62 extern off_t ftell(FILE *fp);
63 extern int fseek(FILE *fp, long int amt, int whence);
64 extern void clearerr(FILE *stream);
65 extern int feof(FILE *stream);
66 extern int ferror(FILE *stream);
67 extern int fileno(FILE *stream);
69 extern size_t fread(void *buf, size_t size, size_t n, FILE *fp);
70 extern size_t fwrite(const void *buf, size_t size, size_t n, FILE *fp);
71 extern int fgetc(FILE *fp);
72 #define getc(fp) fgetc(fp)
73 extern char *fgets(char *s, int size, FILE *fp);
74 extern int fputc(int ch, FILE *fp);
75 extern int fputs(const char *s, FILE *fp);
76 extern int getchar(void);
77 extern int putchar(int ch);
79 extern int fprintf(FILE *fp, const char *format, ...);
80 extern int vfprintf(FILE *fp, const char *format, va_list args);
83 extern int scanf(const char *format, ...);
84 extern int fscanf(FILE *stream, const char *format, ...);
85 extern int sscanf(const char *str, const char *format, ...);
86 extern int vscanf(const char *format, va_list ap);
87 extern int vsscanf(const char *str, const char *format, va_list ap);
88 extern int vfscanf(FILE *stream, const char *format, va_list ap);