Fix build error by adding -fno-stack-protector to CFLAGS in usr/LBuild (#63)
[lunaix-os.git] / lunaix-os / includes / usr / lunaix / term.h
1 #ifndef _LUNAIX_UHDR_UTERM_H
2 #define _LUNAIX_UHDR_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 _CLOCAL 1
71 #define _CREAD (1 << 1)
72 #define _CSZ_MASK (0b11 << 2)
73 #define _CS5 (0b00 << 2)
74 #define _CS6 (0b01 << 2)
75 #define _CS7 (0b10 << 2)
76 #define _CS8 (0b11 << 2)
77 #define _CSTOPB (1 << 4)
78 #define _CHUPCL (1 << 5)
79 #define _CPARENB (1 << 6)
80 #define _CPARODD (1 << 7)
81
82 #define _TCSANOW 1
83 #define _TCSADRAIN 2
84 #define _TCSAFLUSH 3
85
86 #define TDEV_TCGETATTR 1
87 #define TDEV_TCSETATTR 2
88 #define TDEV_TCPUSHLC 3
89 #define TDEV_TCPOPLC 4
90 #define TDEV_TCSETCHDEV 5
91 #define TDEV_TCGETCHDEV 6
92
93 typedef int tcflag_t;
94 typedef char cc_t;
95 typedef unsigned int speed_t;
96
97 struct termios
98 {
99     tcflag_t c_iflag;
100     tcflag_t c_oflag;
101     tcflag_t c_cflag;
102     tcflag_t c_lflag;
103     cc_t c_cc[_NCCS];
104     speed_t c_baud;
105 };
106
107 #endif /* _LUNAIX_UHDR_UTERM_H */