[plug] Termcap
Mike Holland
myk at plug.linux.org.au
Thu Jan 23 07:49:11 WST 2003
On 22 Jan 2003, Anne Busby wrote:
>
> I have been asked if there is a description of what the escape sequences
> are in the termcap files. I believe he is trying to put together a color
> termcap entry.
Anne,
Is it possible to use terminfo instead?
I assume you've read the man page and comments in /etc/termcap
Is this what you want: ? ( From the SunOS man pages )
Escape Sequence Codes
A number of escape sequences are provided in the string-
valued capabilities for easy encoding of characters there:
\E maps to ESC
^X maps to CTRL-X for any appropriate character
X
\n maps to LINEFEED
\r maps to RETURN
\t maps to TAB
\b maps to BACKSPACE
\f maps to FORMFEED
Finally, characters may be given as three octal digits
after a backslash (for example, \123), and the characters
^ (caret) and \ (backslash) may be given as \^ and \\
respectively.
If it is necessary to place a : in a capability it must be
escaped in octal as \072.
If it is necessary to place a NUL character in a string
capability it must be encoded as \200. (The routines that
deal with termcap use C strings and strip the high bits of
the output very late, so that a \200 comes out as a \000
would.)
--
"Oh, well. Not everybody can be as goodlooking as me. It's a curse."
- Linus Torvalds
More information about the plug
mailing list