18.1. Introduction
The handling of terminal I/O is a messy area, regardless of the operating system. The UNIX System is no exception. The manual page for...
18.2. Overview
Terminal I/O has two modes:
Canonical mode input processing. In this mode, terminal input is processed as lines. The terminal driver returns at most one...
18.3. Special Input Characters
POSIX.1 defines 11 characters that are handled specially on input. Implementations define additional special characters. Figure summarizes these special characters.
Figure 18.9. Summary...
18.4. Getting and Setting Terminal Attributes
To get and set a termios structure, we call two functions: tcgetattr and tcsetattr. This is how we examine and...
18.5. Terminal Option Flags
In this section, we list all the various terminal option flags, expanding the descriptions of all the options from Figures through 18.6....
18.6. stty Command
All the options described in the previous section can be examined and changed from within a program, with the tcgetattr and tcsetattr functions...
18.7. Baud Rate Functions
The term baud rate is a historical term that should be referred to today as "bits per second." Although most terminal devices...
18.8. Line Control Functions
The following four functions provide line control capability for terminal devices. All four require that filedes refer to a terminal device; otherwise,...
18.9. Terminal Identification
Historically, the name of the controlling terminal in most versions of the UNIX System has been /dev/tty. POSIX.1 provides a runtime function that...
18.10. Canonical Mode
Canonical mode is simple: we issue a read, and the terminal driver returns when a line has been entered. Several conditions cause the...
18.11. Noncanonical Mode
Noncanonical mode is specified by turning off the ICANON flag in the c_lflag field of the termios structure. In noncanonical mode, the input...
18.13. termcap, terminfo, and curses
termcap stands for "terminal capability," and it refers to the text file /etc/termcap and a set of routines to read this...
18.14. Summary
Terminals have many features and options, most of which we're able to change to suit our needs. In this chapter, we've described numerous functions...
18.1Write a program that calls tty_raw and terminates (without resetting the terminal mode). If your system provides the reset(1) command (all four systems described in...
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.