InfoWorld

December 11, 1989

Termcaps, Terminfo Frustrate Managers

SCO Works on Single Superset of Termcaps

by Martin Marshall

There may be a unification movement going on at the operating system level, but
Termcaps and Terminfo still frustrate Unix system installers and system
administrators with the splintered terminal needs of applications software.

There may be some hope for improvement, however, coming separately next year
from both AT&T and The Santa Cruz Operation (SCO).

Both Termcaps and Terminfo are terminal capabilities tables.  These are files
that tell an application the meaning of each individual keystroke coming from a
terminal on a network or multiuser system.  A given network or system may have
numerous different terminals attached, each of which has a different
capabilities lookup table in Termcaps.

"There are Termcaps scattered through every new product directory in the
systems I service, and a different one is used by every different application,"
said Cliff Fiedler, owner of Campus Computers Inc.  of Nashville, Tennessee. 
"When I see an application that's just not coming up at all or it's doing very
flaky things, I usually find that it's pointing to the wrong Termcaps."

When a new type of terminal is added to the system, the Termcaps of every
application that that terminal will use must be checked to make sure that it
works with that terminal, and updated if it does not.  If it draws upon
applications from across a network, those applications on the remote host must
be checked too.

The splintering up Termcaps is a fact of life that VARs and system
administrators learn to live with, according to Neal Nelson, president of Neal
Nelson & Associates in Chicago.  "I have a number of complaints about both
Termcaps and Terminfo, but they are still vastly superior to being tied into
proprietary systems like Datapoint and VT-terminal-type systems", he said.

Nelson's primary complains is that both Termcaps and Terminfo were developed to
meet the needs of vi editors in the academic environment, and fall short of the
needs of the commercial environment.  "Academic systems often have a crazy
quilt of different terminal types, but they focus on Vi editing needs.  They
should have checked with the applications developers of spreadsheets, word
processors, databases and other commercial packages when they were creating
Termcaps," he said.

After Termcap files were developed, they were extended differently by nearly
every commercial applications developer.  The extensions were inconsistent,
with the same function being implemented by different key codes on different
Termcaps, and the same key code being used to mean two different things by two
different programs.

AT&T stepped into the picture three years ago, commissioning the University of
California, Berkeley to develop Terminfo, thinking that everyone could
standardize upon it.

"The problem was, they froze the wrong Terminfo," Nelson said.  "By locking
Terminfo into academia, they locked out Terminfo for us commercial developers. 
They've standardized upon an inadequate tool."

When it works with the existing hardware, Terminfo is preferable to Termcaps,
according to Nelson.  Terminfo runs in a compiled version, which helps it run
slightly faster than Termcaps, which runs in source form.

The trouble is Terminfo doesn't accommodate the Wyse 50/60 and Televideo
910/925 families of terminals which are among the most popular terminals used
by VARs.  "For example, highlighting, reverse video and blinking are all
separate keys on the VT100 model used by Terminfo.  You combine them with two
keystrokes.  But on the Wyse terminals there are single keystrokes for the
combinations, and Terminfo does not recognize those keystrokes," Nelson said. 
In addition, Terminfo was set up to handle eight function keys, while todays's
advanced terminals have up to 24 function keys.

What Nelson and others have been advocating is a studied set of extensions to
Terminfo.

Sam Shteingart, a member of the technical staff at AT&T's Bell Labs responded
by listing some of the improvements to Terminfo that have been added with
successive releases of Unix System V.  Release 3.1, for example, boosted the
number of function keys allowed up to 64, while Release 3.2 added the
capability to use color in character-based terminals like the Tektronix
4100/4200 families and the HP 2397A.  Release 3.2 also added printer support
definitions to Terminfo, which involved a substantial rewrite of the LP
subsystem.

Release 4.0 added support for multiple byte character sets.  "This was useful
for international applications in multiple languages," Shteingart added.

The attribute combination problem can be overcome by mapping the escape
sequence for a combination highlight and blink, for example, onto a two-byte
string, Shteingart said.  "The Wyse 50/60 is supported in the current release."

A disassembler called Infocmp has been added to Terminfo that allows users to
tailor their versions.  "If you want to change something, you decompile it with
Infocmp, then make the changes just like you would in Termcaps, and then
recompile it with TIC [Terminfo Compiler]," Shteingart said.  Personalized
versions of Terminfo files can be directed to the user's home directory,
allowing experimentation without destroying the user's working copy of
Terminfo, he said.

SCO currently markets applications that use six different Termcaps, and is
aware that this can cause a problem.  "We're working on getting all of the
versions to use the same Termcaps, but we don't know exactly when [in 1990] it
will be ready," said Doug Michels, SCO cofounder.  "It will probably be
incremental, with each new version of an application conforming to an SCO
standard Termcaps," said Carl Koppel, SCO applications manager.

On dealer said that SCO may begin coming out with standardized Termcaps as
early as March.