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
17 _stdout_r(@var
{reent
})
18 _stderr_r(@var
{reent
})
22 instead of the globals @code
{stdin
}, @code
{stdout
}, and
23 @code
{stderr
}. The argument <
[reent
]> is a pointer to a reentrancy
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)
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
71 @include stdio/clearerr.def
74 @include stdio/fclose.def
77 @include stdio/feof.def
80 @include stdio/ferror.def
83 @include stdio/fflush.def
86 @include stdio/fgetc.def
89 @include stdio/fgetpos.def
92 @include stdio/fgets.def
95 @include stdio/fiprintf.def
98 @include stdio/fopen.def
101 @include stdio/fdopen.def
104 @include stdio/fputc.def
107 @include stdio/fputs.def
110 @include stdio/fread.def
113 @include stdio/freopen.def
116 @include stdio/fseek.def
119 @include stdio/fsetpos.def
122 @include stdio/ftell.def
125 @include stdio/fwrite.def
128 @include stdio/getc.def
131 @include stdio/getchar.def
134 @include stdio/gets.def
137 @include stdio/getw.def
140 @include stdio/iprintf.def
143 @include stdio/mktemp.def
146 @include stdio/perror.def
149 @include stdio/putc.def
152 @include stdio/putchar.def
155 @include stdio/puts.def
158 @include stdio/putw.def
161 @include stdio/remove.def
164 @include stdio/rename.def
167 @include stdio/rewind.def
170 @include stdio/setbuf.def
173 @include stdio/setvbuf.def
176 @include stdio/siprintf.def
179 @include stdio/sprintf.def
182 @include stdio/sscanf.def
185 @include stdio/tmpfile.def
188 @include stdio/tmpnam.def
191 @include stdio/vfprintf.def