76 lines
3.9 KiB
Plaintext
76 lines
3.9 KiB
Plaintext
Mytinfo is Public Domain and comes with no guarantees.
|
|
By Ross Ridge (ross@zooid.guild.org).
|
|
|
|
Mytinfo is a single library that combines the functionality of the
|
|
standard Unix termcap and terminfo libraries. It has the special
|
|
ability of being able to fetch terminal descriptions from both
|
|
termcap and terminfo databases regardless of which set of functions,
|
|
termcap or terminfo, are used. It can even read terminal descriptions
|
|
from terminfo source files.
|
|
|
|
You should be able to compile this library on almost all versions of Unix.
|
|
Much of it's development was done on '386 Xenix, but I've sucessfuly built
|
|
mytinfo under BSD 4.3, HP-UX 2.1 (System III), SunOS 3.5, and Amix
|
|
(System V R4). There hasn't been a large amount of testing of the support
|
|
programmes that come with the library, but the library itself has been in
|
|
use on a couple of public access Unix sites for over two years. It has
|
|
successfully linked and run with many programmes such as rn, vi and nethack.
|
|
|
|
Included in the package is tconv, an "all-in-one" programme that will
|
|
compile terminfo sources to binary format and also translate termcap to
|
|
either terminfo source or binary. tic and cap2info are just links
|
|
to the tconv programme. I've also written replacement for tset,
|
|
that uses the mytinfo library, in case tset doesn't come with your
|
|
system or if you aren't too pleased with the one that did. Since this
|
|
is the newest part of the package it probably still has a few bugs.
|
|
You'll also find tput, as well two versions of clear, one that uses
|
|
termcap and the other that uses terminfo.
|
|
|
|
The environment variables TERMCAP and TERMINFO can have multiple
|
|
filenames separated by a space, a feature not in terminfo and not in
|
|
most termcaps. This is very handy for users that maintain their own
|
|
private databases, as they don't have to have a copy the entire
|
|
database. Eg:
|
|
TERMCAP="$HOME/.termcap /etc/termcap"
|
|
TERMINFO="$HOME/terminfo /usr/lib/terminfo"
|
|
export TERMCAP TERMINFO
|
|
The library will also check compiled-in default locations for terminal
|
|
descriptions. Like most termcaps, the TERMCAP variable can also
|
|
contain the complete termcap terminal description, usually supplied
|
|
from tset at login. The TERMINFO variable can also contain a complete
|
|
terminfo description, but there is no programme like tset to supply it.
|
|
|
|
Unlike termcap, this library can only use capabilities that it knows about.
|
|
However it does knows about all the standard ones, and you can easily
|
|
add your own to it's list. Included in the list are all terminfo
|
|
capabilities to Release 4 of System V, obsolete termcap capabilities, a
|
|
few caps used from the University of Waterloo (UW), a couple from GNU Emacs,
|
|
and a few I made up myself. Two extensions to the standard termcap % codes
|
|
are supported, GNU's %a, %m, %b, and %f, and UW's %-, %a, and %s.
|
|
|
|
Termcap and terminfo source descriptions can be mixed in one file, but
|
|
because of this termcap databases must be in a certain style. All
|
|
continuation lines of a termcap entry must be indented from the left
|
|
margin by white space. This shouldn't be a problem with most sites
|
|
since this is the style that most termcap files are distributed, but local
|
|
additions may not adhere to this style. Another possible problem is
|
|
that termcap entries should end with a colon (:), but in most
|
|
distributed termcaps there are entries that don't. If a one line
|
|
termcap entry doesn't end with a colon, it will be ignored. A quick
|
|
way to find these is "tconv -c /etc/termcap > /dev/null".
|
|
|
|
See the file INSTALL for instructions on configuring and installing
|
|
this library. The file README.doc lists the functions supported by the
|
|
library, and gives short description of the tconv programme. tconv.1 is
|
|
a simple man page for tconv. terminfo.src contains a few sample
|
|
terminal descriptions in terminfo source format. TODO is a list of
|
|
possible enhancements too the library, your comments and additions
|
|
are welcome.
|
|
|
|
Please let me know of any bugs you find, as well as any ideas you have
|
|
for improvement.
|
|
|
|
Ross Ridge
|
|
|
|
ross@zooid.guild.org
|