annotate tools/stdio.h.linuxzurus @ 863:e253ffedf947

recursive macro fix ( at last )
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 31 Mar 2014 19:12:09 +0900
parents 559eb65d1289
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
568
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
1 #ifndef __micro_c__
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
2 // #include "/usr/include/stdio.h"
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
3 #include "/home/zaurus/develop/include/stdio.h"
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
4 long long strtoll(const char *, char **, int);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
5 char *malloc(int);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
6 void * realloc(void *ptr, int size);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
7 #else
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
8
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
9 // typedef int size_t;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
10 #define size_t int
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
11
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
12 long long strtoll(const char *, char **, int);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
13 void * realloc(void *ptr, size_t size);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
14
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
15 #ifdef __APPLE__
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
16
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
17 typedef struct {
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
18 /* char pad[96]; */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
19 char pad[88];
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
20 } FILE;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
21 extern FILE __sF[];
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
22 #define stdin (&__sF[0])
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
23 #define stdout (&__sF[1])
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
24 #define stderr (&__sF[2])
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
25
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
26 #else
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
27 typedef struct {
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
28 /* this is all wrong, but so what? */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
29 /* char pad[96]; */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
30 char pad[148];
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
31 } FILE;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
32 #ifdef bsd
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
33 extern FILE __sstdin;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
34 extern FILE __sstdout;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
35 extern FILE __sstderr;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
36
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
37 #define stdin (&__sstdin)
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
38 #define stdout (&__sstdout)
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
39 #define stderr (&__sstderr)
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
40 #else
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
41 /* new Linux */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
42 extern FILE *stdin;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
43 extern FILE *stdout;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
44 extern FILE *stderr;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
45 /*
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
46 #define stdin stdin
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
47 #define stdout stdout
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
48 #define stderr stderr
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
49 */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
50 #endif
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
51 #endif
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
52
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
53 #define BUFSIZ 1024 /* size of buffer used by setbuf */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
54 #define EOF (-1)
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
55 #define NULL 0
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
56
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
57 typedef int SIZE_T_;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
58 typedef /*long*/ int fpos_t;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
59 // typedef void *__gnuc_va_list;
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
60
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
61 void clearerr(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
62 int fclose(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
63 int feof(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
64 int ferror(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
65 int fflush(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
66 int fgetc(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
67 int fgetpos(FILE *, fpos_t *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
68 int fileno(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
69 void flockfile();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
70
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
71 int fprintf(FILE *, const char *, ...);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
72 int fpurge();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
73 int fputc(int, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
74 int fputs(const char *, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
75 SIZE_T_ fread(void *, size_t, size_t, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
76 int fscanf(FILE *, const char *, ...);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
77
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
78 /* int fseek(FILE *, long int, int); */
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
79
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
80 int fsetpos(FILE *, const fpos_t *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
81 long ftell(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
82 int ftrylockfile();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
83 void funlockfile();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
84 SIZE_T_ fwrite(const void *, size_t, size_t, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
85 int getc(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
86 int getc_unlocked();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
87 int getchar(void);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
88 int getchar_unlocked();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
89 int getw(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
90 int pclose(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
91 void perror(const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
92 int printf(const char *, ...);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
93 int putc(int, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
94 int putc_unlocked();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
95 int putchar(int);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
96 int putchar_unlocked();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
97 int puts(const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
98 int putw(int, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
99 int remove(const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
100 int rename (const char *, const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
101 void rewind(FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
102 int scanf(const char *, ...);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
103 void setbuf(FILE *, char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
104 void setbuffer();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
105 int setlinebuf();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
106 int setvbuf(FILE *, char *, int, SIZE_T_);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
107 int snprintf();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
108 int sprintf(char *, const char *, ...);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
109 int sscanf(const char *, const char *, ...);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
110 int ungetc(int, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
111 // int vfprintf(FILE *, const char *, __gnuc_va_list);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
112 int vfscanf();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
113 // int vprintf(const char *, __gnuc_va_list);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
114 int vscanf();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
115 int vsnprintf();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
116 // int vsprintf(char *, const char *, __gnuc_va_list);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
117 int vsscanf();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
118 char *ctermid(char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
119 FILE *fdopen(int, const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
120 char *fgetln();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
121 char *fgets(char *, int, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
122 FILE *fopen(const char *, const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
123 FILE *freopen(const char *, const char *, FILE *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
124 FILE *funopen();
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
125 char *gets(char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
126 FILE *popen(const char *, const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
127 char *tempnam(const char *, const char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
128 FILE *tmpfile(void);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
129 char *tmpnam(char *);
559eb65d1289 *** empty log message ***
kono
parents:
diff changeset
130 #endif