8866b308971a38adbe8a25b44d16ce27ac3c46af
[lunaix-os.git] / lunaix-os / includes / usr / lunaix / term.h
1 #ifndef __LUNAIX_UTERM_H
2 #define __LUNAIX_UTERM_H
3
4 #define _BRKINT (1)
5 #define _ICRNL (1 << 1)
6 #define _IGNBRK (1 << 2)
7 #define _IGNCR (1 << 3)
8 #define _IGNPAR (1 << 4)
9 #define _INLCR (1 << 5)
10 #define _INPCK (1 << 6)
11 #define _ISTRIP (1 << 7)
12 #define _IUCLC (1 << 8)
13 #define _IXANY (1 << 9)
14 #define _IXOFF (1 << 10)
15 #define _IXON (1 << 11)
16 #define _PARMRK (1 << 12)
17
18 #define _OPOST 1
19 #define _OCRNL _ICRNL
20
21 // 2
22 // 3
23 // 4
24
25 #define _ONLRET _INLCR
26 #define _ONLCR (1 << 6)
27
28 // 7
29
30 #define _OLCUC _IUCLC // 8
31
32 #define _ECHO (1)
33 #define _ECHOE (1 << 1)
34 #define _ECHOK (1 << 2)
35 #define _ECHONL (1 << 3)
36 #define _ICANON (1 << 4)
37 #define _ISIG (1 << 5)
38 #define _IEXTEN (1 << 6)
39 #define _NOFLSH (1 << 7)
40
41 #define _VEOF 0
42 #define _VEOL 1
43 #define _VERASE 2
44 #define _VINTR 3
45 #define _VKILL 4
46 #define _VQUIT 5
47 #define _VSUSP 6
48 #define _VSTART 7
49 #define _VSTOP 8
50 #define _VMIN 9
51 #define _VTIME 10
52 #define _NCCS 11
53
54 #define _B50 50
55 #define _B75 75
56 #define _B110 110
57 #define _B134 134
58 #define _B150 150
59 #define _B200 200
60 #define _B300 300
61 #define _B600 600
62 #define _B1200 1200
63 #define _B1800 1800
64 #define _B2400 2400
65 #define _B4800 4800
66 #define _B9600 9600
67 #define _B19200 19200
68 #define _B38400 38400
69
70 #define _TCSANOW 1
71 #define _TCSADRAIN 2
72 #define _TCSAFLUSH 3
73
74 #define TDEV_TCGETATTR 1
75 #define TDEV_TCSETATTR 2
76 #define TDEV_TCPUSHLC 3
77 #define TDEV_TCPOPLC 4
78 #define TDEV_TCSETCHDEV 5
79 #define TDEV_TCGETCHDEV 6
80
81 typedef int tcflag_t;
82 typedef char cc_t;
83 typedef unsigned int speed_t;
84
85 struct _termios
86 {
87     tcflag_t c_iflag;
88     tcflag_t c_oflag;
89     tcflag_t c_cflag;
90     tcflag_t c_lflag;
91     cc_t c_cc[_NCCS];
92     speed_t c_baud;
93 };
94
95 #endif /* __LUNAIX_UTERM_H */