home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


UNIX Power Tools

UNIX Power ToolsSearch this book
Previous: 5.6 Checklist: Terminal Hangs When I Log In Chapter 5
Setting Up Your Terminal
Next: 5.8 Terminal Escape Sequences
 

5.7 What termcap and terminfo Do and Don't Control

One important point to realize about termcap and terminfo is that many programs do not use them at all, and that there are several other mechanisms that may also affect terminal operation.

The operation of the serial interface is controlled by several system files (/etc/ttys and /etc/gettytab on BSD and other non-AT&T systems, and /etc/inittab and /etc/gettydefs in System V). Users can affect serial-line parameters with the stty (5.9 , 41.3 , 41.2 ) command. In addition to normal communications parameters such as data rate, start and stop bits, parity, and so on, these parameters include such things as the translation of the carriage returns generated by most terminals into the linefeeds expected by most UNIX programs, division of input into lines, and definition of special control characters for erasing a character that has been typed, killing a line of typed input, and interrupting a running process.

One other area that termcap and terminfo do not control is terminal tab setting. This is done by the tabs command. For more information, see the manual pages on stty (4) and termio (7) (System V).

termcap and terminfo , by contrast, tend to control visual attributes of the terminal. The terminal capabilities defined for a terminal tell a screen-oriented program how big the screen is (for screen-by-screen paging and cursor movement), how to move to any point on the screen, how to refresh the screen, how to enter and exit any special display modes (such as inverse video, blinking, or underlining), and so on. [The screen size may be set in other ways, too. See article 42.5 . -JP  ]

But there is some overlap. For example, a terminal can be unusable because a program has left either the serial line modes or the terminal itself in an unexpected state. For this reason, terminal initialization (5.11 ) , as performed by the tset and tput programs, initializes both the terminal and the serial line interface.

- TOR from O'Reilly & Associates' termcap & terminfo , Chapter 1


Previous: 5.6 Checklist: Terminal Hangs When I Log In UNIX Power Tools Next: 5.8 Terminal Escape Sequences
5.6 Checklist: Terminal Hangs When I Log In Book Index 5.8 Terminal Escape Sequences

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System