Back to index

glibc  2.9
sysv_termio.h
Go to the documentation of this file.
00001 /* Copyright (C) 1992, 1997, 2001 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /* In various parts of this file we define the System V values for
00020    things as _SYSV_<whatever>.  Those are the values that System V
00021    uses for termio, and also (SVR4) termios.  Not necessarily the
00022    same as the GNU termios that the library user sees.  */
00023 
00024 /* Number of elements of c_cc.  termio only.  */
00025 #define _SYSV_NCC 8
00026 
00027 #define _SYSV_VINTR 0
00028 #define _SYSV_VQUIT 1
00029 #define _SYSV_VERASE 2
00030 #define _SYSV_VKILL 3
00031 #define _SYSV_VEOF 4
00032 /* This field means VEOF if ICANON, VMIN if not.  */
00033 #define _SYSV_VMIN 4
00034 #define _SYSV_VEOL 5
00035 /* This field means VEOL if ICANON, VTIME if not.  */
00036 #define _SYSV_VTIME 5
00037 #define _SYSV_VEOL2 6
00038 
00039 /* Flags in c_iflag.  */
00040 #define _SYSV_IGNBRK 1
00041 #define _SYSV_BRKINT 2
00042 #define _SYSV_IGNPAR 4
00043 #define _SYSV_PARMRK 8
00044 #define _SYSV_INPCK 0x10
00045 #define _SYSV_ISTRIP 0x20
00046 #define _SYSV_INLCR 0x40
00047 #define _SYSV_IGNCR 0x80
00048 #define _SYSV_ICRNL 0x100
00049 #define _SYSV_IUCLC 0x200
00050 #define _SYSV_IXON 0x400
00051 #define _SYSV_IXANY 0x800
00052 #define _SYSV_IXOFF 0x1000
00053 #define _SYSV_IMAXBEL 0x2000
00054 
00055 /* Flags in c_cflag.  */
00056 #define _SYSV_CBAUD 0xf
00057 #define _SYSV_CIBAUD 0xf0000       /* termios only.  */
00058 #define _SYSV_IBSHIFT 16
00059 /* Values for CBAUD and CIBAUD.  */
00060 #define _SYSV_B0 0
00061 #define _SYSV_B50 1
00062 #define _SYSV_B75 2
00063 #define _SYSV_B110 3
00064 #define _SYSV_B134 4
00065 #define _SYSV_B150 5
00066 #define _SYSV_B200 6
00067 #define _SYSV_B300 7
00068 #define _SYSV_B600 8
00069 #define _SYSV_B1200 9
00070 #define _SYSV_B1800 10
00071 #define _SYSV_B2400 11
00072 #define _SYSV_B4800 12
00073 #define _SYSV_B9600 13
00074 #define _SYSV_B19200 14
00075 #define _SYSV_B38400 15
00076 
00077 #define _SYSV_CS5 0
00078 #define _SYSV_CS6 0x10
00079 #define _SYSV_CS7 0x20
00080 #define _SYSV_CS8 0x30
00081 #define _SYSV_CSIZE 0x30
00082 #define _SYSV_CSTOPB 0x40
00083 #define _SYSV_CREAD 0x80
00084 #define _SYSV_PARENB 0x100
00085 #define _SYSV_PARODD 0x200
00086 #define _SYSV_HUPCL 0x400
00087 #define _SYSV_CLOCAL 0x800
00088 
00089 /* Flags in c_lflag.  */
00090 #define _SYSV_ISIG 1
00091 #define _SYSV_ICANON 2
00092 #define _SYSV_ECHO 8
00093 #define _SYSV_ECHOE 0x10
00094 #define _SYSV_ECHOK 0x20
00095 #define _SYSV_ECHONL 0x40
00096 #define _SYSV_NOFLSH 0x80
00097 #define _SYSV_TOSTOP 0x100
00098 #define _SYSV_ECHOCTL 0x200
00099 #define _SYSV_ECHOPRT 0x400
00100 #define _SYSV_ECHOKE 0x800
00101 #define _SYSV_FLUSHO 0x2000
00102 #define _SYSV_PENDIN 0x4000
00103 #define _SYSV_IEXTEN 0x8000
00104 
00105 /* Flags in c_oflag.  */
00106 #define _SYSV_OPOST 1
00107 #define _SYSV_OLCUC 2
00108 #define _SYSV_ONLCR 4
00109 #define _SYSV_NLDLY 0x100
00110 #define _SYSV_NL0 0
00111 #define _SYSV_NL1 0x100
00112 #define _SYSV_CRDLY 0x600
00113 #define _SYSV_CR0 0
00114 #define _SYSV_CR1 0x200
00115 #define _SYSV_CR2 0x400
00116 #define _SYSV_CR3 0x600
00117 #define _SYSV_TABDLY 0x1800
00118 #define _SYSV_TAB0 0
00119 #define _SYSV_TAB1 0x0800
00120 #define _SYSV_TAB2 0x1000
00121 /* TAB3 is an obsolete name for XTABS.  But we provide it since some
00122    programs expect it to exist.  */
00123 #define _SYSV_TAB3 0x1800
00124 #define _SYSV_XTABS 0x1800
00125 #define _SYSV_BSDLY 0x2000
00126 #define _SYSV_BS0 0
00127 #define _SYSV_BS1 0x2000
00128 #define _SYSV_VTDLY 0x4000
00129 #define _SYSV_VT0 0
00130 #define _SYSV_VT1 0x4000
00131 #define _SYSV_FFDLY 0x8000
00132 #define _SYSV_FF0 0
00133 #define _SYSV_FF1 0x8000
00134 
00135 /* ioctl's.  */
00136 
00137 #define _TCGETA 0x5405
00138 #define _TCSETA 0x5406
00139 #define _TCSETAW 0x5407
00140 #define _TCSETAF 0x5408
00141 #define _TCSBRK 0x5409
00142 #define _TCXONC 0x540B
00143 #define _TCFLSH 0x540C
00144 #define _TIOCGPGRP 0x7414
00145 #define _TIOCSPGRP 0x7415
00146 
00147 struct __sysv_termio
00148   {
00149     unsigned short c_iflag;
00150     unsigned short c_oflag;
00151     unsigned short c_cflag;
00152     unsigned short c_lflag;
00153     char c_line;
00154     unsigned char c_cc[_SYSV_NCC];
00155   };