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