Output Filters

Parent Previous Next

Output Filters


Output to terminals is cooked by an output filter which handles certain special conditions.  Output filters have a flag which indicates the options related to outputting characters to the terminal.


Value

Mnuemonic

Description

1

TOFF_Null

Indicates that output is to be ignored when it is sent to the output filter.  The user can toggle output on/off by means of the Control-O character.  When the output is turned off, the TOFF_Null flag is set and any output sent to the filter is ignored and not sent to the terminal.

2

TOFF_Paused

Indicates that flow-control has paused output until the terminal or user is ready to view more output.  When paused, the output filter buffers characters sent to it.  Output can be paused/resumed by the terminal sending XON and OXFF when its buffer fills and empties.  Most terminals also allow the user to use control characters to send XON/XOFF characters to manually pause or resume output.  When an XOFF character is received by the terminal, the TOFF_Paused flag is set.  When XON is received, the flag is cleared.

4

TOFF_Noformfeed

Indicates that the terminal doesn't process the form feed control character and would like the output filter to simulate it with line feeds.

8

TOFF_Notab

Indicates that the terminal doesn't process tabs characters.  In this case, the filter simulates tab stops with spaces.  By default, tab stops are considered to be every 8 columns.

16

TOFF_NoWrap

Indicates that the output filter will not output a CR/LF combination when the printing position reaches the terminal width.  Normally, the output filter will do this to automatically wrap output.

32

TOFF_Noverticaltab

Indicates that the terminal doesn't process vertical tabs and wants the output filter to simulate it with line feeds.



The output filter is responsible for keeping track of the current position (column and line) on the terminal.  By default, most control characters not mentioned above will be converted into a form of a circumflex followed by a letter.  For instance, Control-B would be converted to "^B" on output.


For terminals that only support uppercase characters, the filter converts lowercase characters to uppercase.