Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Output modes

&pagelevel(5)&pagelevel

The c_oflag field specifies how the terminal interface handles output. It is constructed from the bitwise inclusive OR of zero or more of the following masks, which are bitwise distinct. The mask names in the table below are defined in termios.h:

Mask name

Definition

OPOST

Post-process output

OLCUC

Map lowercase letters to uppercase on output. Will no longer be
supported by the X/Open-Standard in future.

ONLCR

Map NL to CR-NL on output

OCRNL

Map CR to NL on output

ONOCR

No CR output at column 0

ONLRET

NL performs CR function

OFILL

Use fill characters for delay

OFDEL

The fill character is DEL (otherwise NUL)

NLDLY

NL0

NL1

Select newline (NL) delays

NL character type 0

NL character type 1

CRDLY

CR0

CR1

CR2

CR3

Select carriage return (CR) delays:

CR delay type 0

CR delay type 1

CR delay type 2

CR delay type 3

CR0

CR delay type 0

TABDLY

TAB0

TAB1

TAB2

TAB3

Select delays for horizontal tabs:

Horizontal-tab delay type 0

Horizontal-tab delay type 1

Horizontal-tab delay type 2

Horizontal-tab delay type 3

BSDLY

BS0

BS1

Select delays for backspace:

Backspace-delay type 0

Backspace-delay type 1

VTDLY

VT0

VT1

Select delays for vertical tabs:

Vertical-tab delay type 0

Vertical-tab delay type 1

FFDLY

FF0

FF1

Select delays for form-feed:

Form-feed delay type 0

Form-feed delay type 1

If OPOST is set, output data is post-processed on the basis of the remaining bits of c_oflag so that lines of text are modified to appear appropriately on the terminal device; otherwise, characters are transmitted without change.

If OLCUC is set, a lowercase letter is mapped to the corresponding uppercase letter before being transmitted. This function is often used in conjunction with IUCLC for input modes. Will no longer be supported by the X/Open-Standard in future.

When ONLCR is set, the NL character (newline) is transmitted as the character pair CR-NL (carriage return - newline). If OCRNL is set, the CR character is transmitted as an NL character. When ONOCR is set, a CR character in column 0 (first position in the line) is not transmitted. If ONLRET is set, it is assumed that the NL character performs the carriage return function; the column pointer is set to 0, and the applicable carriage return delay is used. When ONLRET is not set, it is assumed that the NL character just performs the linefeed function; the column pointer will remain unchanged in this case. The column pointer is also set to 0 if the CR character is actually transmitted.

The delay bits specify how long transmission stops to allow for mechanical or other movement when certain characters are sent to the terminal. In all cases a value of 0 indicates no delay. If OFILL is set, fill characters will be transmitted for delay instead of a timed delay. This is useful for high baud rate terminals which need only a minimal delay. If OFDEL is set, the fill character is DEL, otherwise NUL.

If a form-feed or vertical-tab delay is specified, the delay will last for about 2 seconds.
A newline delay lasts for about 0.10 seconds. If ONLRET is specified, carriage-return delays are used instead of newline delays. Two fill characters are transmitted if OFILL is set.

Carriage-return delay type 1 depends on the current column position, type 2 is about 0.10 seconds, and type 3 is about 0.15 seconds. If OFILL is set, two fill characters are transmitted for type 1, four for type 2.

Horizontal-tab delay type 1 depends on the current column position. Type 2 lasts for about 0.10 seconds; type 3 specifies that tabs are to be expanded into spaces. If OFILL is set, two fill characters are transmitted for any delay.
The backspace delay lasts for about 0.05 seconds. One fill character is transmitted if OFILL is set. The actual delays will depend on the line speed and the load on the system.
The initial value for all output modes (value of c_oflag) after a call to open() is that no flag is set.