1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man3head / termios.h.3head
blob7b2f4f058e9316ededd18e70d9de072e249cda9d
1 '\" te
2 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\"  This notice shall appear on any product containing this material.
7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 .TH TERMIOS.H 3HEAD "Sep 10, 2004"
11 .SH NAME
12 termios.h, termios \- define values for termios
13 .SH SYNOPSIS
14 .LP
15 .nf
16 #include <\fBtermios.h\fR>
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The <\fBtermios.h\fR> header contains the definitions used by the terminal I/O
23 interfaces. See \fBtermios\fR(3C) and \fBtermio\fR(7I) for an overview of the
24 terminal interface.
25 .SS "The termios Structure"
26 .sp
27 .LP
28 The following data types are defined through \fBtypedef\fR:
29 .sp
30 .ne 2
31 .na
32 \fB\fBcc_t\fR\fR
33 .ad
34 .RS 12n
35 used for terminal special characters
36 .RE
38 .sp
39 .ne 2
40 .na
41 \fB\fBspeed_t\fR\fR
42 .ad
43 .RS 12n
44 used for terminal baud rates
45 .RE
47 .sp
48 .ne 2
49 .na
50 \fB\fBtcflag_t\fR\fR
51 .ad
52 .RS 12n
53 used for terminal modes
54 .RE
56 .sp
57 .LP
58 The above types are all unsigned integer types.
59 .sp
60 .LP
61 The implementation supports one or more programming environments in which the
62 widths of \fBcc_t\fR, \fBspeed_t\fR, and \fBtcflag_t\fR are no greater than the
63 width of type \fBlong\fR. The names of these programming environments can be
64 obtained using the \fBconfstr\fR(3C) function or the \fBgetconf\fR(1) utility.
65 .sp
66 .LP
67 The \fBtermios\fR structure is defined and includes the following members:
68 .sp
69 .in +2
70 .nf
71 tcflag_t c_iflag        /* input modes */
72 tcflag_t c_oflag        /* output modes */
73 tcflag_t c_cflag        /* control modes */
74 tcflag_t c_lflag        /* local modes */
75 cc_t     c_cc[NCCS]     /* control characters */
76 .fi
77 .in -2
79 .sp
80 .LP
81 A definition is provided for:
82 .sp
83 .ne 2
84 .na
85 \fB\fBNCCS\fR\fR
86 .ad
87 .RS 8n
88 size of the array \fBc_cc\fR for control characters
89 .RE
91 .sp
92 .LP
93 The following subscript names for the array \fBc_cc\fR are defined:
94 .sp
96 .sp
97 .TS
98 c c c
99 l l l .
100 Subscript UsageCanonical Mode   Subscript UsageNon-Canonical Mode       Description
102 \fBVEOF\fR              EOF character
103 \fBVEOL\fR              EOL character
104 \fBVERASE\fR            ERASE character
105 \fBVINTR\fR     \fBVINTR\fR     INTR character
106 \fBVKILL\fR             KILL character
107         \fBVMIN\fR      MIN value
108 \fBVQUIT\fR     \fBVQUIT\fR     QUIT character
109 \fBVSTART\fR    \fBVSTART\fR    START character
110 \fBVSTOP\fR     \fBVSTOP\fR     STOP character
111 \fBVSUSP\fR     \fBVSUSP\fR     SUSP character
112         \fBVTIME\fR     TIME value
117 The subscript values are unique, except that the \fBVMIN\fR and \fBVTIME\fR
118 subscripts can have the same values as the \fBVEOF\fR and \fBVEOL\fR
119 subscripts, respectively.
122 The header file provides the flags described below.
123 .SS "Input Modes"
126 The \fBc_iflag\fR field describes the basic terminal input control:
128 .ne 2
130 \fB\fBBRKINT\fR\fR
132 .RS 10n
133 Signal interrupt on break.
137 .ne 2
139 \fB\fBICRNL\fR\fR
141 .RS 10n
142 Map CR to NL on input.
146 .ne 2
148 \fB\fBIGNBRK\fR\fR
150 .RS 10n
151 Ignore break condition.
155 .ne 2
157 \fB\fBIGNCR\fR\fR
159 .RS 10n
160 Ignore CR.
164 .ne 2
166 \fB\fBIGNPAR\fR\fR
168 .RS 10n
169 Ignore characters with parity errors.
173 .ne 2
175 \fB\fBINLCR\fR\fR
177 .RS 10n
178 Map NL to CR on input.
182 .ne 2
184 \fB\fBINPCK\fR\fR
186 .RS 10n
187 Enable input parity check.
191 .ne 2
193 \fB\fBISTRIP\fR\fR
195 .RS 10n
196 Strip character.
200 .ne 2
202 \fB\fBIXANY\fR\fR
204 .RS 10n
205 Enable any character to restart output.
209 .ne 2
211 \fB\fBIXOFF\fR\fR
213 .RS 10n
214 Enable start/stop input control.
218 .ne 2
220 \fB\fBIXON\fR\fR
222 .RS 10n
223 Enable start/stop output control.
227 .ne 2
229 \fB\fBPARMRK\fR\fR
231 .RS 10n
232 Mark parity errors.
235 .SS "Output Modes"
238 The \fBc_oflag\fR field specifies the system treatment of output:
240 .ne 2
242 \fB\fBOPOST\fR\fR
244 .RS 10n
245 Post-process output.
249 .ne 2
251 \fB\fBONLCR\fR\fR
253 .RS 10n
254 Map NL to CR-NL on output.
258 .ne 2
260 \fB\fBOCRNL\fR\fR
262 .RS 10n
263 Map CR to NL on output.
267 .ne 2
269 \fB\fBONOCR\fR\fR
271 .RS 10n
272 No CR output at column 0.
276 .ne 2
278 \fB\fBONLRET\fR\fR
280 .RS 10n
281 NL performs CR function.
285 .ne 2
287 \fB\fBOFILL\fR\fR
289 .RS 10n
290 Use fill characters for delay.
294 .ne 2
296 \fB\fBNLDLY\fR\fR
298 .RS 10n
299 Select newline delays:
301 .ne 2
303 \fB\fBNL0\fR\fR
305 .RS 7n
306 newline type 0
310 .ne 2
312 \fB\fBNL1\fR\fR
314 .RS 7n
315 newline type 1
321 .ne 2
323 \fB\fBCRDLY\fR\fR
325 .RS 10n
326 Select carriage-return delays:
328 .ne 2
330 \fB\fBCR0\fR\fR
332 .RS 7n
333 carriage-return delay type 0
337 .ne 2
339 \fB\fBCR1\fR\fR
341 .RS 7n
342 carriage-return delay type 1
346 .ne 2
348 \fB\fBCR2\fR\fR
350 .RS 7n
351 carriage-return delay type 2
355 .ne 2
357 \fB\fBCR3\fR\fR
359 .RS 7n
360 carriage-return delay type 3
366 .ne 2
368 \fB\fBTABDLY\fR\fR
370 .RS 10n
371 Select horizontal-tab delays:
373 .ne 2
375 \fB\fBTAB0\fR\fR
377 .RS 8n
378 horizontal-tab delay type 0
382 .ne 2
384 \fB\fBTAB1\fR\fR
386 .RS 8n
387 horizontal-tab delay type 1
391 .ne 2
393 \fB\fBTAB2\fR\fR
395 .RS 8n
396 horizontal-tab delay type 2
400 .ne 2
402 \fB\fBTAB3\fR\fR
404 .RS 8n
405 expand tabs to spaces
411 .ne 2
413 \fB\fBBSDLY\fR\fR
415 .RS 10n
416 Select backspace delays:
418 .ne 2
420 \fB\fBBS0\fR\fR
422 .RS 7n
423 backspace-delay type 0
427 .ne 2
429 \fB\fBBS1\fR\fR
431 .RS 7n
432 backspace-delay type 1
438 .ne 2
440 \fB\fBVTDLY\fR\fR
442 .RS 10n
443 Select vertical-tab delays:
445 .ne 2
447 \fB\fBVT0\fR\fR
449 .RS 7n
450 vertical-tab delay type 0
454 .ne 2
456 \fB\fBVT1\fR\fR
458 .RS 7n
459 vertical-tab delay type 1
465 .ne 2
467 \fB\fBFFDLY\fR\fR
469 .RS 10n
470 Select form-feed delays:
472 .ne 2
474 \fB\fBFF0\fR\fR
476 .RS 7n
477 form-feed delay type 0
481 .ne 2
483 \fB\fBFF1\fR\fR
485 .RS 7n
486 form-feed delay type 1
491 .SS "Baud Rate Selection"
494 The input and output baud rates are stored in the \fBtermios\fR structure.
495 These are the valid values for objects of type \fBspeed_ t\fR. The following
496 values are defined, but not all baud rates need be supported by the underlying
497 hardware.
499 .ne 2
501 \fB\fBB0\fR\fR
503 .RS 10n
504 Hang up
508 .ne 2
510 \fB\fBB50\fR\fR
512 .RS 10n
513 50 baud
517 .ne 2
519 \fB\fBB75\fR\fR
521 .RS 10n
522 75 baud
526 .ne 2
528 \fB\fBB110\fR\fR
530 .RS 10n
531 110 baud
535 .ne 2
537 \fB\fBB134\fR\fR
539 .RS 10n
540 134.5 baud
544 .ne 2
546 \fB\fBB150\fR\fR
548 .RS 10n
549 150 baud
553 .ne 2
555 \fB\fBB200\fR\fR
557 .RS 10n
558 200 baud
562 .ne 2
564 \fB\fBB300\fR\fR
566 .RS 10n
567 300 baud
571 .ne 2
573 \fB\fBB600\fR\fR
575 .RS 10n
576 600 baud
580 .ne 2
582 \fB\fBB1200\fR\fR
584 .RS 10n
585 1 200 baud
589 .ne 2
591 \fB\fBB1800\fR\fR
593 .RS 10n
594 1 800 baud
598 .ne 2
600 \fB\fBB2400\fR\fR
602 .RS 10n
603 2 400 baud
607 .ne 2
609 \fB\fBB4800\fR\fR
611 .RS 10n
612 4 800 baud
616 .ne 2
618 \fB\fBB9600\fR\fR
620 .RS 10n
621 9 600 baud
625 .ne 2
627 \fB\fBB19200\fR\fR
629 .RS 10n
630 19 200 baud
634 .ne 2
636 \fB\fBB38400\fR\fR
638 .RS 10n
639 38 400 baud
642 .SS "Control Modes"
645 The \fBc_cflag\fR field describes the hardware control of the terminal; not all
646 values specified are required to be supported by the underlying hardware:
648 .ne 2
650 \fB\fBCSIZE\fR\fR
652 .RS 10n
653 Character size:
655 .ne 2
657 \fB\fBCS5\fR\fR
659 .RS 7n
660 5 bits
664 .ne 2
666 \fB\fBCS6\fR\fR
668 .RS 7n
669 6 bits
673 .ne 2
675 \fB\fBCS7\fR\fR
677 .RS 7n
678 7 bits
682 .ne 2
684 \fB\fBCS8\fR\fR
686 .RS 7n
687 8 bits
693 .ne 2
695 \fB\fBCSTOPB\fR\fR
697 .RS 10n
698 Send two stop bits, else one.
702 .ne 2
704 \fB\fBCREAD\fR\fR
706 .RS 10n
707 Enable receiver.
711 .ne 2
713 \fB\fBPARENB\fR\fR
715 .RS 10n
716 Parity enable.
720 .ne 2
722 \fB\fBPARODD\fR\fR
724 .RS 10n
725 Odd parity, else even.
729 .ne 2
731 \fB\fBHUPCL\fR\fR
733 .RS 10n
734 Hang up on last close.
738 .ne 2
740 \fB\fBCLOCAL\fR\fR
742 .RS 10n
743 Ignore modem status lines.
748 The implementation supports the functionality associated with the symbols
749 \fBCS7\fR, \fBCS8\fR, \fBCSTOPB\fR, \fBPARODD\fR, and \fBPARENB\fR.
750 .SS "Local Modes"
753 The \fBc_lflag\fR field of the argument structure is used to control various
754 terminal functions:
756 .ne 2
758 \fB\fBECHO\fR\fR
760 .RS 10n
761 Enable echo.
765 .ne 2
767 \fB\fBECHOE\fR\fR
769 .RS 10n
770 Echo erase character as error-correcting backspace.
774 .ne 2
776 \fB\fBECHOK\fR\fR
778 .RS 10n
779 Echo KILL.
783 .ne 2
785 \fB\fBECHONL\fR\fR
787 .RS 10n
788 Echo NL.
792 .ne 2
794 \fB\fBICANON\fR\fR
796 .RS 10n
797 Canonical input (erase and kill processing).
801 .ne 2
803 \fB\fBIEXTEN\fR\fR
805 .RS 10n
806 Enable extended input character processing.
810 .ne 2
812 \fB\fBISIG\fR\fR
814 .RS 10n
815 Enable signals.
819 .ne 2
821 \fB\fBNOFLSH\fR\fR
823 .RS 10n
824 Disable flush after interrupt or quit.
828 .ne 2
830 \fB\fBTOSTOP\fR\fR
832 .RS 10n
833 Send \fBSIGTTOU\fR for background output.
836 .SS "Attribute Selection"
839 The following symbolic constants for use with \fBtcsetattr()\fR are defined:
841 .ne 2
843 \fB\fBTCSANOW\fR\fR
845 .RS 13n
846 Change attributes immediately.
850 .ne 2
852 \fB\fBTCSADRAIN\fR\fR
854 .RS 13n
855 Change attributes when output has drained.
859 .ne 2
861 \fB\fBTCSAFLUSH\fR\fR
863 .RS 13n
864 Change attributes when output has drained; also flush pending input.
867 .SS "Line Control"
870 The following symbolic constants for use with \fBtcflush()\fR are defined:
872 .ne 2
874 \fB\fBTCIFLUSH\fR\fR
876 .RS 13n
877 Flush pending input.
881 .ne 2
883 \fB\fBTCIOFLUSH\fR\fR
885 .RS 13n
886 Flush both pending input and untransmitted output.
890 .ne 2
892 \fB\fBTCOFLUSH\fR\fR
894 .RS 13n
895 Flush untransmitted output.
900 The following symbolic constants for use with \fBtcflow()\fR are defined:
902 .ne 2
904 \fB\fBTCIOFF\fR\fR
906 .RS 10n
907 Transmit a \fBSTOP\fR character, intended to suspend input data.
911 .ne 2
913 \fB\fBTCION\fR\fR
915 .RS 10n
916 Transmit a \fBSTART\fR character, intended to restart input data.
920 .ne 2
922 \fB\fBTCOOFF\fR\fR
924 .RS 10n
925 Suspend output.
929 .ne 2
931 \fB\fBTCOON\fR\fR
933 .RS 10n
934 Restart output.
937 .SH ATTRIBUTES
940 See \fBattributes\fR(5) for descriptions of the following attributes:
945 box;
946 c | c
947 l | l .
948 ATTRIBUTE TYPE  ATTRIBUTE VALUE
950 Interface Stability     Standard
953 .SH SEE ALSO
956 \fBgetconf\fR(1), \fBcfgetispeed\fR(3C), \fBcfsetispeed\fR(3C),
957 \fBconfstr\fR(3C), \fBtcdrain\fR(3C), \fBtcflow\fR(3C), \fBtcflush\fR(3C),
958 \fBtcgetattr\fR(3C), \fBtcgetsid\fR(3C), \fBtcsendbreak\fR(3C),
959 \fBtcsetattr\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)