Go to the previous, next section.

Local Modes

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, if set, enables canonical input processing mode. Otherwise, input is processed in noncanonical mode. See section Two Styles of Input: Canonical or Not.

If this bit is set, echoing of input characters back to the terminal is enabled.

If this bit is set, echoing indicates erasure of input with the ERASE character by erasing the last character in the current line from the screen. Otherwise, the character erased is re-echoed to show what has happened (suitable for a printing terminal).

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.

This bit enables special display of the KILL character. There are two ways this can be done. The better way is by erasing on the screen the entire line that has been killed. The worse way is by moving to a new line after echoing the KILL character normally. Some systems do one, some systems do the other, and some let you choose either way.

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.

If this bit is set and the ICANON bit is also set, then the newline ('\n') character is echoed even if the ECHO bit is not set.

This bit controls whether the INTR, QUIT, and SUSP characters are recognized. The functions associated with these characters are performed if and only if this bit is set. Being in canonical or noncanonical input mode has no affect on the interpretation of these characters.

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.

This bit is similar to 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.

Normally, the INTR, QUIT, and SUSP characters cause input and output queues for the terminal to be cleared. If this bit is set, the queues are not cleared.

If this bit is set and the system supports job control, then 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.

On BSD systems, this bit selects between the two alternative ways of displaying the KILL character, when 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.

This bit enables display of the ERASE character in a way that is geared to a hardcopy terminal.

If this bit is set, echo control characters with `^' followed by the corresponding text character. Thus, control-A echoes as `^A'.

This bit determines how far the WERASE character should erase. The WERASE character erases back to the beginning of a word; the question is, where do words begin?

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.

This is the bit that toggles when the user types the DISCARD character. While this bit is set, all output is discarded. See section Other Special Characters.

Setting this bit disables handling of the STATUS character. See section Other Special Characters.

If this bit is set, it indicates that there is a line of input that needs to be reprinted. Typing the REPRINT character sets this bit; the bit remains set until reprinting is finished. See section BSD Extensions to Editing Characters.

Go to the previous, next section.