This section describes the terminal flags and fields that control how
output characters are translated and padded for display. All of these
are contained in the
c_oflag member of the
c_oflag member itself is an integer, and you change the flags
and fields using the operators
try to specify the entire value for
only specific flags and leave the rest untouched (see Setting Terminal Modes Properly).
If this bit is set, output data is processed in some unspecified way so
that it is displayed appropriately on the terminal device. This
typically includes mapping newline characters (
carriage return and linefeed pairs.
If this bit isn’t set, the characters are transmitted as-is.
The following three bits are effective only if
OPOST is set.
If this bit is set, convert the newline character on output into a pair of characters, carriage return followed by linefeed.
If this bit is set, convert tab characters on output into the appropriate
number of spaces to emulate a tab stop every eight columns. This bit
exists only on BSD systems and GNU/Hurd systems; on
GNU/Linux systems it is available as
If this bit is set, discard C-d characters (code
output. These characters cause many dial-up terminals to disconnect.
This bit exists only on BSD systems and GNU/Hurd systems.