[comp.sys.att] Curses, terminfo and termcap followups

thad@cup.portal.com (Thad P Floryan) (11/05/90)

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@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]

flinton@eagle.wesleyan.edu (11/06/90)

In article <35620@cup.portal.com>, thad@cup.portal.com (Thad P Floryan) writes:
> 
> Guy's comment: "... and I was under the impression that A/UX, even as of 2.0,
> 	was S5R2-based.  
> 
> 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.
> 
Just today I attended a half-day A/UX product showing in Stamford (CT) at
which Apple designers on the A/UX and IIfx teams pitched their product and
answered questions.  One of those answers: A/UX is a hybrid of SVR2.2 with
addenda from SVR3.* and from 4.2BSD and from 4.3BSD and from Sun-NFS and 
then some.  That's A/UX 2.0, beta version in use at this showing.  No mention
of how later versions of A/UX may differ once they appear.  Bourne, Korn, and
C shells all included (but no mention of  bash ).

Take this with a large grain of salt -- after all, what do I know?

-- Fred  <flinton@eagle.Wesleyan.EDU>  or  <fejlinton@{att|mci}mail.com>

wtm@uhura.neoucom.EDU (Bill Mayhew) (11/08/90)

If A/UX has Ssytem V r3.x stuff in it, it is pretty well hidden.
If one opts for a Sys V file system, one gets the old r2 style.
The default is the BSD fast file system.

I have A/UX 2.0 running on a Mac II cx here.  Pretty neat stuff.
There are still a couple of minor bugs in it, but overall farily
impressive.  What is neat is that floppy disks are automatically
mounted be they A/UX or Mac style.  Another neat aspect is that
most Mac applications can live in the Unix file system.  Used this
way, a lot of the security related problems one faces with
Appleshare may be addressed.  Also neat is that tcp/ip and
appletalk can coexist.  A sl/ip driver is also standard with the
system, but I'm still working on setting up something on the other
end to test that with.  The 2.0 release has also fixed problems
with the compilers; especially f77.

One thing I don't like is that the uucp is the ancient yucky
version 2.0.  No HDB yet.  One hardware aspect I don't like about
Macs is the dang wimpy serial port.  You only get TxD, RxD and two
control lines.  You can't have HFC and modem control at the same
time.  I could almost love my Mac if it had been endowed with at
least one real serial port.  Apple makes a big deal about being the
connectivity people in their A/UX seminars; a real serial port
would bring this to fruition.  They are pushing A/UX for user's
that won't necessarily have appletalk or tcp/ip nearby (like at
home, for instance), so real modem support should be mandatory.

One thing that I can say is that Apple really is serious about
their support of A/UX.  The tech support 800 number has always been
courteous without the usual telephone voice mail tree.  The first
person you get is the person you deal with, and that person is
capable of answering most questions.  Apple has also been good
about returning calls and answering email.  Its nice to see a
company willing to answer its own phone for a change, instead of
pointing a finger at an all too often ill-informed dealer.

According to what I've been told, A/UX 2.0.1 should be out in
approximately January 1991.  That will add support of the various
new machines and fix up a few known problems.  Our Apple office in
Cleveland mentioned that they expect to get an internal beta of
2.0.1 shortly.  Maybe they'll listen to Thad and put infocmp in
the next release; it sure could use it.

==Bill==
-- 
Bill Mayhew      NEOUCOM Computer Services Department
Rootstown, OH  44272-9995  USA    phone: 216-325-2511
wtm@uhura.neoucom.edu   ....!uunet!aablue!neoucom!wtm
via internet: (140.220.001.001)

thad@cup.portal.com (Thad P Floryan) (11/08/90)

Regarding all the renewed interest in curses, termcap and terminfo, I have
just received some email referencing a just-published new book that sounds
like "just the ticket".  Here's the info as sent to me:

	UNIX CURSES EXPLAINED, B. Goodheart
	(Prentice-Hall, 1991, ISBN 0 13 931957 3)

Thad

Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]

thad@cup.portal.com (Thad P Floryan) (11/08/90)

Yet another book reference regarding "curses" arrived via email:

	... Marc Rochkind's "Advanced C Programming for Displays"
	which contains timing comparisons of the old and new curses.

Thad

Thad Floryan [ thad@cup.portal.com (OR) ..!sun!portal!cup.portal.com!thad ]