Curses, terminfo and termcap followups
Thad P Floryan
thad at cup.portal.com
Mon Nov 5 17:28:53 AEST 1990
I recently posted material describing (briefly) how to update the terminfo
and termcap databases on certain SV-like systems to realize performance and
capability improvements. An email comment by {auspex!guy (Guy Harris)} piqued
my interest and curiousity, so additional research seemed in order. If you're
"into" curses, termcap and terminfo, you may find the following interesting.
Guy's comment: "... and I was under the impression that A/UX, even as of 2.0,
was S5R2-based. S5R2 *did* have "tic", although it was completely
redone for S5R3 (AT&T took the version from Pavel Curtis's publicly-
available "curses" and whacked on it)."
True. "uname -a" on A/UX 2.0 shows it to be "svr2"; the A/UX 2.0.1 upgrade due
next year will comprise bug fixes, the 1988 ksh, and other enhancements. Info
from other sources indicates that A/UX 2.0 is a hybrid SVR2/4.2BSD with many
enhancements by Unisoft and Apple supporting networking, NFS (or RFS?), etc.
My prior experience with what I "assumed" to be SVR2 was the 3B1/UNIXPC/PC7300;
the evidence, however, shows it (the 3B1) to have received many features from
SVR3 esp. if one has the Ethernet, StarLAN, and other extra-cost enhancements.
The SVR3 terminfo and curses (and tic, infocmp, captoinfo, ksh, etc.)
accompanies the 3B1 gratis with (at least) the 3B1's 3.51 System Release.
Referencing the "AT&T UNIX System V Release 4.0 Migration Guide for System V
Developers" (Comcode 350-306), page 2-18, shows that "tic" is a standard
product since SVR2; page 2-16 shows "infocmp" to first appear in SVR3.0 On
page 2-23 we find that curses' color support appears first in SVR3.2
Referencing the O'Reilly & Associates "termcap & terminfo" (Sep. 1990 edition)
on page 13, we find this excerpt:
`` On most systems, terminfo is supplied only in compiled form. In
order to display the contents of a terminfo entry, you must use a
program called infocmp. This program is available with System V,
Release 3, but not on all previous System V releases or System V-
derived systems. This can put you in quite a pickle if you want to
work with terminfo.
Fortunately, source for infocmp is available for a minimal cost ($50,
or $250 for sub-licensing rights) from the AT&T Toolchest. Call
1-201-522-6900 and login as "guest" (there is no password) to browse
through the Toolchest.
While you're at it, consider another useful program distributed with
System V Release 3 but not with earlier releases. The captoinfo
program converts entries from termcap to terminfo; it is described in
Chapter 6 [of this book]. Source is available from the Toolchest for
$250. Both programs were written by Tony Hansen of AT&T.
''
I just picked up that book ("termcap & terminfo") today from Computer Literacy
in San Jose, and highly recommend it.
I also examined the O'Reilly "Programming with curses" but found it didn't
meet my requirements as it focused solely on the BSD implementation; it would
be fine for A/UX and other BSD variants.
The material describing terminfo(4) in "UNIX System V Release 3.2 Programmer's
Reference Manual", and in Chapter 10 "curses/terminfo" of the "UNIX System V
Release 3.2 Programmer's Guide (Vol. II)" appears to me to be the definitive
reference on the subject for SVR3 on up. I just typed in the sample programs
and they worked fine on both my 3B1 and on a SVR3.2 system; they didn't quite
work as expected under A/UX 2.0 (lack of terminfo capabilities is the reason).
Browsing the Internet, I also found on uunet.uu.net and on ucbvax.berkeley.edu
the sources for the 4.3BSD "Tahoe" curses. This is the code described by the
O'Reilly "Programming with curses" book.
And, finally, to the person who posted the following:
We recently had a need to rebuild the binary for a curses based
program (sc as it happens), and found that the recompiled version
performed a lot worse than the old one. Specifically scrolling
degenerated to full screen updates that were slow even at 9600 baud.
This is with the generic vt100 terminfo entry.
A little investigation showed that the behavior was completely
determined by which libcurses.a we linked against. We got the slow
scroll with the 2.1, 3.1, and 3.2 versions of the library, but fast
scroll with 3.0. The "versions" I'm describing are the System V
release the library came with, not the internal library version (so
3.2 means System V R 3.2).
Anyone know anything about this? The tests were done on a system (3B2)
where we had all the releases mentioned, but we need to move the
program to a system that only has 3.2.
Do I understand you to be rebooting the same system with different kernel
versions? Are you SURE you referenced the correct library(ies) and terminfo
database after each boot (and "ld" of your program)? You should have NO
problem on a "pure" SVR3.2 system as I just proved to myself. It is possible,
though, that your VT100 terminfo entries (for whatever reason) don't specify
all of which the terminal is capable. And, as a hint (unless you're using a
"real" VT100 with the 8080A CPU), specify "DT80" as the terminal type instead
of VT100 ... the DT80 entry doesn't send all the fills and delays which are
required for a real VT100.
Thad Floryan [ thad at cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]
More information about the Comp.unix.questions
mailing list