STN Termcap.sh program

Bill Campbell bill at celestial.com
Wed Apr 29 13:51:10 PDT 2009


On Wed, Apr 29, 2009, Jean-Pierre A. Radley wrote:
>Bruce Easton propounded (on Wed, Apr 29, 2009 at 01:21:55PM -0400):
>| Bill Campbell wrote Wednesday,
>| 
>| Bill - our book says this program will "take the code [termcap]
>| apart, and display it in readable form."  Looks like it asks 
>| for the name of the termcap file and a terminal type and then 
>| outputs a list with entries like:
>| 
>| G1  ^A\277   Graphics - Upper-right
>| G2  ^A\332   Graphics - Upper-left
>| 
>|  . . . . .
>|
>| I sent Doug the program and lib | files.
>| 
>
>If you're handing it out for free, why not post it publicly, for example in
>the filePro subdirectory of ftp.jpr.com?

The routines I've written are designed to get termcap entries, remove extra
whitespace, and some other manipulations that are useful when dealing with
the 1024 termcap length limits.

Writing a python or perl script to display the information above is pretty
easy, if a bit tedious, as it primarily requires building a dictionary
(perl hash) mapping termcap entries to the English description.  This is
compilicated a bit with FilePro and SCO termcaps as they tend to have
entries that are not in the standard (whatever that means) termcap
documentation.  Most of these extra codes go back to Xenix, MultiPlan, and
other Microsoft or SCO extensions.

Modern curses applications use terminfo, not termcap, but I like termcap
for things like printer code definitions, largely because one can define
non-standard entries without having to extend the terminfo definitions.

Bill
-- 
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

We maintain that the very foundation of our way of life is what we call
free enterprise, said Cash McCall, but when one of our citizens
show enough free enterprise to pile up a little of that profit, we do
our best to make him feel that he ought to be ashamed of himself.
    -- Cameron Hawley


More information about the Filepro-list mailing list