386
|
1 #ifndef __micro_c__
|
61
|
2 #include "/usr/include/stdio.h"
|
232
|
3 long long strtoll(const char *, char **, int);
|
347
|
4 char *malloc(int);
|
357
|
5 void * realloc(void *ptr, size_t size);
|
61
|
6 #else
|
|
7
|
409
|
8 // typedef int size_t;
|
410
|
9 #define size_t int
|
378
|
10
|
255
|
11 long long strtoll(const char *, char **, int);
|
378
|
12 void * realloc(void *ptr, size_t size);
|
232
|
13
|
18
|
14 #ifdef __APPLE__
|
0
|
15
|
116
|
16 typedef struct {
|
|
17 /* char pad[96]; */
|
|
18 char pad[88];
|
|
19 } FILE;
|
18
|
20 extern FILE __sF[];
|
|
21 #define stdin (&__sF[0])
|
|
22 #define stdout (&__sF[1])
|
|
23 #define stderr (&__sF[2])
|
|
24
|
|
25 #else
|
116
|
26 typedef struct {
|
|
27 /* this is all wrong, but so what? */
|
|
28 /* char pad[96]; */
|
|
29 char pad[148];
|
|
30 } FILE;
|
21
|
31 #ifdef bsd
|
0
|
32 extern FILE __sstdin;
|
|
33 extern FILE __sstdout;
|
|
34 extern FILE __sstderr;
|
|
35
|
|
36 #define stdin (&__sstdin)
|
|
37 #define stdout (&__sstdout)
|
|
38 #define stderr (&__sstderr)
|
21
|
39 #else
|
|
40 /* new Linux */
|
|
41 extern FILE *stdin;
|
|
42 extern FILE *stdout;
|
|
43 extern FILE *stderr;
|
|
44 /*
|
|
45 #define stdin stdin
|
|
46 #define stdout stdout
|
|
47 #define stderr stderr
|
|
48 */
|
|
49 #endif
|
18
|
50 #endif
|
19
|
51
|
0
|
52 #define BUFSIZ 1024 /* size of buffer used by setbuf */
|
|
53 #define EOF (-1)
|
|
54 #define NULL 0
|
|
55
|
282
|
56 typedef int SIZE_T_;
|
0
|
57 typedef /*long*/ int fpos_t;
|
304
|
58 // typedef void *__gnuc_va_list;
|
0
|
59
|
|
60 void clearerr(FILE *);
|
|
61 int fclose(FILE *);
|
|
62 int feof(FILE *);
|
|
63 int ferror(FILE *);
|
|
64 int fflush(FILE *);
|
|
65 int fgetc(FILE *);
|
|
66 int fgetpos(FILE *, fpos_t *);
|
|
67 int fileno(FILE *);
|
|
68 void flockfile();
|
19
|
69
|
0
|
70 int fprintf(FILE *, const char *, ...);
|
|
71 int fpurge();
|
|
72 int fputc(int, FILE *);
|
|
73 int fputs(const char *, FILE *);
|
282
|
74 SIZE_T_ fread(void *, size_t, size_t, FILE *);
|
0
|
75 int fscanf(FILE *, const char *, ...);
|
19
|
76
|
0
|
77 /* int fseek(FILE *, long int, int); */
|
19
|
78
|
0
|
79 int fsetpos(FILE *, const fpos_t *);
|
|
80 long ftell(FILE *);
|
|
81 int ftrylockfile();
|
|
82 void funlockfile();
|
282
|
83 SIZE_T_ fwrite(const void *, size_t, size_t, FILE *);
|
0
|
84 int getc(FILE *);
|
|
85 int getc_unlocked();
|
|
86 int getchar(void);
|
|
87 int getchar_unlocked();
|
|
88 int getw(FILE *);
|
|
89 int pclose(FILE *);
|
|
90 void perror(const char *);
|
|
91 int printf(const char *, ...);
|
|
92 int putc(int, FILE *);
|
|
93 int putc_unlocked();
|
|
94 int putchar(int);
|
|
95 int putchar_unlocked();
|
|
96 int puts(const char *);
|
|
97 int putw(int, FILE *);
|
|
98 int remove(const char *);
|
|
99 int rename (const char *, const char *);
|
|
100 void rewind(FILE *);
|
|
101 int scanf(const char *, ...);
|
|
102 void setbuf(FILE *, char *);
|
|
103 void setbuffer();
|
|
104 int setlinebuf();
|
282
|
105 int setvbuf(FILE *, char *, int, SIZE_T_);
|
0
|
106 int snprintf();
|
|
107 int sprintf(char *, const char *, ...);
|
|
108 int sscanf(const char *, const char *, ...);
|
|
109 int ungetc(int, FILE *);
|
304
|
110 // int vfprintf(FILE *, const char *, __gnuc_va_list);
|
0
|
111 int vfscanf();
|
304
|
112 // int vprintf(const char *, __gnuc_va_list);
|
0
|
113 int vscanf();
|
|
114 int vsnprintf();
|
304
|
115 // int vsprintf(char *, const char *, __gnuc_va_list);
|
0
|
116 int vsscanf();
|
|
117 char *ctermid(char *);
|
|
118 FILE *fdopen(int, const char *);
|
|
119 char *fgetln();
|
|
120 char *fgets(char *, int, FILE *);
|
|
121 FILE *fopen(const char *, const char *);
|
|
122 FILE *freopen(const char *, const char *, FILE *);
|
|
123 FILE *funopen();
|
|
124 char *gets(char *);
|
|
125 FILE *popen(const char *, const char *);
|
|
126 char *tempnam(const char *, const char *);
|
|
127 FILE *tmpfile(void);
|
|
128 char *tmpnam(char *);
|
61
|
129 #endif
|