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