Curses based programs have to get information about the terminal
they are running on; they have to know for example what characters
are necessary to print in order to move up the cursor a line, or
to clear the screen, or to erase a line, to display bold or reversed
characters and so on.

Two different concepts exist to fulfill these needs.  Most MiNT
systems will have the termcap database installed.  A program can
extract all necessary informations (i.e. terminal capabilities) from
the (human-readable) file /etc/termcap.  The termcap mechanism is
considered obsolete nowadays since it suffers from various deficiencies.

A more efficient approach is the terminfo mechanism.  Instead of
one huge description file (/etc/termcap tends to be very large)
the information is structured in a directory tree.  Instead of
human readable ASCII-files (which have to be interpreted by the
program first) the descriptions are put into a compiled binary
form.

Example:  You use TOSWIN as your terminal emulator.  Most versions
of TOSWIN will set the environment variable $TERM to `tw52'.  A
termcap based program will search through /etc/termcap until it
finds an entry for `tw52'.  Then it will extract the information
and will convert it internally into some binary representation.

A terminfo program will (roughly) look for the directories
/usr/local/lib/terminfo or /usr/lib/terminfo.  If it finds for
example /usr/local/lib/terminfo it will then look for a file
/usr/local/lib/terminfo/t/tw52 that contains the required information
already in a converted, binary form.  This procedure performs
much quicker than the termcap mechanism.

Furthermore the terminfo database offers much more capabilities
which weren't available when using the termcap stuff (e.g. color,
mouse support, ...)

But what will happen if the program can't find the terminfo database
in the standard places?  I've configured my ncurses library in a way
that offers a fallback mechanism for older systems without the
terminfo database.  If the program can't find the terminfo database
it will scan /etc/termcap instead, will extract the information from
there, compile it and will then build a mini terminfo database in
your home directory.  If your home directory is /home/myname you
will find the result in /home/myname/.terminfo (note the dot, the
directory will be hidden).  The next time you start the program
it will find this mini database and won't have to redo all that 
stuff.

Now for the problem:  The program scans the entire file /etc/termcap
and this will take some time.  To tell you the truth it probably
won't take some seconds but rather some minutes depending on the
size.  Furthermore it will come across a lot of errors and will 
report these errors.

Please be patient during this process.  As long as the error messages
don't apply to a terminal you use (which is very likely) you can
completely ignore all errors and warnings.

Good news:  The process will be necessary only once for each user.
The next time you start the program it will accept the terminfo
database in your home directory without any complaints and you
don't have to wait at all at program startup.  And if you see
how comfortable the program's user interface is you will understand
that it was worth waiting.

If you want to speed up things for all users at once do the following.
Start the program once and wait until the terminfo database is built.
Now copy the directory `.terminfo' from your home directory to
a directory `terminfo' (without dot) in /usr/local/lib.  Every
user can access this database.  This will save both time and disk space.

If you think that you haven't understood all this:  Simply start the
program, go away have a cup of coffee and a cigarette and then
forget about the whole thing for ever.  You will never be reminded
to it again.

If you have TOSWIN _and_ a color monitor with at least 8 colors you
should now read the file README.color.  Otherwise proceed with
README.smail.

Guido Flohr
-- 
http://stud.uni-sb.de/~gufl0000/
mailto:gufl0000@stud.uni-sb.de
