bernsten@phoenix.Princeton.EDU (Dan Bernstein) (02/26/89)
I am using Yterm 2.1 on an IBM dumb terminal (PS/2 50, to be precise) to connect to phoenix, a VAX 8700 running Ultrix 2.0. I've been working on adding capabilities to the ibmpc (yterm) terminal type. Yterm acts rather like a vt100 but not the same. What follows is a bit termcap heavy. The restore and save cursor commands are \E7 and \E8, as on a vt100; there is no stack. The change scrolling region is \E[%i%d;%dr. cs changes the scrolling region correctly but also homes the cursor within that scrolling region. I don't know if this is the same on the vt100. vi uses cs if possible but doesn't expect it to move the cursor. In an attempt to save the definition, I added \E7 and \E8 around it to leave the cursor at the same spot. This almost works; except that vi also uses rc and sc if they are available and doesn't understand that cs interferes with them. This problem comes up when deleting many lines at once, e.g., half the screen. I can make vi happy by removing rc and sc; vi knows where it wants to put the cursor and doesn't really need rc/sc. Using cs certainly makes vi faster, and removing rc/sc doesn't slow it down. Unfortunately, I have other programs (e.g., a sysline improvement) that don't know where the cursor is and must use rc/sc. So: Is the behavior of \E[%i%d;%dr the same as a vt100? Is there a better cs for Yterm that does not move the cursor and does not interfere with \E7 and \E8? Can I make vi understand that cs interferes with \E7 and \E8? Does the 4.3 BSD termcap help? Any other useful comments? In case anyone cares, here's my current ibmpc definition (split into lines for your reading convenience). yt|yterm13|YTERM13|ibmpc:ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:so=2\E[1m: se=2\E[0m:us=2\E[4m:ue=2\E[0m:ts=\E7^^\0408:ds=^]:es:fs=\E8:cr=^M:do=^J: nl=^J:bl=^G:am:le=^H:bs:cd=^K:ce=^]:cl=^L:cm=^^%r%+\040%+\040:co#80: ho=^Y:kh=^Y:li#24:nd=^\:up=^_:xn:ma=^\\040^_^P^YH:ta=^I:rc=\E8:sc=\E7: k0=\E0:k1=\E1:k2=\E2:k3=\E3:k4=\E4:k5=\E5:k6=\E6:k7=\E7:k8=\E8:k9=\E9: vs=:is=\E7\E[1;24r\E8\E>\E[?1l\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h: rs=\E7\E[1;24r\E8\E>\E[?1l\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h: hs:sf=2^J:sr=5\EM:cs=\E7\E[%i%d;%dr\E8:if=/usr/lib/tabset/vt100: mb=\E[5m:me=\E[m:mr=\E[7m:sg=0:ug=0: ---Dan Bernstein, bernsten@phoenix.princeton.edu