blob: 60c51119bd32f9e723c381ed3d280343e87e9bba (
plain)
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
31
32
33
34
35
36
37
38
39
40
|
#ifndef TERMIOS_H
#define TERMIOS_H
#define ECHO 0x0004
#define VINTR 0
#define VEOF 1
#define TCIFLUSH 0
#define TCSAFLUSH 1
#define TCSANOW 2
#define TCSADRAIN 3
#define TCSADFLUSH 4
#define CSIZE 0
typedef unsigned char cc_t;
typedef unsigned int tcflag_t;
typedef unsigned int speed_t;
#define NCCS 18
struct termios {
tcflag_t c_iflag;
tcflag_t c_oflag;
tcflag_t c_cflag;
tcflag_t c_lflag;
char c_line;
cc_t c_cc[NCCS];
unsigned long w_mode;
};
struct winsize {
unsigned short ws_row, ws_col;
unsigned short ws_xpixel, ws_ypixel;
};
int tcgetattr(int fd, struct termios *t);
int tcsetattr(int fd, int mode, const struct termios *t);
#endif /* TERMIOS_H */
|