|
发表于 2011-6-10 19:21:20
|
显示全部楼层
From termios man page, you can get the information as follow:
================================This is a little piece from the termios.3 manual page=====================================================
The termios structure
Many of the functions described here have a termios_p argument that is a
pointer to a termios structure. This structure contains at least the
following members:
tcflag_t c_iflag; /* input modes */
tcflag_t c_oflag; /* output modes */
tcflag_t c_cflag; /* control modes */
tcflag_t c_lflag; /* local modes */
cc_t c_cc[NCCS]; /* control chars */
----------------------------------------------------------------------
The c_cc array defines the special control characters. The symbolic indices
(initial values) and meaning are:
VERASE (0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character.
This erases the previous not-yet-erased character, but does not erase
past EOF or beginning-of-line. Recognized when ICANON is set, and then
not passed as input.
=================================================== End ==========================================
'\b' is Character Escape Codes in C programming language. It actually is ASCII[1] code BS (Backspace, numeric 0x08), and works as a
control sequences in VT100 series terminal device. When terminal received BS, it moves cursor to the left one character position,
unless it is at the left margin, in which case no action occurs[2].
[1] http://en.wikipedia.org/wiki/ASCII
[2] http://vt100.net/docs/tp83/appendixb.html |
|