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