Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6


termios.h
001: /* termios type and macro definitions.  Linux version.
002:    Copyright (C) 1993-1999, 2003, 2005, 2010 Free Software Foundation, Inc.
003:    This file is part of the GNU C Library.
004: 
005:    The GNU C Library is free software; you can redistribute it and/or
006:    modify it under the terms of the GNU Lesser General Public
007:    License as published by the Free Software Foundation; either
008:    version 2.1 of the License, or (at your option) any later version.
009: 
010:    The GNU C Library is distributed in the hope that it will be useful,
011:    but WITHOUT ANY WARRANTY; without even the implied warranty of
012:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013:    Lesser General Public License for more details.
014: 
015:    You should have received a copy of the GNU Lesser General Public
016:    License along with the GNU C Library; if not, write to the Free
017:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
018:    02111-1307 USA.  */
019: 
020: #ifndef _TERMIOS_H
021: # error "Never include <bits/termios.h> directly; use <termios.h> instead."
022: #endif
023: 
024: typedef unsigned char   cc_t;
025: typedef unsigned int    speed_t;
026: typedef unsigned int    tcflag_t;
027: 
028: #define NCCS 32
029: struct termios
030:   {
031:     tcflag_t c_iflag;           /* input mode flags */
032:     tcflag_t c_oflag;           /* output mode flags */
033:     tcflag_t c_cflag;           /* control mode flags */
034:     tcflag_t c_lflag;           /* local mode flags */
035:     cc_t c_line;                        /* line discipline */
036:     cc_t c_cc[NCCS];            /* control characters */
037:     speed_t c_ispeed;           /* input speed */
038:     speed_t c_ospeed;           /* output speed */
039: #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
040: #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
041:   };
042: 
043: /* c_cc characters */
044: #define VINTR 0
045: #define VQUIT 1
046: #define VERASE 2
047: #define VKILL 3
048: #define VEOF 4
049: #define VTIME 5
050: #define VMIN 6
051: #define VSWTC 7
052: #define VSTART 8
053: #define VSTOP 9
054: #define VSUSP 10
055: #define VEOL 11
056: #define VREPRINT 12
057: #define VDISCARD 13
058: #define VWERASE 14
059: #define VLNEXT 15
060: #define VEOL2 16
061: 
062: /* c_iflag bits */
063: #define IGNBRK  0000001
064: #define BRKINT  0000002
065: #define IGNPAR  0000004
066: #define PARMRK  0000010
067: #define INPCK   0000020
068: #define ISTRIP  0000040
069: #define INLCR   0000100
070: #define IGNCR   0000200
071: #define ICRNL   0000400
072: #define IUCLC   0001000
073: #define IXON    0002000
074: #define IXANY   0004000
075: #define IXOFF   0010000
076: #define IMAXBEL 0020000
077: #define IUTF8   0040000
078: 
079: /* c_oflag bits */
080: #define OPOST   0000001
081: #define OLCUC   0000002
082: #define ONLCR   0000004
083: #define OCRNL   0000010
084: #define ONOCR   0000020
085: #define ONLRET  0000040
086: #define OFILL   0000100
087: #define OFDEL   0000200
088: #if defined __USE_MISC || defined __USE_XOPEN
089: # define NLDLY  0000400
090: # define   NL0  0000000
091: # define   NL1  0000400
092: # define CRDLY  0003000
093: # define   CR0  0000000
094: # define   CR1  0001000
095: # define   CR2  0002000
096: # define   CR3  0003000
097: # define TABDLY 0014000
098: # define   TAB0 0000000
099: # define   TAB1 0004000
100: # define   TAB2 0010000
101: # define   TAB3 0014000
102: # define BSDLY  0020000
103: # define   BS0  0000000
104: # define   BS1  0020000
105: # define FFDLY  0100000
106: # define   FF0  0000000
107: # define   FF1  0100000
108: #endif
109: 
110: #define VTDLY   0040000
111: #define   VT0   0000000
112: #define   VT1   0040000
113: 
114: #ifdef __USE_MISC
115: # define XTABS  0014000
116: #endif
117: 
118: /* c_cflag bit meaning */
119: #ifdef __USE_MISC
120: # define CBAUD  0010017
121: #endif
122: #define  B0     0000000         /* hang up */
123: #define  B50    0000001
124: #define  B75    0000002
125: #define  B110   0000003
126: #define  B134   0000004
127: #define  B150   0000005
128: #define  B200   0000006
129: #define  B300   0000007
130: #define  B600   0000010
131: #define  B1200  0000011
132: #define  B1800  0000012
133: #define  B2400  0000013
134: #define  B4800  0000014
135: #define  B9600  0000015
136: #define  B19200 0000016
137: #define  B38400 0000017
138: #ifdef __USE_MISC
139: # define EXTA B19200
140: # define EXTB B38400
141: #endif
142: #define CSIZE   0000060
143: #define   CS5   0000000
144: #define   CS6   0000020
145: #define   CS7   0000040
146: #define   CS8   0000060
147: #define CSTOPB  0000100
148: #define CREAD   0000200
149: #define PARENB  0000400
150: #define PARODD  0001000
151: #define HUPCL   0002000
152: #define CLOCAL  0004000
153: #ifdef __USE_MISC
154: # define CBAUDEX 0010000
155: #endif
156: #define  B57600   0010001
157: #define  B115200  0010002
158: #define  B230400  0010003
159: #define  B460800  0010004
160: #define  B500000  0010005
161: #define  B576000  0010006
162: #define  B921600  0010007
163: #define  B1000000 0010010
164: #define  B1152000 0010011
165: #define  B1500000 0010012
166: #define  B2000000 0010013
167: #define  B2500000 0010014
168: #define  B3000000 0010015
169: #define  B3500000 0010016
170: #define  B4000000 0010017
171: #define __MAX_BAUD B4000000
172: #ifdef __USE_MISC
173: # define CIBAUD   002003600000          /* input baud rate (not used) */
174: # define CMSPAR   010000000000          /* mark or space (stick) parity */
175: # define CRTSCTS  020000000000          /* flow control */
176: #endif
177: 
178: /* c_lflag bits */
179: #define ISIG    0000001
180: #define ICANON  0000002
181: #if defined __USE_MISC || defined __USE_XOPEN
182: # define XCASE  0000004
183: #endif
184: #define ECHO    0000010
185: #define ECHOE   0000020
186: #define ECHOK   0000040
187: #define ECHONL  0000100
188: #define NOFLSH  0000200
189: #define TOSTOP  0000400
190: #ifdef __USE_MISC
191: # define ECHOCTL 0001000
192: # define ECHOPRT 0002000
193: # define ECHOKE  0004000
194: # define FLUSHO  0010000
195: # define PENDIN  0040000
196: #endif
197: #define IEXTEN  0100000
198: #ifdef __USE_BSD
199: # define EXTPROC 0200000
200: #endif
201: 
202: /* tcflow() and TCXONC use these */
203: #define TCOOFF          0
204: #define TCOON           1
205: #define TCIOFF          2
206: #define TCION           3
207: 
208: /* tcflush() and TCFLSH use these */
209: #define TCIFLUSH        0
210: #define TCOFLUSH        1
211: #define TCIOFLUSH       2
212: 
213: /* tcsetattr uses these */
214: #define TCSANOW         0
215: #define TCSADRAIN       1
216: #define TCSAFLUSH       2
217: 
218: 
219: #define _IOT_termios /* Hurd ioctl type field.  */ \
220:   _IOT (_IOTS (cflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
221: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/