vi and terminfo

mark at cbhydra.uucp mark at cbhydra.uucp
Wed Jul 11 02:05:14 AEST 1984


The version of curses/terminfo I have here (and the one distributed
with System V Release 2) is upward compatible with termcap at the
termlib level.  That is, if you have a program that calls tgetent,
tgetflag, tgoto, tputs, and so forth, instead of
	cc foo.c -ltermcap
you can type
	cc foo.c -lcurses
and the program will work, using the terminfo database.  (Since it
brings in the emulation package and the low level terminfo code,
it will be a few K bigger than the termcap version.  However, it
will probably start up faster since terminfo is compiled and there
is no quadratic behavior on long descriptions as there is in termcap.)

I tried it out by loading vi version 3.7 this way.  It worked with
no source modifications (although the attempt by vi to build the string
"xx|unknown:co#80:bs:am" or some such thing if $TERM isn't set won't
work.)  I did not use this version extensively.

I can't speak for whatever version of vi you have at wucs or the terminfo
code distributed by CCA (which I believe is a different implementation)
but I would guess that a floating exception means division by zero, which
might mean that it thinks you have zero columns on your terminal.

vi versions 3.8 and later use terminfo directly, not in emulation mode.

	Mark Horton



More information about the Comp.unix.wizards mailing list