<stdio.h>
The <stdio.h
> include file defines constants, macros, and types, and declares stream input and output functions. The stream I/O functions are:
_C_Get_Ssn_Handle clearerr fclose fdopen 2feof ferror fflush fgetc fgetpos fgets fgetwc1 fgetws1 fileno 2fopen |
fprintf fputc _fputchar fputs fputwc1 fputws1 fread freopen fscanf fseek fsetpos ftell fwide1 fwprintf1 |
fwrite fwscanf1 getc getchar gets getwc1 getwchar1 perror printf putc putchar puts putwc1 putwchar1 |
remove rename rewind scanf setbuf setvbuf snprintf sprintf sscanf tmpfile tmpnam ungetc ungetwc1 vfprintf |
vfscanf vfwprintf1 vfwscanf 1vprintf vscanf vsscanf vsnprintf vsprintf vwprintf1 vwscanf 1wfopen 2wprintf1 wscanf1 |
Note: 1 These functions are not available when either LOCALETYPE(*CLD) or SYSIFCOPT(*NOIFSIO) is specified on the compilation command.
Note: 2 These functions are available when SYSIFCOPT(*IFSIO) is specified on the compilation command.
|
stdio.h
> include file also defines the macros that are listed below. You can use these constants in your programs, but you should not alter their values. BUFSIZ
- Specifies the buffer size that the
setbuf
library function will use when you are allocating buffers for stream I/O. This value establishes the size of system-allocated buffers and is used withsetbuf
. EOF
- The value that is returned by an I/O function when the end of the file (or in some cases, an error) is found.
FOPEN_MAX
- The number of files that can be opened simultaneously.
FILENAME_MAX
- The longest file name that is supported. If there is no reasonable limit,
FILENAME_MAX
will be the recommended size. L_tmpnam
- The size of the longest temporary name that can be generated by the
tmpnam
function. TMP_MAX
- The minimum number of unique file names that can be generated by the
tmpnam
function. NULL
- A pointer guaranteed not to point to a data object.
The FILE
structure type is defined in <stdio.h
>. Stream I⁄O functions use a pointer to the FILE
type to get access to a given stream. The system uses the information in the FILE
structure to maintain the stream.
When integrated file system is enabled with a compilation parameter SYSIFCOPT(*IFSIO), ifs.h
is included into <stdio.h
>.
The C standard streams stdin
, stdout
, and stderr
are also defined in <stdio.h>.
The macros SEEK_CUR
, SEEK_END
, and SEEK_SET
expand to integral constant expressions and can be used as the third argument to fseek()
.
The macros _IOFBF
, _IOLBF
, and _IONBF
expand to integral constant expressions with distinct values suitable for use as the third argument to the setvbuf
function.
The type fpos_t
is defined in <stdio.h> for use with fgetpos()
and fsetpos()
.
See <stddef.h> for more information about NULL
.