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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// devela::sys::os::linux::io::term::_raw::local
//
use crate::c_uint;
#[doc = crate::_tags!(internal linux term)]
/// [`LinuxTermios`][crate::LinuxTermios] local flags.
#[doc = crate::_doc_meta!{location("sys/os/linux/io")}]
#[derive(Debug)]
pub(crate) struct LINUX_TERMIOS_LFLAG;
impl LINUX_TERMIOS_LFLAG {
/// Enable signals.
///
/// When any of the characters `INTR`, `QUIT`, `SUSP`, or `DSUSP` are
/// received, generate the corresponding signal.
pub const ISIG: c_uint = 0_000_001;
/// Enable canonical mode (erase and kill processing).
pub const ICANON: c_uint = 0_000_002;
/// If ICANON is also set, terminal is uppercase only.
/// (not in POSIX; not supported under Linux)
///
/// Input is converted to lowercase, except for characters preceded by `\`.
///
/// On output, uppercase characters are preceded by `\` and lowercase characters
/// are converted to uppercase.
///
/// [requires `_BSD_SOURCE` or `_SVID_SOURCE` or `_XOPEN_SOURCE`]
pub const XCASE: c_uint = 0_000_004;
/// Echo input characters.
pub const ECHO: c_uint = 0_000_010;
/// If [`ICANON`](Self::ICANON) is also set, the `ERASE` character erases
/// the preceding input character, and `WERASE` erases the preceding word.
pub const ECHOE: c_uint = 0_000_020;
/// If [`ICANON`](Self::ICANON) is also set, the `KILL` character
/// erases the current line.
pub const ECHOK: c_uint = 0_000_040;
/// If [`ICANON`](Self::ICANON) is also set, echo the `NL` character
/// even if [`ECHO`](Self::ECHO) is not set.
pub const ECHONL: c_uint = 0_000_100;
/// Disable flushing the input and output queues when
/// generating signals for the `INT`, `QUIT`, and `SUSP` characters.
pub const NOFLSH: c_uint = 0_000_200;
/// Send the `SIGTTOU` signal to the process group of a background process
/// which tries to write to its controlling terminal.
pub const TOSTOP: c_uint = 0_000_400;
/// If [`ECHO`](Self::ECHO) is also set, terminal special characters
/// other than `TAB`, `NL`, `START`, and `STOP` are echoed as `^X`,
/// where `X` is the character with ASCII code `0x40` greater than
/// the special character.
///
/// (not in POSIX)
///
/// For example, character `0x08` (BS) is echoed as `^H`.
///
/// [requires `_BSD_SOURCE` or `_SVID_SOURCE`]
pub const ECHOCTL: c_uint = 0_001_000;
/// If [`ICANON`](Self::ICANON) and [`ECHO`](Self::ECHO) are also set,
/// characters are printed as they are being erased.
///
/// (not in POSIX)
///
/// [requires `_BSD_SOURCE` or `_SVID_SOURCE`]
pub const ECHOPRT: c_uint = 0_002_000;
/// If [`ICANON`](Self::ICANON) is also set, `KILL` is echoed by erasing
/// each character on the line, as specified by [`ECHOE`](Self::ECHOE)
/// and [`ECHOPRT`](Self::ECHOPRT).
///
/// (not in POSIX)
///
/// [requires `_BSD_SOURCE` or `_SVID_SOURCE`]
pub const ECHOKE: c_uint = 0_004_000;
// /// Echo only when a process is reading.
// ///
// /// (not in POSIX) (Not implemented on Linux)
// pub const DEFECHO: c_uint = ?;
/// Output is being flushed.
///
/// This flag is toggled by typing the `DISCARD` character.
///
/// (not in POSIX; not supported under Linux)
///
/// [requires `_BSD_SOURCE` or `_SVID_SOURCE`]
pub const FLUSHO: c_uint = 0_010_000;
/// All characters in the input queue are reprinted
/// when the next character is read.
///
/// (not in POSIX; not supported under Linux)
///
/// (bash(1) handles typeahead this way.)
///
/// [requires `_BSD_SOURCE` or `_SVID_SOURCE`]
pub const PENDING: c_uint = 0_040_000;
/// Enable implementation-defined input processing.
///
/// This flag, as well as [`ICANON`](Self::ICANON) must be enabled for
/// the special characters `EOL2`, `LNEXT`, `REPRINT`, `WERASE` to be
/// interpreted, and for the [`IUCLC`](LINUX_TERMIOS_IFLAG::IUCLC) flag
/// to be effective.
pub const IEXTEN: c_uint = 0_100_000;
/// enable "LINEMODE"; useful with high latency links
pub const EXTPROC: c_uint = 0_200_000;
}