Skip to main content

relibc/header/termios/
redox.rs

1/* c_cc { */
2/// EOF character.
3/// End of file. Causes the pending tty buffer to be sent to the waiting user
4/// program without waiting for end-of-line.
5/// Canonical mode only.
6pub const VEOF: usize = 0;
7/// EOL character.
8/// Additional end-of-line character.
9/// Canonical mode only.
10pub const VEOL: usize = 1;
11/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/termios.3.html>.
12///
13/// EOL2 character.
14/// Another end-of-line character.
15pub const VEOL2: usize = 2;
16/// ERASE character.
17/// Erases the previous not-yet-erased character, but does not erase past `EOF`
18/// or beginning-of-line.
19/// Canonical mode only.
20pub const VERASE: usize = 3;
21/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/termios.3.html>.
22///
23/// WERASE character.
24/// Word erase.
25pub const VWERASE: usize = 4;
26/// KILL character.
27/// Erases the input since the last `EOF` or beginning-of-line.
28/// Canonical mode only.
29pub const VKILL: usize = 5;
30/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/termios.3.html>.
31///
32/// REPRINT character.
33/// Reprints unread characters.
34pub const VREPRINT: usize = 6;
35/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/termios.3.html>.
36///
37/// SWTCH character (not supported under Linux).
38/// Used in System V to switch shells in `shell layers`, a predecessor to shell
39/// job control.
40pub const VSWTCH: usize = 7;
41/// INTR character.
42/// Send a `SIGINT` signal.
43/// Canonical and Non-Canonical mode.
44pub const VINTR: usize = 8;
45/// QUIT character.
46/// Send a `SIGQUIT` signal.
47/// Canonical and Non-Canonical mode.
48pub const VQUIT: usize = 9;
49/// SUSP character.
50/// Send `SIGTSTP` signal.
51/// Canonical and Non-Canonical mode.
52pub const VSUSP: usize = 10;
53/// START character.
54/// Restarts output stopped by the STOP character.
55/// Canonical and Non-Canonical mode.
56pub const VSTART: usize = 12;
57/// STOP character.
58/// Stops the output until the START character is typed.
59/// Canonical and Non-Canonical mode.
60pub const VSTOP: usize = 13;
61/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/termios.3.html>.
62///
63/// LNEXT character.
64/// Literal next. Quotes the next input character, depriving it of a possible
65/// special meaning.
66pub const VLNEXT: usize = 14;
67/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/termios.3.html>.
68///
69/// DISCARD character (not supported under Linux).
70/// Toggles discarding pending output.
71pub const VDISCARD: usize = 15;
72/// MIN value.
73/// Minimum number of characters for noncanonical read.
74/// Non-Canonical mode only.
75pub const VMIN: usize = 16;
76/// TIME value.
77/// Timeout in decideconds for noncanonical read.
78/// Non-Canonical mode only.
79pub const VTIME: usize = 17;
80/// Size of the array `c_cc` for control characters.
81pub const NCCS: usize = 32;
82/* } c_cc */
83
84/* c_iflag { */
85pub const IGNBRK: usize = 0o000_001;
86pub const BRKINT: usize = 0o000_002;
87pub const IGNPAR: usize = 0o000_004;
88pub const PARMRK: usize = 0o000_010;
89pub const INPCK: usize = 0o000_020;
90pub const ISTRIP: usize = 0o000_040;
91pub const INLCR: usize = 0o000_100;
92pub const IGNCR: usize = 0o000_200;
93pub const ICRNL: usize = 0o000_400;
94pub const IXON: usize = 0o001_000;
95pub const IXOFF: usize = 0o002_000;
96pub const IXANY: usize = 0o004_000;
97/* } c_iflag */
98
99/* c_oflag { */
100pub const OPOST: usize = 0o000_001;
101pub const ONLCR: usize = 0o000_002;
102pub const OLCUC: usize = 0o000_004;
103pub const OCRNL: usize = 0o000_010;
104pub const ONOCR: usize = 0o000_020;
105pub const ONLRET: usize = 0o000_040;
106pub const OFILL: usize = 0o0000_100;
107pub const OFDEL: usize = 0o0000_200;
108/* } c_oflag */
109
110/* c_cflag { */
111pub const B0: usize = 0o000_000;
112pub const B50: usize = 0o000_001;
113pub const B75: usize = 0o000_002;
114pub const B110: usize = 0o000_003;
115pub const B134: usize = 0o000_004;
116pub const B150: usize = 0o000_005;
117pub const B200: usize = 0o000_006;
118pub const B300: usize = 0o000_007;
119pub const B600: usize = 0o000_010;
120pub const B1200: usize = 0o000_011;
121pub const B1800: usize = 0o000_012;
122pub const B2400: usize = 0o000_013;
123pub const B4800: usize = 0o000_014;
124pub const B9600: usize = 0o000_015;
125pub const B19200: usize = 0o000_016;
126pub const B38400: usize = 0o000_017;
127
128pub const B57600: usize = 0o0_020;
129pub const B115200: usize = 0o0_021;
130pub const B230400: usize = 0o0_022;
131pub const B460800: usize = 0o0_023;
132pub const B500000: usize = 0o0_024;
133pub const B576000: usize = 0o0_025;
134pub const B921600: usize = 0o0_026;
135pub const B1000000: usize = 0o0_027;
136pub const B1152000: usize = 0o0_030;
137pub const B1500000: usize = 0o0_031;
138pub const B2000000: usize = 0o0_032;
139pub const B2500000: usize = 0o0_033;
140pub const B3000000: usize = 0o0_034;
141pub const B3500000: usize = 0o0_035;
142pub const B4000000: usize = 0o0_036;
143
144pub const CSIZE: usize = 0o001_400;
145pub const CS5: usize = 0o000_000;
146pub const CS6: usize = 0o000_400;
147pub const CS7: usize = 0o001_000;
148pub const CS8: usize = 0o001_400;
149
150pub const CSTOPB: usize = 0o002_000;
151pub const CREAD: usize = 0o004_000;
152pub const PARENB: usize = 0o010_000;
153pub const PARODD: usize = 0o020_000;
154pub const HUPCL: usize = 0o040_000;
155
156pub const CLOCAL: usize = 0o0100000;
157/* } c_clfag */
158
159/* c_lflag { */
160pub const ISIG: usize = 0x0000_0080;
161pub const ICANON: usize = 0x0000_0100;
162pub const ECHO: usize = 0x0000_0008;
163pub const ECHOE: usize = 0x0000_0002;
164pub const ECHOK: usize = 0x0000_0004;
165pub const ECHONL: usize = 0x0000_0010;
166pub const NOFLSH: usize = 0x8000_0000;
167pub const TOSTOP: usize = 0x0040_0000;
168pub const IEXTEN: usize = 0x0000_0400;
169/* } c_lflag */
170
171// POSIX extensions
172/// Sentinel value to disable a control char.
173pub const _POSIX_VDISABLE: u8 = 0;