aboutsummaryrefslogtreecommitdiff
path: root/win32/termios.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--win32/termios.h40
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
17typedef unsigned char cc_t;
18typedef unsigned int tcflag_t;
19typedef unsigned int speed_t;
20
21#define NCCS 18
22struct 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
32struct winsize {
33 unsigned short ws_row, ws_col;
34 unsigned short ws_xpixel, ws_ypixel;
35};
36
37int tcgetattr(int fd, struct termios *t);
38int tcsetattr(int fd, int mode, const struct termios *t);
39
40#endif /* TERMIOS_H */