diff options
Diffstat (limited to '')
-rw-r--r-- | win32/termios.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/win32/termios.h b/win32/termios.h new file mode 100644 index 000000000..60c51119b --- /dev/null +++ b/win32/termios.h | |||
@@ -0,0 +1,40 @@ | |||
1 | #ifndef TERMIOS_H | ||
2 | #define TERMIOS_H | ||
3 | |||
4 | #define ECHO 0x0004 | ||
5 | |||
6 | #define VINTR 0 | ||
7 | #define VEOF 1 | ||
8 | |||
9 | #define TCIFLUSH 0 | ||
10 | #define TCSAFLUSH 1 | ||
11 | #define TCSANOW 2 | ||
12 | #define TCSADRAIN 3 | ||
13 | #define TCSADFLUSH 4 | ||
14 | |||
15 | #define CSIZE 0 | ||
16 | |||
17 | typedef unsigned char cc_t; | ||
18 | typedef unsigned int tcflag_t; | ||
19 | typedef unsigned int speed_t; | ||
20 | |||
21 | #define NCCS 18 | ||
22 | struct termios { | ||
23 | tcflag_t c_iflag; | ||
24 | tcflag_t c_oflag; | ||
25 | tcflag_t c_cflag; | ||
26 | tcflag_t c_lflag; | ||
27 | char c_line; | ||
28 | cc_t c_cc[NCCS]; | ||
29 | unsigned long w_mode; | ||
30 | }; | ||
31 | |||
32 | struct winsize { | ||
33 | unsigned short ws_row, ws_col; | ||
34 | unsigned short ws_xpixel, ws_ypixel; | ||
35 | }; | ||
36 | |||
37 | int tcgetattr(int fd, struct termios *t); | ||
38 | int tcsetattr(int fd, int mode, const struct termios *t); | ||
39 | |||
40 | #endif /* TERMIOS_H */ | ||