Back to index

glibc  2.9
termios.h
Go to the documentation of this file.
00001 /* termios type and macro definitions.  AIX version.
00002    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 #ifndef _TERMIOS_H
00021 # error "Never include <bits/termios.h> directly; use <termios.h> instead."
00022 #endif
00023 
00024 typedef unsigned char       cc_t;
00025 typedef unsigned int speed_t;
00026 typedef unsigned int tcflag_t;
00027 
00028 #define NCCS 16
00029 struct termios
00030   {
00031     tcflag_t c_iflag;              /* input mode flags */
00032     tcflag_t c_oflag;              /* output mode flags */
00033     tcflag_t c_cflag;              /* control mode flags */
00034     tcflag_t c_lflag;              /* local mode flags */
00035     cc_t c_cc[NCCS];        /* control characters */
00036   };
00037 
00038 /* c_cc characters */
00039 #define VINTR 0
00040 #define VQUIT 1
00041 #define VERASE 2
00042 #define VKILL 3
00043 #define VEOF 4
00044 #define VEOL 5
00045 #define VSTART 7
00046 #define VSTOP 8
00047 #define VSUSP 9
00048 #define VMIN 4
00049 #define VTIME 5
00050 #define VEOL2 6
00051 #define VDSUSP 10
00052 #define VREPRINT 11
00053 #define VDISCARD 12
00054 #define VWERSE 13
00055 #define VWERASE VWERSE
00056 #define VLNEXT 14
00057 #define VSTRT VSTART
00058 
00059 /* c_iflag bits */
00060 #define IGNBRK       0000001
00061 #define BRKINT       0000002
00062 #define IGNPAR       0000004
00063 #define PARMRK       0000010
00064 #define INPCK 0000020
00065 #define ISTRIP       0000040
00066 #define INLCR 0000100
00067 #define IGNCR 0000200
00068 #define ICRNL 0000400
00069 #define IXON  0001000
00070 #define IXOFF 0002000
00071 #define IUCLC 0004000
00072 #define IXANY 0010000
00073 #define IMAXBEL      0200000
00074 
00075 /* c_oflag bits */
00076 #define OPOST 0000001
00077 #define OLCUC 0000002
00078 #define ONLCR 0000004
00079 #define OCRNL 0000010
00080 #define ONOCR 0000020
00081 #define ONLRET       0000040
00082 #define OFILL 0000100
00083 #define OFDEL 0000200
00084 #if defined __USE_MISC || defined __USE_XOPEN
00085 # define CRDLY       0001400
00086 # define   CR0       0000000
00087 # define   CR1       0000400
00088 # define   CR2       0001000
00089 # define   CR3       0001400
00090 # define TABDLY      0006000
00091 # define   TAB0      0000000
00092 # define   TAB1      0002000
00093 # define   TAB2      0004000
00094 # define   TAB3      0006000
00095 # define BSDLY       0010000
00096 # define   BS0       0000000
00097 # define   BS1       0010000
00098 # define FFDLY       0020000
00099 # define   FF0       0000000
00100 # define   FF1       0020000
00101 # define NLDLY       0040000
00102 # define   NL0       0000000
00103 # define   NL1       0040000
00104 #endif
00105 
00106 #define VTDLY 0100000
00107 #define   VT0 0000000
00108 #define   VT1 0100000
00109 
00110 /* c_cflag bit meaning */
00111 #ifdef __USE_MISC
00112 # define CBAUD       0000017
00113 #endif
00114 #define  B0   0000000              /* hang up */
00115 #define  B50  0000001
00116 #define  B75  0000002
00117 #define  B110 0000003
00118 #define  B134 0000004
00119 #define  B150 0000005
00120 #define  B200 0000006
00121 #define  B300 0000007
00122 #define  B600 0000010
00123 #define  B1200       0000011
00124 #define  B1800       0000012
00125 #define  B2400       0000013
00126 #define  B4800       0000014
00127 #define  B9600       0000015
00128 #define  B19200      0000016
00129 #define  B38400      0000017
00130 #ifdef __USE_MISC
00131 # define EXTA B19200
00132 # define EXTB B38400
00133 #endif
00134 #define CSIZE 0000060
00135 #define   CS5 0000000
00136 #define   CS6 0000020
00137 #define   CS7 0000040
00138 #define   CS8 0000060
00139 #define CSTOPB       0000100
00140 #define CREAD 0000200
00141 #define PARENB       0000400
00142 #define PARODD       0001000
00143 #define HUPCL 0002000
00144 #define CLOCAL       0004000
00145 #ifdef __USE_MISC
00146 # define CIBAUD        000003600000              /* input baud rate (not used) */
00147 # define CRTSCTS  020000000000            /* flow control */
00148 #endif
00149 
00150 /* c_lflag bits */
00151 #define ISIG  0000001
00152 #define ICANON       0000002
00153 #if defined __USE_MISC || defined __USE_XOPEN
00154 # define XCASE       0000004
00155 #endif
00156 #define ECHO  0000010
00157 #define ECHOE 0000020
00158 #define ECHOK 0000040
00159 #define ECHONL       0000100
00160 #define NOFLSH       0000200
00161 #define TOSTOP       0200000
00162 #ifdef __USE_MISC
00163 # define ECHOCTL 0400000
00164 # define ECHOPRT 01000000
00165 # define ECHOKE       02000000
00166 # define FLUSHO       004000000
00167 # define PENDIN       04000000000
00168 #endif
00169 #define IEXTEN       010000000
00170 
00171 /* tcflow() and TCXONC use these */
00172 #define       TCOOFF        0
00173 #define       TCOON         1
00174 #define       TCIOFF        2
00175 #define       TCION         3
00176 
00177 /* tcflush() and TCFLSH use these */
00178 #define       TCIFLUSH      0
00179 #define       TCOFLUSH      1
00180 #define       TCIOFLUSH     2
00181 
00182 /* tcsetattr uses these */
00183 #define       TCSANOW              0
00184 #define       TCSADRAIN     1
00185 #define       TCSAFLUSH     2
00186 
00187 
00188 #define _IOT_termios /* Hurd ioctl type field.  */ \
00189   _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)