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 * iprintf:: Write formatted output (integer only)
50 * mktemp:: Generate unused file name
51 * perror:: Print an error message on standard error
52 * putc:: Write a character on a stream or file (macro)
53 * putchar:: Write a character on standard output (macro)
54 * puts:: Write a character string on standard output
55 * remove:: Delete a file's name
56 * rename:: Rename a file
57 * rewind:: Reinitialize a file or stream
58 * setbuf:: Specify full buffering for a file or stream
59 * setvbuf:: Specify buffering for a file or stream
60 * siprintf:: Write formatted output (integer only)
61 * printf:: Write formatted output
62 * scanf:: Scan and format input
63 * tmpfile:: Create a temporary file
64 * tmpnam:: Generate name for a temporary file
65 * vprintf:: Format variable argument list
69 @include stdio/clearerr.def
72 @include stdio/fclose.def
75 @include stdio/feof.def
78 @include stdio/ferror.def
81 @include stdio/fflush.def
84 @include stdio/fgetc.def
87 @include stdio/fgetpos.def
90 @include stdio/fgets.def
93 @include stdio/fiprintf.def
96 @include stdio/fopen.def
99 @include stdio/fdopen.def
102 @include stdio/fputc.def
105 @include stdio/fputs.def
108 @include stdio/fread.def
111 @include stdio/freopen.def
114 @include stdio/fseek.def
117 @include stdio/fsetpos.def
120 @include stdio/ftell.def
123 @include stdio/fwrite.def
126 @include stdio/getc.def
129 @include stdio/getchar.def
132 @include stdio/gets.def
135 @include stdio/iprintf.def
138 @include stdio/mktemp.def
141 @include stdio/perror.def
144 @include stdio/putc.def
147 @include stdio/putchar.def
150 @include stdio/puts.def
153 @include stdio/remove.def
156 @include stdio/rename.def
159 @include stdio/rewind.def
162 @include stdio/setbuf.def
165 @include stdio/setvbuf.def
168 @include stdio/siprintf.def
171 @include stdio/sprintf.def
174 @include stdio/sscanf.def
177 @include stdio/tmpfile.def
180 @include stdio/tmpnam.def
183 @include stdio/vfprintf.def