aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cygwin_termios.h109
1 files changed, 109 insertions, 0 deletions
diff --git a/include/cygwin_termios.h b/include/cygwin_termios.h
new file mode 100644
index 000000000..b7ec2957f
--- /dev/null
+++ b/include/cygwin_termios.h
@@ -0,0 +1,109 @@
1/* iflag bits */
2#define IGNBRK 0x00001
3#define BRKINT 0x00002
4#define IGNPAR 0x00004
5#define IMAXBEL 0x00008
6#define INPCK 0x00010
7#define ISTRIP 0x00020
8#define INLCR 0x00040
9#define IGNCR 0x00080
10#define ICRNL 0x00100
11#define IXON 0x00400
12#define IXOFF 0x01000
13#define IUCLC 0x04000
14#define IXANY 0x08000
15#define PARMRK 0x10000
16
17/* oflag bits */
18
19#define OPOST 0x00001
20#define OLCUC 0x00002
21#define OCRNL 0x00004
22#define ONLCR 0x00008
23#define ONOCR 0x00010
24#define ONLRET 0x00020
25#define OFILL 0x00040
26#define CRDLY 0x00180
27#define CR0 0x00000
28#define CR1 0x00080
29#define CR2 0x00100
30#define CR3 0x00180
31#define NLDLY 0x00200
32#define NL0 0x00000
33#define NL1 0x00200
34#define BSDLY 0x00400
35#define BS0 0x00000
36#define BS1 0x00400
37#define TABDLY 0x01800
38#define TAB0 0x00000
39#define TAB1 0x00800
40#define TAB2 0x01000
41#define TAB3 0x01800
42#define XTABS 0x01800
43#define VTDLY 0x02000
44#define VT0 0x00000
45#define VT1 0x02000
46#define FFDLY 0x04000
47#define FF0 0x00000
48#define FF1 0x04000
49#define OFDEL 0x08000
50
51/* lflag bits */
52#define ISIG 0x0001
53#define ICANON 0x0002
54#define ECHO 0x0004
55#define ECHOE 0x0008
56#define ECHOK 0x0010
57#define ECHONL 0x0020
58#define NOFLSH 0x0040
59#define TOSTOP 0x0080
60#define IEXTEN 0x0100
61#define FLUSHO 0x0200
62#define ECHOKE 0x0400
63#define ECHOCTL 0x0800
64
65#define VDISCARD 1
66#define VEOL 2
67#define VEOL2 3
68#define VEOF 4
69#define VERASE 5
70#define VINTR 6
71#define VKILL 7
72#define VLNEXT 8
73#define VMIN 9
74#define VQUIT 10
75#define VREPRINT 11
76#define VSTART 12
77#define VSTOP 13
78#define VSUSP 14
79#define VSWTC 15
80#define VTIME 16
81#define VWERASE 17
82
83#define TCSAFLUSH 1
84#define TCSANOW 2
85#define TCSADRAIN 3
86#define TCSADFLUSH 4
87
88typedef unsigned char cc_t;
89typedef unsigned int tcflag_t;
90typedef unsigned int speed_t;
91typedef unsigned short otcflag_t;
92typedef unsigned char ospeed_t;
93
94#define NCCS 18
95struct termios {
96 tcflag_t c_iflag;
97 tcflag_t c_oflag;
98 tcflag_t c_cflag;
99 tcflag_t c_lflag;
100 char c_line;
101 cc_t c_cc[NCCS];
102 speed_t c_ispeed;
103 speed_t c_ospeed;
104};
105
106int tcgetattr(int fd, struct termios *t);
107int tcsetattr(int fd, int mode, const struct termios *t);
108int is_cygwin_tty(int fd);
109int wincon_read(int fd, char *buf, int size);