Go to the previous, next section.
This section describes the flags for the c_lflag
member of the
struct termios
structure. These flags generally control
higher-level aspects of input processing than the input modes flags
described in section Input Modes, such as echoing, signals, and the choice
of canonical or noncanonical input.
The c_lflag
member itself is an integer, and you change the flags
and fields using the operators &
, |
, and ^
. Don't
try to specify the entire value for c_lflag
---instead, change
only specific flags and leave the rest untouched (see section Setting Terminal Modes Properly).
ICANON
ECHO
ECHOE
This bit only controls the display behavior; the ICANON
bit by
itself controls actual recognition of the ERASE character and erasure of
input, without which ECHOE
is simply irrelevant.
ECHOK
If this bit is not set, the KILL character echoes just as it would if it were not the KILL character. Then it is up to the user to remember that the KILL character has erased the preceding input; there is no indication of this on the screen.
This bit only controls the display behavior; the ICANON
bit by
itself controls actual recognition of the KILL character and erasure of
input, without which ECHOK
is simply irrelevant.
ECHONL
ICANON
bit is also set, then the
newline ('\n'
) character is echoed even if the ECHO
bit
is not set.
ISIG
You should use caution when disabling recognition of these characters. Programs that cannot be interrupted interactively are very user-unfriendly. If you clear this bit, your program should provide some alternate interface that allows the user to interactively send the signals associated with these characters, or to escape from the program.
See section Characters that Cause Signals.
IEXTEN
ISIG
, but controls implementation-defined
special characters. If it is set, it might override the default behavior
for the ICANON
and ISIG
local mode flags, and the IXON
and IXOFF
input mode flags.
NOFLSH
TOSTOP
SIGTTOU
signals are generated by background processes that
attempt to write to the terminal. See section Access to the Controlling Terminal.
The following bits are BSD extensions; the GNU library defines these symbols on any system if you ask for them, but the settings of the bits have no effect except on BSD systems and on the GNU system.
ECHOKE
ECHOK
is set. If
ECHOKE
is set, then the KILL character erases the whole screen
line; otherwise, the KILL character moves to the next screen line.
The setting of ECHOKE
has no effect when ECHOK
is clear.
ECHOPRT
ECHOCTL
ALTWERASE
If this bit is clear, then the beginning of a word is a nonwhitespace character following a whitespace character. If the bit is set, then the beginning of a word is an alphanumeric character or underscore following a character which is none of those.
FLUSHO
NOKERNINFO
PENDIN
Go to the previous, next section.