[net.info-terms] terminfo/termcap conversion programs available

hansen@pegasus.UUCP (Tony L. Hansen) (11/26/85)

< Subject: Re: Sysline on a vt100
< ...
< Here's the standard terminfo for both flavors of status line on vt100.
< You can easily translate this into termcap if you like.

Now available within the AT&T UNIX System Toolchest are two tools which make
such translations easy: infocmp and captoinfo. Both tools will be included
with System Vr3.

Among many other options, "infocmp -C" will attempt to convert a terminfo
entry into a termcap entry.  Some of the other things that infocmp can do
are to compare terminfo binaries and dump them out in source format.

Captoinfo, of course, turns termcap entries into terminfo entries. It is
very complete in its translation, even handling the ko and ma strings. It
will also point out many errors found in the termcap source.

The cost for these tools is very low. To contact the Toolchest, call up
1-201-522-6900 and login as "guest", no password.

					Tony Hansen
					ihnp4!pegasus!hansen

jsdy@hadron.UUCP (Joseph S. D. Yao) (11/30/85)

System V as delivered has a large compiled data-base of terminfo
descriptors, and a very small set of sources.  This is a problem
if one is trying to modify a descriptor for which one does not
have source.  A TermInfo Compiler ('tic') was also deliverd with
the system.  It was fairly straightforward to write a decompiler
for the terminfo descriptors.  I called it 'untic' (I refuse to
call it 'cit', and anyway C. Itoh might object. ;-)), and intend
to post it to net.sources as soon as I can get it across our
high-bandwidth magnetic tape from the System V machine.
-- 

	Joe Yao		hadron!jsdy@seismo.{CSS.GOV,ARPA,UUCP}

gnu@l5.uucp (John Gilmore) (12/05/85)

In article <2657@pegasus.UUCP>, hansen@pegasus.UUCP (Tony L. Hansen) writes:
> Now available within the AT&T UNIX System Toolchest are two tools which make
> such translations easy: infocmp and captoinfo. Both tools will be included
> with System Vr3...
> Captoinfo, of course, turns termcap entries into terminfo entries. It is
> very complete in its translation, even handling the ko and ma strings. It
> will also point out many errors found in the termcap source.
> 
> The cost for these tools is very low...

No wonder; it's public domain.  I'll send it to you if you send me
mail (but check your local net.sources archive first!), or with
sufficient demand will check with Robert Viduya, the author, for a
more recent version, then post to mod.sources.

From: robert@gitpyr.UUCP (Robert Viduya)
Newsgroups: net.sources
Subject: termcap to terminfo translator
Message-ID: <83@gitpyr.UUCP>
Date: 30 Jan 85 20:42:01 GMT
Organization: Georgia Tech, Atlanta

The following is a program that converts termcap database files to terminfo
source files.  It reads the termcap file from standard input and writes the
terminfo source to standard output.  I tried to be as complete as possible,
but I wasn't able to implement some things due to ambiguous documentation.
The unimplemented parts are in the %-escapes.  I wasn't sure about some
of the more exotic termcap %-escapes like '%B'.  However, things like '%c',
'%d', '%2d' and '%+' are implemented.

hansen@pegasus.UUCP (Tony L. Hansen) (12/13/85)

Recently I posted a note about two programs named captoinfo and infocmp
being available within the AT&T UNIX System Toolchest. Since then a couple
of followup notes have been posted that I would like to reply to.

<From: jsdy@hadron.UUCP (Joseph S. D. Yao)
<
<   It was fairly straightforward to write a decompiler
< for the terminfo descriptors.  I called it 'untic' (I refuse to
< call it 'cit', and anyway C. Itoh might object. ;-)), and intend
< to post it to net.sources as soon as I can get it across our
< high-bandwidth magnetic tape from the System V machine.

The "infocmp" program provides this functionality, plus much more. In
addition to decompiling the binary, it will also print it out in "C
variable" form and in >>> TERMCAP <<< form (with conversions!). It also
provides the capabilities to compare binaries and rewrite entries using the
use= capability.

If all you need is a decompiler, get Joseph Yao's untic tool. If you need
these other capabilities, I recommend the infocmp tool.

< <From: gnu@l5.uucp (John Gilmore)
< No wonder; it's public domain.  I'll send it to you if you send me
< mail (but check your local net.sources archive first!), or with
< sufficient demand will check with Robert Viduya, the author, for a
< more recent version, then post to mod.sources.
< 
< >From: robert@gitpyr.UUCP (Robert Viduya)
< Newsgroups: net.sources
< Subject: termcap to terminfo translator
< Message-ID: <83@gitpyr.UUCP>
< Date: 30 Jan 85 20:42:01 GMT
< Organization: Georgia Tech, Atlanta
< 
< The following is a program that converts termcap database files to terminfo
< source files.  It reads the termcap file from standard input and writes the
< terminfo source to standard output.  I tried to be as complete as possible,
< but I wasn't able to implement some things due to ambiguous documentation.
< The unimplemented parts are in the %-escapes.  I wasn't sure about some
< of the more exotic termcap %-escapes like '%B'.  However, things like '%c',
< '%d', '%2d' and '%+' are implemented.

The captoinfo program within the toolchest has NO relationship to the public
domain captoinfo program other than the name and similar functionality. It
came out internally BEFORE Robert's captoinfo had been written, explaining
the conflict of names.

The AT&T captoinfo provides more capabilities than Robert's. For instance,
it does properly convert things like %B, %n, %D, ko=, ma=, etc. (There is no
%2d in termcap, by the way. It is %2.) It also points out numerous errors
within the termcap source. It even has a version of termcap.c with fewer
bugs in it that the one within 4.xBSD.

The AT&T captoinfo program will be available as part of UNIX System Vr3. I
think it should have been offered free to the public since it really should
have been available in UNIX System Vr2. Either that or sent out free as part
of a maintenance release to all Vr2 licences. (Maintenance release? What's
that?)

I'm sure Robert's program does a fine job, within the limitations mentioned
by him. Since I have never used it, I cannot comment further on it.

					Tony Hansen
					ihnp4!pegasus!hansen