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