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