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

📄 xbd_chap11.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 4 页
字号:
</td><td align="left"><p class="tent">Output modes.</p></td></tr><tr valign="top"><td align="left"><p class="tent"><b>tcflag_t</b></p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent"><i>c_cflag</i></p></td><td align="left"><p class="tent">Control modes.</p></td></tr><tr valign="top"><td align="left"><p class="tent"><b>tcflag_t</b></p></td><td align="left"><p class="tent">&nbsp;</p></td><td align="left"><p class="tent"><i>c_lflag</i></p></td><td align="left"><p class="tent">Local modes.</p></td></tr><tr valign="top"><td align="left"><p class="tent"><b>cc_t</b></p></td><td align="left"><p class="tent">NCCS</p></td><td align="left"><p class="tent"><i>c_cc[]</i></p></td><td align="left"><p class="tent">Control characters.</p></td></tr></table></center><p>The types <b>tcflag_t</b> and <b>cc_t</b> are defined in the <a href="termios.h.html"><i>&lt;termios.h&gt;</i></a> header. Theyshall be unsigned integer types.</p><h4><a name="tag_11_02_02"></a>Input Modes</h4><p>Values of the <i>c_iflag</i> field describe the basic terminal input control, and are composed of the bitwise-inclusive OR ofthe masks shown, which shall be bitwise-distinct. The mask name symbols in this table are defined in <a href="termios.h.html"><i>&lt;termios.h&gt;</i></a> :</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent"><b>Mask Name</b></p></th><th align="center"><p class="tent"><b>Description</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">BRKINT</p></td><td align="left"><p class="tent">Signal interrupt on break.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ICRNL</p></td><td align="left"><p class="tent">Map CR to NL on input.</p></td></tr><tr valign="top"><td align="left"><p class="tent">IGNBRK</p></td><td align="left"><p class="tent">Ignore break condition.</p></td></tr><tr valign="top"><td align="left"><p class="tent">IGNCR</p></td><td align="left"><p class="tent">Ignore CR.</p></td></tr><tr valign="top"><td align="left"><p class="tent">IGNPAR</p></td><td align="left"><p class="tent">Ignore characters with parity errors.</p></td></tr><tr valign="top"><td align="left"><p class="tent">INLCR</p></td><td align="left"><p class="tent">Map NL to CR on input.</p></td></tr><tr valign="top"><td align="left"><p class="tent">INPCK</p></td><td align="left"><p class="tent">Enable input parity check.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ISTRIP</p></td><td align="left"><p class="tent">Strip character.</p></td></tr><tr valign="top"><td align="left"><p class="tent"><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"border="0"> IXANY</p></td><td align="left"><p class="tent">Enable any character to restart output. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p></td></tr><tr valign="top"><td align="left"><p class="tent">IXOFF</p></td><td align="left"><p class="tent">Enable start/stop input control.</p></td></tr><tr valign="top"><td align="left"><p class="tent">IXON</p></td><td align="left"><p class="tent">Enable start/stop output control.</p></td></tr><tr valign="top"><td align="left"><p class="tent">PARMRK</p></td><td align="left"><p class="tent">Mark parity errors.</p></td></tr></table></center><p>In the context of asynchronous serial data transmission, a break condition shall be defined as a sequence of zero-valued bitsthat continues for more than the time to send one byte. The entire sequence of zero-valued bits is interpreted as a single breakcondition, even if it continues for a time equivalent to more than one byte. In contexts other than asynchronous serial datatransmission, the definition of a break condition is implementation-defined.</p><p>If IGNBRK is set, a break condition detected on input shall be ignored; that is, not put on the input queue and therefore notread by any process. If IGNBRK is not set and BRKINT is set, the break condition shall flush the input and output queues, and ifthe terminal is the controlling terminal of a foreground process group, the break condition shall generate a single SIGINT signalto that foreground process group. If neither IGNBRK nor BRKINT is set, a break condition shall be read as a single 0x00, or ifPARMRK is set, as 0xff 0x00 0x00.</p><p>If IGNPAR is set, a byte with a framing or parity error (other than break) shall be ignored.</p><p>If PARMRK is set, and IGNPAR is not set, a byte with a framing or parity error (other than break) shall be given to theapplication as the three-byte sequence 0xff 0x00 X, where 0xff 0x00 is a two-byte flag preceding each sequence and X is the data ofthe byte received in error. To avoid ambiguity in this case, if ISTRIP is not set, a valid byte of 0xff is given to the applicationas 0xff 0xff. If neither PARMRK nor IGNPAR is set, a framing or parity error (other than break) shall be given to the applicationas a single byte 0x00.</p><p>If INPCK is set, input parity checking shall be enabled. If INPCK is not set, input parity checking shall be disabled, allowingoutput parity generation without input parity errors. Note that whether input parity checking is enabled or disabled is independentof whether parity detection is enabled or disabled (see <a href="#tag_11_02_04">Control Modes</a> ). If parity detection is enabledbut input parity checking is disabled, the hardware to which the terminal is connected shall recognize the parity bit, but theterminal special file shall not check whether or not this bit is correctly set.</p><p>If ISTRIP is set, valid input bytes shall first be stripped to seven bits; otherwise, all eight bits shall be processed.</p><p>If INLCR is set, a received NL character shall be translated into a CR character. If IGNCR is set, a received CR character shallbe ignored (not read). If IGNCR is not set and ICRNL is set, a received CR character shall be translated into an NL character.</p><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">If IXANY is set, any input character shall restart output that has been suspended. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>If IXON is set, start/stop output control shall be enabled. A received STOP character shall suspend output and a received STARTcharacter shall restart output. When IXON is set, START and STOP characters are not read, but merely perform flow controlfunctions. When IXON is not set, the START and STOP characters shall be read.</p><p>If IXOFF is set, start/stop input control shall be enabled. The system shall transmit STOP characters, which are intended tocause the terminal device to stop transmitting data, as needed to prevent the input queue from overflowing and causingimplementation-defined behavior, and shall transmit START characters, which are intended to cause the terminal device to resumetransmitting data, as soon as the device can continue transmitting data without risk of overflowing the input queue. The preciseconditions under which STOP and START characters are transmitted are implementation-defined.</p><p>The initial input control value after <a href="../functions/open.html"><i>open</i>()</a> is implementation-defined.</p><h4><a name="tag_11_02_03"></a>Output Modes</h4><p>The <i>c_oflag</i> field specifies the terminal interface's treatment of output, and is composed of the bitwise-inclusive OR ofthe masks shown, which shall be bitwise-distinct. The mask name symbols in the following table are defined in <a href="termios.h.html"><i>&lt;termios.h&gt;</i></a> :</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent"><b>Mask Name</b></p></th><th align="center"><p class="tent"><b>Description</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">OPOST</p></td><td align="left"><p class="tent">Perform output processing.</p></td></tr><tr valign="top"><td align="left"><p class="tent"><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"border="0"> ONLCR</p></td><td align="left"><p class="tent">Map NL to CR-NL on output.</p></td></tr><tr valign="top"><td align="left"><p class="tent">OCRNL</p></td><td align="left"><p class="tent">Map CR to NL on output.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ONOCR</p></td><td align="left"><p class="tent">No CR output at column 0.</p></td></tr><tr valign="top"><td align="left"><p class="tent">ONLRET</p></td><td align="left"><p class="tent">NL performs CR function.</p></td></tr><tr valign="top"><td align="left"><p class="tent">OFILL</p></td><td align="left"><p class="tent">Use fill characters for delay.</p></td></tr><tr valign="top"><td align="left"><p class="tent">OFDEL</p></td><td align="left"><p class="tent">Fill is DEL, else NUL.</p></td></tr><tr valign="top"><td align="left"><p class="tent">NLDLY</p></td><td align="left"><p class="tent">Select newline delays:</p></td></tr><tr valign="top"><td align="left"><p class="tent">NL0</p></td><td align="left"><p class="tent">Newline character type 0.</p></td></tr><tr valign="top"><td align="left"><p class="tent">NL1</p></td><td align="left"><p class="tent">Newline character type 1.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CRDLY</p></td><td align="left"><p class="tent">Select carriage-return delays:</p></td></tr><tr valign="top"><td align="left"><p class="tent">CR0</p></td><td align="left"><p class="tent">Carriage-return delay type 0.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CR1</p></td><td align="left"><p class="tent">Carriage-return delay type 1.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CR2</p></td><td align="left"><p class="tent">Carriage-return delay type 2.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CR3</p></td><td align="left"><p class="tent">Carriage-return delay type 3.</p></td></tr><tr valign="top"><td align="left"><p class="tent">TABDLY</p></td><td align="left"><p class="tent">Select horizontal-tab delays:</p></td></tr><tr valign="top"><td align="left"><p class="tent">TAB0</p></td><td align="left"><p class="tent">Horizontal-tab delay type 0.</p>

⌨️ 快捷键说明

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