Subject: Re: termcap file violates spec
To: None <current-users@NetBSD.ORG, rhialto@polder.ubc.kun.nl>
From: Olaf Seibert <rhialto@polder.ubc.kun.nl>
List: current-users
Date: 12/13/1996 15:28:39
Earlier I wrote:
> I have seen some programs break due to this: nn 6.5.0 (compiled for
> NetBSD 1.0), when TERM=ansi, complains "TERMCAP entry for ansi has no
> 'cm' capability". AFAIK, nn just uses standard termcap library functions
> to access the termcap database. The same happens with lynx 2.6 (for
> 1.0). The same happens with screen-3.7.2 compiled for 1.2, and I know
> for certain that it just uses standard tgetent() calls.

Some further experiments (a small test program) revealed that the
termcap library produces the expanded entry for "ansi", but truncated to
1024 characters. Unfortunately, pretty important strings like cm (cursor
motion) are lost this way. I still consider this to be a bug.

And there are strange entries like ..sa= and ..rp=.

ansi|ansi/pc-term compatible with color:	:u6=\E[%i%d;%dR:u7=\E[6n:..u8=\E[?%[;0123456789]c:	:u9=\E[c:	:Co#8:NC#3:pa#64:	:AB=\E[4%p1%dm:AF=\E[3%p1%dm:Sb=\E[%+(m:Sf=\E[%+^^m:	:op=\E[37;40m:	:ac=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\054\021+^P0\333p\304r\304y\363z\362{\343|\330}\234:	:ae=\E[10m:as=\E[11m:	:S2=\E[11m:S3=\E[10m:ae=\E[10m:as=\E[11m:mb=\E[5m:	:md=\E[1m:me=\E[0;10m:mk=\E[8m:mr=\E[7m:	:..sa=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m:	:se=\E[m:so=\E[7m:ue=\E[m:us=\E[4m:	:5i:	:AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:	:LE=\E[%dD:RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:	:cb=\E[1K:ch=\E[%i%dG:ct=\E[2g:cv=\E[%i%dd:ec=\E[%dX:	:ei=:im=:kB=\E[Z:kI=\E[L:kb=^H:kd=\E[B:kl=\E[D:	:kr=\E[C:ku=\E[A:nw=\r\E[S:pf=\E[4i:po=\E[5i:	:..rp=%p1%c\E[%p2%{1}%-%db:s0=\E(B:s1=\E)B:s2=\E*B:	:s3=\E+B:ta=\E[I:	:am:bs:mi:ms:	:co#80:it#8:li#24:	:al=\E[L:bl=^!
G:bt=\E[Z:cd=\E[J:ce=\E[K:cl=\E[

Problems also remain of course for programs that parse the termcap file
by themselves.

-Olaf.
--
___ Olaf 'Rhialto' Seibert      D787B44DFC896063 4CBB95A5BD1DAA96 
\X/ Don't dream it, Be it               rhialto@polder.ubc.kun.nl