Path: utzoo!attcan!uunet!van-bc!ubc-cs!cheddar.ucs.ubc.ca!panon From: panon@cheddar.ucs.ubc.ca (Paul-Andre Panon) Newsgroups: comp.unix.wizards Subject: Re: salary/job survey Summary: strange Termcap behaviour Keywords: Curses. Really. Message-ID: <8484@ubc-cs.UUCP> Date: 29 Jun 90 08:37:27 GMT Sender: news@cs.ubc.ca Reply-To: panon@cheddar.ucs.ubc.ca (Paul-Andre Panon) Distribution: na Organization: UBC Computing Centre, Vancouver, B.C., Canada Lines: 35 When trying to track down some curious behaviour with Screen v2.0a and vt100 terminals, a friend and I narrowed the problem down to strange behaviour by the termcap facility as it is called from the ansi.c module. With the following TERMCAP entry (split up for your benefit): setenv TERMCAP 'd0|vt100|vt100-am|vt100am:co#80:li#24:do=^J:cl=50\E[;H\E[2J: sf=5\ED:le=^H:bs:am:cm=5\E[%i%d;%dH:nd=2\E[C:up=2\E[A:ce=3\E[K:cd=50\E[J: so=2\E[7m:se=2\E[m:us=2\E[4m:ue=2\E[m:md=2\E[1m:mr=2\E[7m:mb=2\E[5m:me=2\E[m: is=\E[1;24r\E[24;1H:rf=/usr/lib/tabset/vt100: rs=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:ks=\E[?1h\E=:ke=\E[?1l\E>:ku=\EOA:kd=\EOB: kr=\EOC:kl=\EOD:kb=^H:ho=\E[H:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:pt:sr=5\EM:vt#3: xn:sc=\E7:rc=\E8:cs=\E[%i%d;%dr:'; tgetnum("co") and tgetnum("li") return 79 and 23 respectively. when the TERMCAP entry is modified to contain ... :co#79:li#23: ... tgetnum() returns the expected values of 79 and 23 for columns and rows. i.e. When the termcap entry gives a value of 80 by 24, those values somehow get 1 subtracted from them by the time you can retrieve them through tgetnum(). Could somebody shed a little light on how to tell when you have a 79x23 or an 80x24 screen (other than by duplicating the function of tgetenv() and friends)? Is this a feature? and, if so, pray tell, what are its origins? This is while working with BSD termcap on both an Apollo DN3500 running Domain/OS and a Sun3/2xx(?) running SunOS v4.0.1_Export. Paul-Andre -- Paul-Andre_Panon@staff.ucs.ubc.ca or USERPAP1@UBCMTSG or Paul-Andre_Panon@undergrad.cs.ubc.ca or USERPAP1@mtsg.ubc.ca Looking for a .signature? "We've already got one. It is ver-ry ni-sce!"