|
|
Some programs need to use lower level routines (that is, primitives) than those offered by the curses routines. For such programs, the terminfo routines are offered. They do not manage your terminal screen, but rather give you access to strings and capabilities which you can use yourself to manipulate the terminal.
There are three circumstances when it is proper to use terminfo routines. The first is when you need only some screen management capabilities, for example, making text stand out on a screen. The second is when writing a filter. A typical filter does one transformation on an input stream without clearing the screen or addressing the cursor. If this transformation is terminal dependent and clearing the screen is inappropriate, use of the terminfo routines is worthwhile. The third is when you are writing a special purpose tool that sends a special purpose string to the terminal, such as programming a function key, setting tab stops, sending output to a printer port, or dealing with the status line. Otherwise, you are discouraged from using these routines: the higher level curses routines make your program more portable to other UNIX systems and to a wider class of terminals.