[net.unix-wizards] 4025 Termcap, games, etc.

mark.umcp-cs@UDel-Relay@sri-unix (09/01/82)

From:     Mark Weiser <mark.umcp-cs@UDel-Relay>
Date:     26 Aug 82 3:25:10-EDT (Thu)
The following is forwarded from our Tek 4025 expert:

The following is the 'usual' termcap entry for vi and so forth.
It does not give you cursor motion; vi ends up faking it by moving
the cursor a little at a time.  It works OK for vi, but is rather slow.
As a note, we have set our 'command character' to <escape>; it is generally
convenient to do so.  However, doing so would be incompatible with vi, so
this script temporarily changes the command character to ^_ (code 037).
It gets fixed and unfixed in the appropriate ways when you ^Z and % back and
forth between programs.

X5|4025|4027|4024|tek4025|tek4027|tek4024|tektronix 4024/4025/402:\
:is=\r\Esto 9,17,25,33,41,49,57,65,73\r:\
:ks=^_lea p4 /h/\r^_lea p8 /k/\r^_lea p6 / /\r^_lea p2 /j/\r^_lea f5 /H/\r:\
:ke=^_lea p2\r^_lea p4\r^_lea p6\r^_lea p8\r^_lea f5\r:\
:am:bs:da:db:pt:li#34:co#80:cl=^_era\r\n\n:up=^K:nd=^_rig\r:\
:al=145^_up\r^_ili\r:dl=^_dli\r:\
:dc=^_dch\r:im=^_ich\r:ei=^F\n^K:nl=^F\n:\

	:cd=^_dli 50\r:CC=^_:ti=\Ecom 31\r:te=^_com 27\r:

X7|4025-17|4027-17|tek 4025 17 line window:li#17:tc=4025:
X8|4025-17ws|4027-17ws|tek 4025 17 line window in workspace:\
:is=\41com 31\r\n^_sto 9,17,25,33,41,49,57,65,73\r^_wor 17\r^_mon 17\r:\
	:ti=\Ecom 31\r^_wor h\r:te=^_mon h^_com 27\r:so=^_att e\r:\
	:se=^_att s\r:tc=4025-17:
Xe|4025ex|4027ex|tek 4025 w/!:ti=\41com 31\r:te=^_com 33\r:\

	:is=^_com 33\r\n\41sto 9,17,25,33,41,49,57,65,73\r:tc=4025:

Because the above termcap entry doesn't have cursor motion, many games 
and other programs won't work properly.  I have kludged a way around it.  
First, include the following in your .login or .cshrc:

if (`printenv TERM` == "4025") then
	alias kludge source kludge.scr
	alias unkludge source unkludge.scr
endif

Then, create the following three files:

kludge.scr:

setenv TERM kl
setenv TERMCAP kludgetermcap
echo "^[wor 30 h"
echo "^[com 31"

unkludge.scr:

setenv TERM 4025
setenv TERMCAP /etc/termcap
echo "^_com 27"
echo "^[mon 34"

kludgetermcap:

#Kludge for Tektronix
kl|kludge|kludge 4025:\
	:is=\037wor 30 h\r:\
	:bs:cd=\037dch80\037dli30\r:co#80:li#30:\
	:ho=\037jum1,1\r:\
	:cl=\037era\r:\
	:nd=\037rig\r:up=\037up\r:\
	:cm=\037jum%i%d,%d\r:\
	:us=\037att u\r:\
	:ue=\037att s\r:

This has two disadvantages.  First, you don't get a cursor; as we all
know, (GRRR) when the keyboard talks to the host, there is no cursor in
the workspace.  Second, it doesn't quite do standout and underline mode right;
as we all know, (GRRRRRRRR) changing the text attributes screws up everything
to the end of the screen or the next attribute code.   However, with this
stuff, you can successfully play most of the games on the system, and
'ul' and 'more' work reasonably well.  Hope all this stuff is useful.
						-craig stanfill-