10 #include <stddef.h> // size_t
17 typedef struct sFILE FILE;
19 /* === CONSTANTS === */
33 #ifdef ARCHDIR_is_native
34 #define printf acess_printf
35 #define vsnprintf acess_vsnprintf
36 #define vsprintf acess_vsprintf
37 #define vprintf acess_vprintf
38 #define sprintf acess_sprintf
39 #define snprintf acess_snprintf
40 #define perror acess_perror
42 #define fopen acess_fopen
43 #define fdopen acess_fdopen
44 #define freopen acess_freopen
45 #define fmemopen acess_fmemopen
46 #define open_memstream acess_open_memstream
47 #define fdopen acess_fdopen
48 #define fclose acess_fclose
49 #define ftell acess_ftell
50 #define fseek acess_fseek
51 #define clearerr acess_clearerr
52 #define feof acess_feof
53 #define ferr acess_ferr
54 #define fileno acess_fileno
56 #define fread acess_fread
57 #define fwrite acess_fwrite
58 #define fgetc acess_fgetc
59 #define fgets acess_fgets
60 #define fputc acess_fputc
61 #define fputs acess_fputs
62 #define getchar acess_getchar
63 #define putchar acess_putchar
65 #define rename acess_rename
67 #define fprintf acess_fprintf
68 #define vfprintf acess_vfprintf
70 #define scanf acess_scanf
71 #define fscanf acess_fscanf
72 #define sscanf acess_sscanf
73 #define vscanf acess_vscanf
74 #define vsscanf acess_vsscanf
75 #define vfscanf acess_vfscanf
77 #define stdin acess_stdin
78 #define stdout acess_stdout
79 #define stderr acess_stderr
82 /* --- Standard IO --- */
83 extern int printf(const char *format, ...);
84 extern int vsnprintf(char *buf, size_t __maxlen, const char *format, va_list args);
85 extern int vsprintf(char *buf, const char *format, va_list args);
86 extern int sprintf(char *buf, const char *format, ...);
87 extern int snprintf(char *buf, size_t maxlen, const char *format, ...);
88 extern void perror(const char *s);
90 extern FILE *fopen(const char *file, const char *mode);
91 extern FILE *freopen(const char *file, const char *mode, FILE *fp);
92 extern FILE *fmemopen(void *buffer, size_t length, const char *mode);
93 extern FILE *open_memstream(char **bufferptr, size_t *lengthptr);
94 extern FILE *fdopen(int fd, const char *modes);
95 extern FILE *tmpfile(void);
96 extern int fclose(FILE *fp);
97 extern void fflush(FILE *fp);
98 extern off_t ftell(FILE *fp);
99 extern off_t ftello(FILE *fp);
100 extern int fseek(FILE *fp, long int amt, int whence);
101 extern int fseeko(FILE *fp, off_t amt, int whence);
102 extern void clearerr(FILE *stream);
103 extern int feof(FILE *stream);
104 extern int ferror(FILE *stream);
105 extern int fileno(FILE *stream);
107 extern size_t fread(void *buf, size_t size, size_t n, FILE *fp);
108 extern size_t fwrite(const void *buf, size_t size, size_t n, FILE *fp);
109 extern int fgetc(FILE *fp);
110 #define getc(fp) fgetc(fp)
111 extern int ungetc(int c, FILE *fp);
112 extern char *fgets(char *s, int size, FILE *fp);
113 extern int fputc(int ch, FILE *fp);
114 extern int fputs(const char *s, FILE *fp);
115 extern int getchar(void);
116 extern int putchar(int ch);
118 extern int fprintf(FILE *fp, const char *format, ...);
119 extern int vfprintf(FILE *fp, const char *format, va_list args);
121 extern int rename(const char *oldpath, const char *newpath);
124 extern int scanf(const char *format, ...);
125 extern int fscanf(FILE *stream, const char *format, ...);
126 extern int sscanf(const char *str, const char *format, ...);
127 extern int vscanf(const char *format, va_list ap);
128 extern int vsscanf(const char *str, const char *format, va_list ap);
129 extern int vfscanf(FILE *stream, const char *format, va_list ap);