⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stdio.h.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2003 The Open Group, All Rights Reserved --><title>&lt;stdio.h&gt;</title></head><body bgcolor="white"><script type="text/javascript" language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> <a name="&lt;stdio.h&gt;"></a> <a name="tag_13_49"></a><!-- &lt;stdio.h&gt; --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2003 Edition<br>Copyright &copy; 2001-2003 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_13_49_01"></a>NAME</h4><blockquote>stdio.h - standard buffered input/output</blockquote><h4><a name="tag_13_49_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><tt>#include &lt;stdio.h&gt;</tt></p></blockquote><h4><a name="tag_13_49_03"></a>DESCRIPTION</h4><blockquote><div class="box"><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"border="0"> Some of the functionality described on this reference page extends the ISO&nbsp;C standard. Applications shall definethe appropriate feature test macro (see the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../functions/xsh_chap02_02.html">Section 2.2, The Compilation Environment</a>) to enable the visibility of these symbols in thisheader. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></div><p>The <i>&lt;stdio.h&gt;</i> header shall define the following macros as positive integer constant expressions:</p><dl compact><dt>BUFSIZ</dt><dd>Size of <i>&lt;stdio.h&gt;</i> buffers.</dd><dt>_IOFBF</dt><dd>Input/output fully buffered.</dd><dt>_IOLBF</dt><dd>Input/output line buffered.</dd><dt>_IONBF</dt><dd>Input/output unbuffered.</dd><dt>L_ctermid</dt><dd><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Maximum size of character array to hold <a href="../functions/ctermid.html"><i>ctermid</i>()</a> output. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt>L_tmpnam</dt><dd>Maximum size of character array to hold <a href="../functions/tmpnam.html"><i>tmpnam</i>()</a> output.</dd><dt>SEEK_CUR</dt><dd>Seek relative to current position.</dd><dt>SEEK_END</dt><dd>Seek relative to end-of-file.</dd><dt>SEEK_SET</dt><dd>Seek relative to start-of-file.</dd></dl><p>The following macros shall be defined as positive integer constant expressions which denote implementation limits:</p><dl compact><dt>{FILENAME_MAX}</dt><dd>Maximum size in bytes of the longest filename string that the implementation guarantees can be opened.</dd><dt>{FOPEN_MAX}</dt><dd>Number of streams which the implementation guarantees can be open simultaneously. The value is at least eight.</dd><dt>{TMP_MAX}</dt><dd>Minimum number of unique filenames generated by <a href="../functions/tmpnam.html"><i>tmpnam</i>()</a>. Maximum number of timesan application can call <a href="../functions/tmpnam.html"><i>tmpnam</i>()</a> reliably. The value of {TMP_MAX} is at least 25.<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">&nbsp;On XSI-conformant systems, the value of {TMP_MAX} is at least 10000. <img src="../images/opt-end.gif" alt="[Option End]"border="0"></dd></dl><p>The following macro name shall be defined as a negative integer constant expression:</p><dl compact><dt>EOF</dt><dd>End-of-file return value.</dd></dl><p>The following macro name shall be defined as a null pointer constant:</p><dl compact><dt>NULL</dt><dd>Null pointer.</dd></dl><p>The following macro name shall be defined as a string constant:</p><dl compact><dt>P_tmpdir</dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Default directory prefix for <a href="../functions/tempnam.html"><i>tempnam</i>()</a>. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl><p>The following shall be defined as expressions of type &quot;pointer to <b>FILE</b>&quot; that point to the <b>FILE</b> objectsassociated, respectively, with the standard error, input, and output streams:</p><dl compact><dt><i>stderr</i></dt><dd>Standard error output stream.</dd><dt><i>stdin</i></dt><dd>Standard input stream.</dd><dt><i>stdout</i></dt><dd>Standard output stream.</dd></dl><p>The following data types shall be defined through <b>typedef</b>:</p><dl compact><dt><b>FILE</b></dt><dd>A structure containing information about a file.</dd><dt><b>fpos_t</b></dt><dd>A non-array type containing all information needed to specify uniquely every position within a file.</dd><dt><b>va_list</b></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">As described in <a href="stdarg.h.html"><i>&lt;stdarg.h&gt;</i></a> . <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><b>size_t</b></dt><dd>As described in <a href="stddef.h.html"><i>&lt;stddef.h&gt;</i></a> .</dd></dl><p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p><pre><tt>void     clearerr(FILE *);<sup>[<a href="javascript:open_code('CX')">CX</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">char    *ctermid(char *);<img src="../images/opt-end.gif" alt="[Option End]" border="0">int      fclose(FILE *);<sup>[<a href="javascript:open_code('CX')">CX</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">FILE    *fdopen(int, const char *);<img src="../images/opt-end.gif" alt="[Option End]" border="0">int      feof(FILE *);int      ferror(FILE *);int      fflush(FILE *);int      fgetc(FILE *);int      fgetpos(FILE *restrict, fpos_t *restrict);char    *fgets(char *restrict, int, FILE *restrict);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -