termios.h.html

来自「IEEE 1003.1-2003, Single Unix Specificat」· HTML 代码 · 共 829 行 · 第 1/2 页

HTML
829
字号
<dt>VT1</dt><dd>Vertical-tab delay type 1.</dd></dl></dd><dt>FFDLY</dt><dd>Select form-feed delays: <dl compact><dt>FF0</dt><dd>Form-feed delay type 0.</dd><dt>FF1</dt><dd>Form-feed delay type 1. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd></dl></dd></dl><h5><a name="tag_13_74_03_04"></a>Baud Rate Selection</h5><p>The input and output baud rates are stored in the <b>termios</b> structure. These are the valid values for objects of type<b>speed_t</b>. The following values shall be defined, but not all baud rates need be supported by the underlying hardware.</p><dl compact><dt>B0</dt><dd>Hang up</dd><dt>B50</dt><dd>50 baud</dd><dt>B75</dt><dd>75 baud</dd><dt>B110</dt><dd>110 baud</dd><dt>B134</dt><dd>134.5 baud</dd><dt>B150</dt><dd>150 baud</dd><dt>B200</dt><dd>200 baud</dd><dt>B300</dt><dd>300 baud</dd><dt>B600</dt><dd>600 baud</dd><dt>B1200</dt><dd>1200 baud</dd><dt>B1800</dt><dd>1800 baud</dd><dt>B2400</dt><dd>2400 baud</dd><dt>B4800</dt><dd>4800 baud</dd><dt>B9600</dt><dd>9600 baud</dd><dt>B19200</dt><dd>19200 baud</dd><dt>B38400</dt><dd>38400 baud</dd></dl><h5><a name="tag_13_74_03_05"></a>Control Modes</h5><p>The <i>c_cflag</i> field describes the hardware control of the terminal; not all values specified are required to be supportedby the underlying hardware:</p><dl compact><dt>CSIZE</dt><dd>Character size: <dl compact><dt>CS5</dt><dd>5 bits</dd><dt>CS6</dt><dd>6 bits</dd><dt>CS7</dt><dd>7 bits</dd><dt>CS8</dt><dd>8 bits</dd></dl></dd><dt>CSTOPB</dt><dd>Send two stop bits, else one.</dd><dt>CREAD</dt><dd>Enable receiver.</dd><dt>PARENB</dt><dd>Parity enable.</dd><dt>PARODD</dt><dd>Odd parity, else even.</dd><dt>HUPCL</dt><dd>Hang up on last close.</dd><dt>CLOCAL</dt><dd>Ignore modem status lines.</dd></dl><p>The implementation shall support the functionality associated with the symbols CS7, CS8, CSTOPB, PARODD, and PARENB.</p><h5><a name="tag_13_74_03_06"></a>Local Modes</h5><p>The <i>c_lflag</i> field of the argument structure is used to control various terminal functions:</p><dl compact><dt>ECHO</dt><dd>Enable echo.</dd><dt>ECHOE</dt><dd>Echo erase character as error-correcting backspace.</dd><dt>ECHOK</dt><dd>Echo KILL.</dd><dt>ECHONL</dt><dd>Echo NL.</dd><dt>ICANON</dt><dd>Canonical input (erase and kill processing).</dd><dt>IEXTEN</dt><dd>Enable extended input character processing.</dd><dt>ISIG</dt><dd>Enable signals.</dd><dt>NOFLSH</dt><dd>Disable flush after interrupt or quit.</dd><dt>TOSTOP</dt><dd>Send SIGTTOU for background output.</dd></dl><h5><a name="tag_13_74_03_07"></a>Attribute Selection</h5><p>The following symbolic constants for use with <a href="../functions/tcsetattr.html"><i>tcsetattr</i>()</a> are defined:</p><dl compact><dt>TCSANOW</dt><dd>Change attributes immediately.</dd><dt>TCSADRAIN</dt><dd>Change attributes when output has drained.</dd><dt>TCSAFLUSH</dt><dd>Change attributes when output has drained; also flush pending input.</dd></dl><h5><a name="tag_13_74_03_08"></a>Line Control</h5><p>The following symbolic constants for use with <a href="../functions/tcflush.html"><i>tcflush</i>()</a> shall be defined:</p><dl compact><dt>TCIFLUSH</dt><dd>Flush pending input.</dd><dt>TCIOFLUSH</dt><dd>Flush both pending input and untransmitted output.</dd><dt>TCOFLUSH</dt><dd>Flush untransmitted output.</dd></dl><p>The following symbolic constants for use with <a href="../functions/tcflow.html"><i>tcflow</i>()</a> shall be defined:</p><dl compact><dt>TCIOFF</dt><dd>Transmit a STOP character, intended to suspend input data.</dd><dt>TCION</dt><dd>Transmit a START character, intended to restart input data.</dd><dt>TCOOFF</dt><dd>Suspend output.</dd><dt>TCOON</dt><dd>Restart output.</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>speed_t cfgetispeed(const struct termios *);speed_t cfgetospeed(const struct termios *);int     cfsetispeed(struct termios *, speed_t);int     cfsetospeed(struct termios *, speed_t);int     tcdrain(int);int     tcflow(int, int);int     tcflush(int, int);int     tcgetattr(int, struct termios *);<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">pid_t   tcgetsid(int);<img src="../images/opt-end.gif" alt="[Option End]" border="0">int     tcsendbreak(int, int);int     tcsetattr(int, int, const struct termios *);</tt></pre></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_13_74_04"></a>APPLICATION USAGE</h4><blockquote><p>The following names are reserved for XSI-conformant systems to use as an extension to the above; therefore strictly conformingapplications shall not use them:</p><table cellpadding="3"><tr valign="top"><td align="left"><p class="tent">CBAUD</p></td><td align="left"><p class="tent">EXTB</p></td><td align="left"><p class="tent">VDSUSP</p></td></tr><tr valign="top"><td align="left"><p class="tent">DEFECHO</p></td><td align="left"><p class="tent">FLUSHO</p></td><td align="left"><p class="tent">VLNEXT</p></td></tr><tr valign="top"><td align="left"><p class="tent">ECHOCTL</p></td><td align="left"><p class="tent">LOBLK</p></td><td align="left"><p class="tent">VREPRINT</p></td></tr><tr valign="top"><td align="left"><p class="tent">ECHOKE</p></td><td align="left"><p class="tent">PENDIN</p></td><td align="left"><p class="tent">VSTATUS</p></td></tr><tr valign="top"><td align="left"><p class="tent">ECHOPRT</p></td><td align="left"><p class="tent">SWTCH</p></td><td align="left"><p class="tent">VWERASE</p></td></tr><tr valign="top"><td align="left"><p class="tent">EXTA</p></td><td align="left"><p class="tent">VDISCARD</p></td><td align="left"><p class="tent">&nbsp;</p></td></tr></table></blockquote><h4><a name="tag_13_74_05"></a>RATIONALE</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_13_74_06"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_13_74_07"></a>SEE ALSO</h4><blockquote><p>The System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../functions/cfgetispeed.html"><i>cfgetispeed</i>()</a>, <a href="../functions/cfgetospeed.html"><i>cfgetospeed</i>()</a>, <ahref="../functions/cfsetispeed.html"><i>cfsetispeed</i>()</a>, <a href="../functions/cfsetospeed.html"><i>cfsetospeed</i>()</a>, <ahref="../functions/confstr.html"><i>confstr</i>()</a>, <a href="../functions/tcdrain.html"><i>tcdrain</i>()</a>, <a href="../functions/tcflow.html"><i>tcflow</i>()</a>, <a href="../functions/tcflush.html"><i>tcflush</i>()</a>, <a href="../functions/tcgetattr.html"><i>tcgetattr</i>()</a>, <a href="../functions/tcgetsid.html"><i>tcgetsid</i>()</a>, <a href="../functions/tcsendbreak.html"><i>tcsendbreak</i>()</a>, <a href="../functions/tcsetattr.html"><i>tcsetattr</i>()</a>, the Shelland Utilities volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../utilities/getconf.html"><i>getconf</i></a>, <a href="xbd_chap11.html#tag_11"><i>General Terminal Interface</i></a></p></blockquote><h4><a name="tag_13_74_08"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 3.</p><p>Included for alignment with the ISO&nbsp;POSIX-1 standard.</p></blockquote><h4><a name="tag_13_74_09"></a>Issue 6</h4><blockquote><p>The LEGACY symbols IUCLC, OLCUC, and XCASE are removed.</p><p>FIPS 151-2 requirements for the symbols CS7, CS8, CSTOPB, PARODD, and PARENB are reaffirmed.</p><p>IEEE&nbsp;Std 1003.1-2001/Cor&nbsp;1-2002, item XBD/TC1/D6/19 is applied, changing ECHOK to ECHOKE in the APPLICATION USAGEsection.</p></blockquote><div class="box"><em>End of informative text.</em></div><hr><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>

⌨️ 快捷键说明

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