lmc@denelcor.UUCP (Lyle McElhaney) (07/06/84)
I have been interested getting a definitive termcap set up for the vt100 terminal (ignore all variations for the moment; just 80 col vanilla, no Advanced Video vt100). I've cadged a number of possibilities from the net and have written a program to compare them. I'm anticipating a lot of termcap/ terminfo work in the near future, and so I'm going to present my vt100 termcap here, with comments, as a sort of sanity check and to get some questions answered. Please reply by mail; I'll summarize to the net. Generally, this is the longest vt100 termcap I've seen. This is so because I've put everything in it. In particular, the status-line implementation is included, along with variables for defining a set of line-drawing characters (I've used these in a version of the Rand Editor). Anyway, here it is. Criticisms invited. dj|vt100|vt100 with status line on size: 903 Long enough. -------------------- Bj=v * Bl=m * Br=j * Line-drawing stuff proposed by Cj=n * negaard@aerospace. Gs & Ge intro Ge=1^O * and end sequences, others are (in Gs=1^N * order): Bottom join, bottom left Hl=q * corner,bottom right, cross, horiz Lj=t * line, left join, right join, top Rj=u * join,top left, top right, vertical Tj=w * line, and other unique character. Tl=l * This implementation assumes the Tr=k * init setup below. Tr=k * Vl=x * Xc=\140 * ae=1^O as=1^N start alternate char set. See is below bl=1^G Shouldn't this default to ^G? bs cd=45\E[J ce=2\E[K cl=45\E[2J (non status-line) cl=50\E7\E[23;80H\E[1J\E8 Erase lines 1-23. cm=1\E[%i%d;%dH co#80 cr=1^M cs=1\E[%i%d;%dr do=30^J I will use the shorter form whenever possible. The long delay is used whereever a scroll is possible. ds= Can't disable status line. es= I've seen this as enable status line and as escapes safe in status line. What's it to be? fs=1\E8 ho=1\E[H Description says home cursor (if no CUP). Is it not used otherwise? hs if=/usr/lib/tabset/vt100 is=\E>\E[?1;3;4l\E[?7;8h\E[1;24r\E( (overridden by:) B\E)0 is=\E>\E[?1;3;4l\E[?7;8h\E[1;23r\E( init: set scroll region (set line 24 B\E)0 aside); select cursor key mode, jump scrolling, 80 col, wraparound on, auto repeat on, USASCII character set, and line-drawing chars in shifted set. Set scroll must follow option sets. k1=\EOP k2=\EOQ k3=\EOR k4=\EOS ks=1\E= Not sure what "keypad transmit" is; ke=1\E> used here to set keypad for function keys, rather than numeric keypad. kb=^H Is this default? kd=\E[B A lot of people say kd=\E0B, but kl=\E[D thats only in applications mode, kr=\E[C which I reset and leave reset. ku=\E[A l1=PF1 l2=PF2 l3=PF3 l4=PF4 le=1^H li#24 (overridden by:) li#23 23 lines, 24th is status line. ll=1\E[24H (overridden by:) ll=1\E[23H mb=1\E[5m md=1\E[1m me=1\E[m mr=1\E[7m ms nd=1\E[C nl=30^J pt rc=1\E8 rf=/usr/lib/tabset/vt100 rs=\E>\E[?1;3;4l\E[?7;8h\E[1;23r\E( Same reset as init. B\E)0 rs=\E>\E[?1;3;4l\E[?7;8h\E[1;24r\E( B\E)0 sc=1\E7 se=1\E[m sf=30\ED so=1\E[7m sr=30\EM ta=1^I is this defaulted? te=1\E> Used by the Rand editor. Would ks/ke ti=1\E= a more appropriate choice? ts=4\E7\E[24;H\E[1K ue=1\E[m up=1\E[A us=1\E[4m vt#3 Where does this come from? ws#80 Padding - I assumed 9600 baud, and used the advertized padding. Its quite different from the padding I've seen in the other termcaps; Is there some empirical evidence that it should be different? Note lack of am and xn; a fellow from NADC wrote this about that: The reason that VT100s and their clones do not work with automargins enabled is that, regardless of whether :xn: is specified or not, the cursor is still in column 80 when the software has presumed it has wrapped. Thus, the software may decide that the best way to get to column 1 a couple of lines down is to use line feeds rather than cursor motion; this puts the VT100 cursor several lines down, but still in column 80, and it has by then forgotten that it should be in column 1. Here at NADC we religiously shun auto margins on all VT100 like terminals. Instead, we let the :is=...: string set up the terminal with wraparound enabled (for general use), but do not specify :am: in termcap. This way, the software makes no incorrect assumptions. However, I still have a problem. I can send the following sequence to my vt100: start with y in first and last cols, row 6; x in first and last cols of other rows; \E[6;80Hx\E[7;80Hy\E[6;1Hx (ignoring padding characters) (put x in last col, row 6; put y in last col row 7; put x in first col, row 6) This results in all x's in col 80, and y's in col 7 and 8 of col 1. Do I have a bad crt, or can others do this too? Oh, well, enough allready. Send me comments. -- Lyle McElhaney (hao,brl-bmd,nbires,csu-cs,scgvaxd)!denelcor!lmc
mark@cbhydra.uucp (07/08/84)
I'm enclosing my current terminfo description for the vt100. I notice two significant problems with the one previously posted. (1) Your method of dealing with graphics characters is different from what AT&T is going with, (2) you put the status line on the bottom rather than on the top. (Most people, given a choice, prefer it on the top, also it doesn't get clobbered when you clear the screen.) I have no quarrel with your observations about automatic margins, but neither method seems to handle the vt100 right (outputting a char in col 80 sets a flag in the terminal, outputting a char elsewhere seems to be the only way to clear that flag.) Explanation of graphics characters. The vt100 is the definition, but only for those chars that are line drawing in nature. The acsc (alternate char set chars) lists pairs of chars, for aAbBcC, to get standard a you output A, to get b output B, etc. enacs must be output before sending anything out in the acs (once) to get the terminal in the mode. smacs/rmacs turn on and off the alternate char set (the one with graphics in it.) # Vanilla vt100 definitions. vt100|vt100-am|dec vt100, cr=^M, cud1=^J, ind=^J, bel=^G, cols#80, lines#24, it#8, clear=\E[H\E[2J$<50>, cub1=^H, am, cup=\E[%i%p1%d;%p2%dH$<5>, cuf1=\E[C$<2>, cuu1=\E[A$<2>, el=\E[K$<3>, ed=\E[J$<50>, cud=\E[%p1%dB, cuu=\E[%p1%dA, cub=\E[%p1%dD, cuf=\E[%p1%dC, smso=\E[7m$<2>, rmso=\E[m$<2>, smul=\E[4m$<2>, rmul=\E[m$<2>, bold=\E[1m$<2>, rev=\E[7m$<2>, blink=\E[5m$<2>, sgr0=\E[m$<2>, sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, smkx=\E[?1h\E=, rmkx=\E[?1l\E>, tbc=\E[3g, hts=\EH, home=\E[H, enacs=\E(0, smacs=^O, rmacs=^N, acsc=aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz||}}, kcuu1=\EOA, kcud1=\EOB, kcuf1=\EOC, kcub1=\EOD, kbs=^H, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, ht=^I, ri=\EM$<5>, vt#3, xenl, xon, sc=\E7, rc=\E8, csr=\E[%i%p1%d;%p2%dr, vt100-nam|vt100 w/no am, am@, xenl@, use=vt100-am, # Ordinary vt100 in 132 column ("wide") mode. vt100-w|vt100-w-am|dec vt100 132 cols (w/advanced video), cols#132, lines#24, rs2=\E>\E[?3h\E[?4l\E[?5l\E[?8h, use=vt100-am, vt100-w-nam|vt100-nam-w|dec vt100 132 cols (w/advanced video), cols#132, lines#24, rs2=\E>\E[?3h\E[?4l\E[?5l\E[?8h, vt@, use=vt100-nam, # vt100's with no advanced video. vt100-nav|vt100 without advanced video option, sgr@, smso=\E[7m , rmso=\E[m , xmc#1, smul@, rmul@, bold@, rev@, blink@, sgr0@, use=vt100, vt100-nav-w|vt100-w-nav|dec vt100 132 cols 14 lines (no advanced video option), lines#14, cols#132, use=vt100-nav, # vt100's with one of the 24 lines used as a status line. # We put the status line on the top. vt100-s|vt100-s-top|vt100-top-s|vt100 for use with sysline, lines#23, is2=\E7\E[2;24r\E8, clear=\E[2;1H\E[J$<50>, home=\E[2;1H, dsl=\E7\E[1;24r\E8, cup=\E[%i%p1%{1}%+%d;%p2%dH$<5>, csr=\E[%i%i%p1%d;%p2%dr, hs, eslok, tsl=\E7\E[1;%p1%dH\E[1K, fsl=\E8, use=vt100-am, # Status line at bottom. Clearing the screen will clobber status line. vt100-s-bot|vt100-bot-s|vt100 for use with sysline, lines#23, is2=\E[1;23r\E[23;1H, dsl=\E7\E[1;24r\E8, hs, eslok, tsl=\E7\E[24;%p1%dH\E[1K, fsl=\E8, use=vt100-am,
gwyn@brl-smoke.ARPA (Doug Gwyn ) (08/17/86)
Elsie!ado has correctly pointed out to me that my VT100 termcap entry should have the "ch" capability removed, since it doesn't work right for a motion to the first column. I hadn't noticed this before since our software would always use \r to do that. ch=\r\E[%dC WRONG; remove this capability