<stdio.h>
The <stdio.h> include file defines constants, macros, and types, and declares stream input and output functions. 串流 I/O 功能如下:
_C_Get_Ssn_Handleclearerrfclosefdopen2feofferrorfflushfgetcfgetposfgetsfgetwc1fgetws1fileno2fopen |
fprintffputc_fputcharfputsfputwc1fputws1freadfreopenfscanffseekfsetposftellfwide1fwprintf1 |
fwritefwscanf1getcgetchargetsgetwc1getwchar1perrorprintfputcputcharputsputwc1putwchar1 |
removerenamerewindscanfsetbufsetvbufsnprintfsprintfsscanftmpfiletmpnamungetcungetwc1vfprintf |
vfscanfvfwprintf1vfwscanf1vprintfvscanfvsscanfvsnprintfvsprintfvwprintf1vwscanf1wfopen2wprintf1wscanf1 |
附註: 1 在編譯指令上指定 LOCALETYPE (*CLD) 或 SYSIFCOPT (*NOIFSIO) 時,無法使用這些函數。
附註: 2 在編譯指令上指定 SYSIFCOPT (*IFSIO) 時,可以使用這些函數。
|
||||
The <
stdio.h> include file also defines the macros that are listed below. 您可以在程式中使用這些常數,但不應變更它們的值。BUFSIZ- 指定當您配置串流 I/O 的緩衝區時,
setbuf程式庫函數將使用的緩衝區大小。 此值會建立系統配置緩衝區的大小,並與setbuf搭配使用。 EOF- 找到檔案結尾 (或在某些情況下,是錯誤) 時 I/O 函數傳回的值。
FOPEN_MAX- 可同步開啟的檔案數目。
FILENAME_MAX- 支援的最長檔名。 如果沒有合理限制,建議的大小為
FILENAME_MAX。 L_tmpnamtmpnam函數可以產生的最長暫時名稱的大小。TMP_MAXtmpnam函數可以產生的唯一檔名數目下限。NULL- 保證不指向資料物件的指標。
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. 系統使用 FILE 結構中的資訊來維護串流。
When integrated file system is enabled with a compilation parameter SYSIFCOPT(*IFSIO), ifs.h is included into <stdio.h>.
C 標準串流 stdin、 stdout和 stderr 也定義在 <stdio.h>中。
巨集 SEEK_CUR、 SEEK_END及 SEEK_SET 展開為整數常數表示式,可用作 fseek()的第三個引數。
巨集 _IOFBF、 _IOLBF及 _IONBF 會展開為具有相異值的整數常數表示式,適合用作 setvbuf 函數的第三個引數。
fpos_t 類型定義在 <stdio.h> 中,以與 fgetpos() 和 fsetpos()搭配使用。
如需 NULL的相關資訊,請參閱 <stddef.h> 。