Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Previous: Input Modes, Up: Terminal Modes


17.4.5 Output Modes

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 struct termios structure.

The c_oflag 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_oflag—instead, change only specific flags and leave the rest untouched (see Setting Modes).

— Macro: tcflag_t OPOST

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 ('\n') onto carriage return and linefeed pairs.

If this bit isn't set, the characters are transmitted as-is.

The following three bits are BSD features, and they exist only BSD systems and the GNU system. They are effective only if OPOST is set.

— Macro: tcflag_t ONLCR

If this bit is set, convert the newline character on output into a pair of characters, carriage return followed by linefeed.

— Macro: tcflag_t OXTABS

If this bit is set, convert tab characters on output into the appropriate number of spaces to emulate a tab stop every eight columns.

— Macro: tcflag_t ONOEOT

If this bit is set, discard C-d characters (code 004) on output. These characters cause many dial-up terminals to disconnect.


 
 
  Published under the terms of the GNU General Public License Design by Interspire