fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / stdio / stdio.tex
blob217aed1efcf5d0bdea0b270331482f9dbb276eda
1 @node Stdio
2 @chapter Input and Output (@file{stdio.h})
4 This chapter comprises functions to manage files
5 or other input/output streams. Among these functions are subroutines
6 to generate or scan strings according to specifications from a format string.
8 The underlying facilities for input and output depend on the host
9 system, but these functions provide a uniform interface.
11 The corresponding declarations are in @file{stdio.h}.
13 The reentrant versions of these functions use macros
15 @example
16 _stdin_r(@var{reent})
17 _stdout_r(@var{reent})
18 _stderr_r(@var{reent})
19 @end example
21 @noindent
22 instead of the globals @code{stdin}, @code{stdout}, and
23 @code{stderr}. The argument <[reent]> is a pointer to a reentrancy
24 structure.
26 @menu
27 * clearerr:: Clear file or stream error indicator
28 * fclose:: Close a file
29 * feof:: Test for end of file
30 * ferror:: Test whether read/write error has occurred
31 * fflush:: Flush buffered file output
32 * fgetc:: Get a character from a file or stream
33 * fgetpos:: Record position in a stream or file
34 * fgets:: Get character string from a file or stream
35 * fiprintf:: Write formatted output to file (integer only)
36 * fopen:: Open a file
37 * fdopen:: Turn an open file into a stream
38 * fputc:: Write a character on a stream or file
39 * fputs:: Write a character string in a file or stream
40 * fread:: Read array elements from a file
41 * freopen:: Open a file using an existing file descriptor
42 * fseek:: Set file position
43 * fsetpos:: Restore position of a stream or file
44 * ftell:: Return position in a stream or file
45 * fwrite:: Write array elements from memory to a file or stream
46 * getc:: Get a character from a file or stream (macro)
47 * getchar:: Get a character from standard input (macro)
48 * gets:: Get character string from standard input (obsolete)
49 * getw:: Get a word (int) from a file or stream
50 * iprintf:: Write formatted output (integer only)
51 * mktemp:: Generate unused file name
52 * perror:: Print an error message on standard error
53 * putc:: Write a character on a stream or file (macro)
54 * putchar:: Write a character on standard output (macro)
55 * puts:: Write a character string on standard output
56 * putw:: Write a word (int) to a file or stream
57 * remove:: Delete a file's name
58 * rename:: Rename a file
59 * rewind:: Reinitialize a file or stream
60 * setbuf:: Specify full buffering for a file or stream
61 * setvbuf:: Specify buffering for a file or stream
62 * siprintf:: Write formatted output (integer only)
63 * printf:: Write formatted output
64 * scanf:: Scan and format input
65 * tmpfile:: Create a temporary file
66 * tmpnam:: Generate name for a temporary file
67 * vprintf:: Format variable argument list
68 @end menu
70 @page
71 @include stdio/clearerr.def
73 @page
74 @include stdio/fclose.def
76 @page
77 @include stdio/feof.def
79 @page
80 @include stdio/ferror.def
82 @page
83 @include stdio/fflush.def
85 @page
86 @include stdio/fgetc.def
88 @page
89 @include stdio/fgetpos.def
91 @page
92 @include stdio/fgets.def
94 @page
95 @include stdio/fiprintf.def
97 @page
98 @include stdio/fopen.def
100 @page
101 @include stdio/fdopen.def
103 @page
104 @include stdio/fputc.def
106 @page
107 @include stdio/fputs.def
109 @page
110 @include stdio/fread.def
112 @page
113 @include stdio/freopen.def
115 @page
116 @include stdio/fseek.def
118 @page
119 @include stdio/fsetpos.def
121 @page
122 @include stdio/ftell.def
124 @page
125 @include stdio/fwrite.def
127 @page
128 @include stdio/getc.def
130 @page
131 @include stdio/getchar.def
133 @page
134 @include stdio/gets.def
136 @page
137 @include stdio/getw.def
139 @page
140 @include stdio/iprintf.def
142 @page
143 @include stdio/mktemp.def
145 @page
146 @include stdio/perror.def
148 @page
149 @include stdio/putc.def
151 @page
152 @include stdio/putchar.def
154 @page
155 @include stdio/puts.def
157 @page
158 @include stdio/putw.def
160 @page
161 @include stdio/remove.def
163 @page
164 @include stdio/rename.def
166 @page
167 @include stdio/rewind.def
169 @page
170 @include stdio/setbuf.def
172 @page
173 @include stdio/setvbuf.def
175 @page
176 @include stdio/siprintf.def
178 @page
179 @include stdio/sprintf.def
181 @page
182 @include stdio/sscanf.def
184 @page
185 @include stdio/tmpfile.def
187 @page
188 @include stdio/tmpnam.def
190 @page
191 @include stdio/vfprintf.def