annotate stdio.h @ 19:b62230ea38f6

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