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).
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.
ECHOE
, enables display of the ERASE character in
a way that is geared to a hardcopy terminal. When you type the ERASE
character, a `\' character is printed followed by the first
character erased. Typing the ERASE character again just prints the next
character erased. Then, the next time you type a normal character, a
`/' character is printed before the character echoes.
This is a BSD extension, and exists only in BSD systems and the GNU system.
ECHOKE
(below) is nicer to look at.
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.
ECHOK
. It enables special display of the
KILL character by erasing on the screen the entire line that has been
killed. This is a BSD extension, and exists only in BSD systems and the
GNU system.
ICANON
bit is also set, then the
newline ('\n'
) character is echoed even if the ECHO
bit
is not set.
ECHO
bit is also set, echo control
characters with `^' followed by the corresponding text character.
Thus, control-A echoes as `^A'. This is usually the preferred mode
for interactive input, because echoing a control character back to the
terminal could have some undesired effect on the terminal.
This is a BSD extension, and exists only in BSD systems and the GNU system.
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
implementation-defined meaning,
so you cannot rely on this interpretation on all systems.
On BSD systems and the GNU system, it enables the LNEXT and DISCARD characters. See section Other Special Characters.
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; they exist only in BSD systems and the GNU system.
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.
See section Characters for Input Editing, for more information about the WERASE character.
Go to the first, previous, next, last section, table of contents.