annotate stdio.template @ 890:9d5da127f462

inline partial struct init in declaration.
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 06 Apr 2014 12:49:08 +0900
parents c005a392e27e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
594
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
1 #ifndef __micro_c___
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
2 #ifndef __ARM_ARCH_4__
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 32
diff changeset
3 #include "/usr/include/stdio.h"
594
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
4 #else /* __ARM_ARCH_4__ */
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
5 #include "/home/zaurus/develop/include/stdio.h"
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
6 #endif /* __ARM_ARCH_4__ */
232
8a23c20ac92d *** empty log message ***
kono
parents: 194
diff changeset
7 long long strtoll(const char *, char **, int);
594
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
8 #ifndef __ARM_ARCH_4__
569
1fcad06b264a gcc4 (ia32)
kono
parents: 565
diff changeset
9 void * malloc(size_t size);
357
1057d6740a36 *** empty log message ***
kono
parents: 354
diff changeset
10 void * realloc(void *ptr, size_t size);
594
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
11 #else /* __ARM_ARCH_4__ */
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
12 char *malloc(int);
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
13 void * realloc(void *ptr, int size);
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
14 #endif /* __ARM_ARCH_4__ */
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 32
diff changeset
15 #else
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 32
diff changeset
16
409
b72682778d75 ARM varargs
kono
parents: 386
diff changeset
17 // typedef int size_t;
410
5a3b1b65c6a8 ARM self compile almost passed.
kono
parents: 409
diff changeset
18 #define size_t int
378
b3c6c479c522 ARM continue...
kono
parents: 362
diff changeset
19
594
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
20 #ifndef __ARM_ARCH_4__
569
1fcad06b264a gcc4 (ia32)
kono
parents: 565
diff changeset
21 void * malloc(size_t size);
594
f49c825920c4 tosop optimize buf fix
kono
parents: 592
diff changeset
22 #endif /* ! __ARM_ARCH_4__ */
255
8cd8d72286ae PowerPC long long complex function call fix.
kono
parents: 253
diff changeset
23 long long strtoll(const char *, char **, int);
378
b3c6c479c522 ARM continue...
kono
parents: 362
diff changeset
24 void * realloc(void *ptr, size_t size);
232
8a23c20ac92d *** empty log message ***
kono
parents: 194
diff changeset
25
18
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
26 #ifdef __APPLE__
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
27
116
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
28 typedef struct {
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
29 /* char pad[96]; */
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
30 char pad[88];
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
31 } FILE;
18
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
32 extern FILE __sF[];
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
33 #define stdin (&__sF[0])
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
34 #define stdout (&__sF[1])
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
35 #define stderr (&__sF[2])
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
36
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
37 #else
116
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
38 typedef struct {
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
39 /* this is all wrong, but so what? */
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
40 /* char pad[96]; */
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
41 char pad[148];
b14ff9671c90 register offset fix
kono
parents: 61
diff changeset
42 } FILE;
21
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
43 #ifdef bsd
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
44 extern FILE __sstdin;
d35df41eac69 Initial revision
kono
parents:
diff changeset
45 extern FILE __sstdout;
d35df41eac69 Initial revision
kono
parents:
diff changeset
46 extern FILE __sstderr;
d35df41eac69 Initial revision
kono
parents:
diff changeset
47
d35df41eac69 Initial revision
kono
parents:
diff changeset
48 #define stdin (&__sstdin)
d35df41eac69 Initial revision
kono
parents:
diff changeset
49 #define stdout (&__sstdout)
d35df41eac69 Initial revision
kono
parents:
diff changeset
50 #define stderr (&__sstderr)
21
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
51 #else
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
52 /* new Linux */
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
53 extern FILE *stdin;
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
54 extern FILE *stdout;
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
55 extern FILE *stderr;
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
56 /*
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
57 #define stdin stdin
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
58 #define stdout stdout
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
59 #define stderr stderr
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
60 */
f9f789aa7587 Linux version (Redhat 7.2)
kono
parents: 20
diff changeset
61 #endif
18
df7fa8cee67b pass -Wall
kono
parents: 0
diff changeset
62 #endif
19
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
63
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
64 #define BUFSIZ 1024 /* size of buffer used by setbuf */
d35df41eac69 Initial revision
kono
parents:
diff changeset
65 #define EOF (-1)
d35df41eac69 Initial revision
kono
parents:
diff changeset
66 #define NULL 0
d35df41eac69 Initial revision
kono
parents:
diff changeset
67
282
d61cf7a9b469 first jmp in MIPS
kono
parents: 280
diff changeset
68 typedef int SIZE_T_;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
69 typedef /*long*/ int fpos_t;
304
9df8aa0497ea fix line continuation and #macro in string.
kono
parents: 303
diff changeset
70 // typedef void *__gnuc_va_list;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
71
d35df41eac69 Initial revision
kono
parents:
diff changeset
72 void clearerr(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
73 int fclose(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
74 int feof(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
75 int ferror(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
76 int fflush(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
77 int fgetc(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
78 int fgetpos(FILE *, fpos_t *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
79 int fileno(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
80 void flockfile();
19
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
81
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
82 int fprintf(FILE *, const char *, ...);
d35df41eac69 Initial revision
kono
parents:
diff changeset
83 int fpurge();
d35df41eac69 Initial revision
kono
parents:
diff changeset
84 int fputc(int, FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
85 int fputs(const char *, FILE *);
282
d61cf7a9b469 first jmp in MIPS
kono
parents: 280
diff changeset
86 SIZE_T_ fread(void *, size_t, size_t, FILE *);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
87 int fscanf(FILE *, const char *, ...);
19
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
88
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
89 /* int fseek(FILE *, long int, int); */
19
b62230ea38f6 ifdef debug
kono
parents: 18
diff changeset
90
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
91 int fsetpos(FILE *, const fpos_t *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
92 long ftell(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
93 int ftrylockfile();
d35df41eac69 Initial revision
kono
parents:
diff changeset
94 void funlockfile();
282
d61cf7a9b469 first jmp in MIPS
kono
parents: 280
diff changeset
95 SIZE_T_ fwrite(const void *, size_t, size_t, FILE *);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
96 int getc(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
97 int getc_unlocked();
d35df41eac69 Initial revision
kono
parents:
diff changeset
98 int getchar(void);
d35df41eac69 Initial revision
kono
parents:
diff changeset
99 int getchar_unlocked();
d35df41eac69 Initial revision
kono
parents:
diff changeset
100 int getw(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
101 int pclose(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
102 void perror(const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
103 int printf(const char *, ...);
d35df41eac69 Initial revision
kono
parents:
diff changeset
104 int putc(int, FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
105 int putc_unlocked();
d35df41eac69 Initial revision
kono
parents:
diff changeset
106 int putchar(int);
d35df41eac69 Initial revision
kono
parents:
diff changeset
107 int putchar_unlocked();
d35df41eac69 Initial revision
kono
parents:
diff changeset
108 int puts(const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
109 int putw(int, FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
110 int remove(const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
111 int rename (const char *, const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
112 void rewind(FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
113 int scanf(const char *, ...);
d35df41eac69 Initial revision
kono
parents:
diff changeset
114 void setbuf(FILE *, char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
115 void setbuffer();
d35df41eac69 Initial revision
kono
parents:
diff changeset
116 int setlinebuf();
282
d61cf7a9b469 first jmp in MIPS
kono
parents: 280
diff changeset
117 int setvbuf(FILE *, char *, int, SIZE_T_);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
118 int snprintf();
d35df41eac69 Initial revision
kono
parents:
diff changeset
119 int sprintf(char *, const char *, ...);
d35df41eac69 Initial revision
kono
parents:
diff changeset
120 int sscanf(const char *, const char *, ...);
d35df41eac69 Initial revision
kono
parents:
diff changeset
121 int ungetc(int, FILE *);
304
9df8aa0497ea fix line continuation and #macro in string.
kono
parents: 303
diff changeset
122 // int vfprintf(FILE *, const char *, __gnuc_va_list);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
123 int vfscanf();
304
9df8aa0497ea fix line continuation and #macro in string.
kono
parents: 303
diff changeset
124 // int vprintf(const char *, __gnuc_va_list);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
125 int vscanf();
d35df41eac69 Initial revision
kono
parents:
diff changeset
126 int vsnprintf();
304
9df8aa0497ea fix line continuation and #macro in string.
kono
parents: 303
diff changeset
127 // int vsprintf(char *, const char *, __gnuc_va_list);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
128 int vsscanf();
d35df41eac69 Initial revision
kono
parents:
diff changeset
129 char *ctermid(char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
130 FILE *fdopen(int, const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
131 char *fgetln();
d35df41eac69 Initial revision
kono
parents:
diff changeset
132 char *fgets(char *, int, FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
133 FILE *fopen(const char *, const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
134 FILE *freopen(const char *, const char *, FILE *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
135 FILE *funopen();
d35df41eac69 Initial revision
kono
parents:
diff changeset
136 char *gets(char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
137 FILE *popen(const char *, const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
138 char *tempnam(const char *, const char *);
d35df41eac69 Initial revision
kono
parents:
diff changeset
139 FILE *tmpfile(void);
d35df41eac69 Initial revision
kono
parents:
diff changeset
140 char *tmpnam(char *);
61
8ffb8ca3fe34 separation of architecture dependent part.
kono
parents: 32
diff changeset
141 #endif