Next: Screen Manipulation with ncurses
Up: Terminal Control the Hard
Previous: Changing Terminal Modes
- Where termios gives you very low-level control over input processing, terminfo gives you a similar level of control over output processing.
- terminfo provides a portable, lowlevel interface to operations such as clearing a terminal screen, positioning the cursor, or
deleting lines or characters (see man 5 terminfo).
- terminfo Capabilities;
For each possible terminal type, such as VT100 or xterm, terminfo maintains a list of that terminal's capabilities and features, called a capname, or CAPability NAME. Capnames fall into one of the following categories:
- boolean,
- numeric,
- string.
- The http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/newgetcaps.c program in Fig. 4 shows how to query and print a few (and some additional) of the current terminal's capabilities.
Figure 4:
Puts the terminal in raw mode.
|
Cem Ozdogan
2007-05-14