]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - misc/terminfo.src
ncurses 5.9 - patch 20120505
[ncurses.git] / misc / terminfo.src
index 738bdbb48ee2974cee02e76b785b70c553a2bcf6..dd36bef7694e1096380ec88795f278fec104a064 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.305 $
-#      $Date: 2007/06/10 13:33:54 $
+#      $Revision: 1.451 $
+#      $Date: 2012/05/05 22:33:58 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -317,6 +317,16 @@ vanilla|dumb tty,
        OTbs,
        bel=^G, cr=^M, cud1=^J, ind=^J,
 
+# This is almost the same as "dumb", but with no prespecified width.
+# DEL and ^C are hardcoded to act as kill characters.
+# ^D acts as a line break (just like newline).
+# It also interprets
+#      \033];xxx\007 
+# for compatibility with xterm -TD
+9term|Plan9 terminal emulator for X,
+       am,
+       OTnl=^J, bel=^G, cud1=^J,
+
 #### ANSI.SYS/ISO 6429/ECMA-48 Capabilities
 #
 # See the end-of-file comment for more on these.
@@ -330,7 +340,7 @@ ansi+local,
        cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
        cuu=\E[%p1%dA, use=ansi+local1,
 ansi+tabs,
-       cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[2g,
+       cbt=\E[Z, ht=^I, hts=\EH, tbc=\E[3g,
 ansi+inittabs,
        it#8, use=ansi+tabs,
 ansi+erase,
@@ -366,11 +376,19 @@ ansi+sgrdim|ansi graphic renditions; assuming terminal has dim; not bold,
        dim=\E[2m,
        sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p5%t2;%;%?%p7%t8;%;m,
        use=ansi+sgr, use=ansi+sgrso, use=ansi+sgrul,
-ansi+pp|ansi printer port,
-       mc0=\E[0i, mc4=\E[4i, mc5=\E[5i,
 ansi+csr|ansi scroll-region plus cursor save & restore,
        csr=\E[%i%p1%d;%p2%dr, rc=\E8, sc=\E7,
 
+# The normal (ANSI) flavor of "media copy" building block asserts that
+# characters sent to the printer do not echo on the screen. DEC terminals
+# can also be put into autoprinter mode, where each line is sent to the
+# printer as you move off that line, e.g., by a carriage return.
+ansi+pp|ansi printer port,
+       mc5i,
+       mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
+dec+pp|DEC autoprinter mode,
+       mc0=\E[i, mc4=\E[?4i, mc5=\E[?5i,
+
 # The IBM PC alternate character set.  Plug this into any Intel console entry.
 # We use \E[11m for rmacs rather than \E[12m so the <acsc> string can use the
 # ROM graphics for control characters such as the diamond, up- and down-arrow.
@@ -442,8 +460,9 @@ ecma+sgr|attribute capabilities for true ECMA-48 terminals,
 # For more detail on this rather pathetic standard, see the comments
 # near the end of this file.
 ibcs2|Intel Binary Compatibility Standard prescriptions,
-       cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cud=\E[%p1%dB,
-       cuf=\E[%p1%dC, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
+       cbt=\E[Z, clear=\Ec, cub=\E[%p1%dD, cub1=\E[1D,
+       cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C,
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A,
        dch=\E[%p1%dP, dispc=\E=%p1%dg, ech=\E[%p1%dX,
        hpa=\E[%i%p1%dG, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL,
        indn=\E[%p1%dS, rc=\E7, rin=\E[%p1%dT, rmam=\E[?7l, sc=\E7,
@@ -477,7 +496,7 @@ ansi-mini|any ansi terminal with pessimistic assumptions,
 # ansi-mtabs adds relative addressing and minimal tab support
 ansi-mtabs|any ansi terminal with pessimistic assumptions,
        it#8,
-       ht=^I, use=ansi+local1, use=ansi-mini,
+       ht=^I, use=ansi-mini, use=ansi+local1,
 
 # ANSI X3.64 from emory!mlhhh (Hugh Hansard) via BRL
 #
@@ -535,7 +554,7 @@ pcansi-m|pcansi-mono|ibm-pc terminal programs claiming to be ansi (mono mode),
        cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
        dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
        hts=\EH, il1=\E[L, ind=^J, kbs=^H, kcub1=\E[D, kcud1=\E[B,
-       kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[2g,
+       kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, tbc=\E[3g,
        use=klone+sgr-dumb,
 pcansi-25-m|pcansi25m|ibm-pc terminal programs with 25 lines (mono mode),
        lines#25, use=pcansi-m,
@@ -566,7 +585,7 @@ ansi-m|ansi-mono|ANSI X3.64-1979 terminal with ANSI.SYS compatible attributes,
        kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
        kich1=\E[L, mc4=\E[4i, mc5=\E[5i, nel=\r\E[S,
        rep=%p1%c\E[%p2%{1}%-%db, rin=\E[%p1%dT, s0ds=\E(B,
-       s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[2g,
+       s1ds=\E)B, s2ds=\E*B, s3ds=\E+B, tbc=\E[3g,
        vpa=\E[%i%p1%dd, use=pcansi-m,
 
 ansi+enq|ncurses extension for ANSI ENQ,
@@ -607,11 +626,45 @@ ansi.sys-old|ANSI.SYS under PC-DOS 2.1,
        clear=\E[2J, cub1=^H, cud1=\E[B, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, el=\E[k, home=\E[H,
        is2=\E[m\E[?7h, kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K,
-       khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s", rc=\E[u,
+       khome=^^, pfkey=\E[0;%p1%{58}%+%d;%p2"%s"p, rc=\E[u,
        rmam=\E[?7l, sc=\E[s, smam=\E[?7h, u6=\E[%i%d;%dR,
        u7=\E[6n, use=klone+color, use=klone+sgr8,
+
+# Keypad:      Home=\0G        Up=\0H  PrPag=\0I
+#              ka1,kh          kcuu1           kpp,ka3
+#
+#              Left=\0K        5=\0L           Right=\0M
+#              kcub1           kb2             kcuf1
+#
+#              End=\0O         Down=\0P        NxPag=\0Q
+#              kc1,kend        kcud1           kc3,knp
+#
+#              Ins=\0R         Del=\0S
+#              kich1           kdch1
+#
+# On keyboard with 12 function keys,
+#      shifted f-keys: F13-F24
+#      control f-keys: F25-F36
+#      alt f-keys:     F37-F48
+# The shift/control/alt keys do not modify each other, but alt overrides both,
+# and control overrides shift.
+#
+# <pfkey> capability for F1-F48 -TD
 ansi.sys|ANSI.SYS 3.1 and later versions,
-       el=\E[K, use=ansi.sys-old,
+       el=\E[K, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
+       kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
+       kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
+       kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
+       kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
+       kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
+       kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
+       kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
+       kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
+       kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
+       kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
+       kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
+       pfkey=\E[0;%?%p1%{11}%<%t%'\:'%e%?%p1%{13}%<%t%'z'%e%?%p1%{23}%<%t%'G'%e%?%p1%{25}%<%t%'p'%e%?%p1%'#'%<%t%'E'%e%?%p1%'%'%<%t%'f'%e%?%p1%'/'%<%t%'C'%e%{92}%;%;%;%;%;%;%;%p1%+%d;%p2"%s"p,
+       use=ansi.sys-old,
 
 #
 # Define IBM PC keypad keys for vi as per MS-Kermit while using ANSI.SYS.
@@ -645,7 +698,148 @@ nansi.sysk|nansisysk|PC-DOS Public Domain NANSI.SYS with keypad redefined for vi
        use=ansi.sysk,
 
 #### ANSI console types
+
+#
+# Atari ST terminals.
+# From Guido Flohr <gufl0000@stud.uni-sb.de>.
 #
+tw52|tw52-color|Toswin window manager with color,
+       bce,
+       colors#16, pairs#256,
+       oc=\Eb?\Ec0, op=\Eb?\Ec0,
+       setab=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+       setaf=\Eb%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+       setb=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+       setf=\Eb%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1%{48}%+%c,
+       use=tw52-m,
+tw52-m|Toswin window manager monochrome,
+       ul,
+       ma#999,
+       bold=\Eya, dch1=\Ea, dim=\EyB,
+       is2=\Ev\Eq\Ez_\Ee\Ei\Eb?\Ec0, rev=\EyP, rmso=\EzQ,
+       rmul=\EzH, rs2=\Ev\Eq\Ez_\Ee\Ei\Eb?\Ec0, sgr0=\Ez_,
+       smso=\EyQ, smul=\EyH, use=at-m,
+tt52|Atari TT medium and high resolution,
+       lines#30, use=at-color,
+st52-color|at-color|atari-color|atari_st-color|Atari ST with color,
+       bce,
+       colors#16, pairs#256,
+       is2=\Ev\Eq\Ee\Eb1\Ec0, rs2=\Ev\Eq\Ee\Eb1\Ec0,
+       setab=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+       setaf=\Eb%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+       setb=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+       setf=\Eb%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3}%=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1%{7}%=%t0%e%p1%{8}%=%t8%e%p1%{9}%=%t9%e%p1%{10}%=%t\:%e%p1%{11}%=%t;%e%p1%{12}%=%t<%e%p1%{13}%=%t=%e%p1%{14}%=%t6%e?,
+       use=st52,
+st52|st52-m|at|at-m|atari|atari-m|atari_st|atarist-m|Atari ST,
+       am, eo, mir, npc,
+       cols#80, it#8, lines#24,
+       bel=^G, civis=\Ef, clear=\EE, cnorm=\Ee, cr=^M, cub1=\ED,
+       cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
+       cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, el1=\Eo, home=\EH, ht=^I,
+       il1=\EL, ind=^J, is2=\Ev\Eq\Ee, kLFT=\Ed, kRIT=\Ec, kbs=^H,
+       kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kdch1=\177,
+       kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es,
+       kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EQ,
+       kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET, kf6=\EU, kf7=\EV, kf8=\EW,
+       kf9=\EX, khlp=\EH, khome=\EE, kich1=\EI, knp=\Eb, kpp=\Ea,
+       kund=\EK, nel=^M^J, rc=\Ek, rev=\Ep, ri=\EI, rmso=\Eq,
+       rs2=\Ev\Eq\Ee, sc=\Ej, sgr0=\Eq, smso=\Ep,
+tw100|toswin vt100 window mgr,
+       eo, mir, msgr, xon,
+       colors#8, cols#80, it#8, lines#24, pairs#64, vt#3,
+       acsc=++\,\,--..00II``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       bel=^G, blink=\E[5m, bold=\E[1m, civis=\Ef,
+       clear=\E[2J\E[H, cnorm=\Ee, cr=^M, csr=\E[%i%p1%d;%p2%dr,
+       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB,
+       cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH,
+       cuu=\E[%p1%dA, cuu1=\EA, dch1=\Ea, dim=\E[2m, dl=\E[%p1%dM,
+       dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I,
+       hts=\EH, ich=\E[%p1%d@, il1=\EL, ind=^J, is2=\E<\E)0, kbs=^H,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\177,
+       kf1=\EOP, kf10=\EOY, kf11=\Ep, kf12=\Eq, kf13=\Er, kf14=\Es,
+       kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew, kf19=\Ex, kf2=\EOQ,
+       kf20=\Ey, kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV,
+       kf8=\EOW, kf9=\EOX, khlp=\EH, khome=\E\EE, kich1=\EI,
+       knp=\Eb, kpp=\E\Ea, kund=\EK, ll=\E[24H, nel=\EE,
+       oc=\E[30;47m, op=\E[30;47m, rc=\E8, rev=\E[7m, ri=\EM,
+       rmacs=^O, rmcup=\E[?7h, rmir=\Ei, rmkx=\E[?1l\E>,
+       rmso=\E[m, rmul=\E[m,
+       rs1=\E<\E[20l\E[?3;6;9l\E[r\Eq\E(B\017\E)0\E>,
+       sc=\E7,
+       setb=\E[4%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%=%t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6'%=%t3%e7%;m,
+       setf=\E[3%p1%'0'%+%Pa%?%ga%'0'%=%t0%e%ga%'1'%=%t4%e%ga%'2'%=%t2%e%ga%'3'%=%t6%e%ga%'4'%=%t1%e%ga%'5'%=%t5%e%ga%'6'%=%t3%e7%;m,
+       sgr0=\E[m, smacs=^N, smcup=\E[?7l, smir=\Eh,
+       smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+# The entries for stv52 and stv52pc probably need a revision.
+stv52|MiNT virtual console,
+       am, msgr,
+       cols#80, it#8, lines#30,
+       bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE,
+       cnorm=\E. \Ee, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
+       cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.",
+       dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
+       ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
+       kcuu1=\EA, kdch1=\177, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq,
+       kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew,
+       kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET,
+       kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE,
+       kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>,
+       op=\Eb@\EcO, rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_,
+       rmso=\Eq, rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_,
+       smcup=\Ev\Ee\Ez_, smso=\Ep, smul=\EyH,
+stv52pc|MiNT virtual console with PC charset,
+       am, msgr,
+       cols#80, it#8, lines#30,
+       acsc=+\257\,\256-\^.v0\333I\374`\177a\260f\370g\361h\261j\331k\277l\332m\300n\305o\377p-q\304r-s_t+u+v+w+x\263y\363z\362{\343|\366}\234~\371,
+       bel=^G, blink=\Er, bold=\EyA, civis=\Ef, clear=\EE,
+       cnorm=\E. \Ee, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
+       cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E.",
+       dim=\Em, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
+       ind=\n$<2*/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
+       kcuu1=\EA, kdch1=\177, kf1=\EP, kf10=\EY, kf11=\Ep, kf12=\Eq,
+       kf13=\Er, kf14=\Es, kf15=\Et, kf16=\Eu, kf17=\Ev, kf18=\Ew,
+       kf19=\Ex, kf2=\EQ, kf20=\Ey, kf3=\ER, kf4=\ES, kf5=\ET,
+       kf6=\EU, kf7=\EV, kf8=\EW, kf9=\EX, khlp=\EH, khome=\EE,
+       kich1=\EI, knp=\Eb, kpp=\Ea, kund=\EK, nel=\r\n$<2*/>,
+       rev=\Ep, ri=\EI$<2*/>, rmcup=\Ev\E. \Ee\Ez_, rmso=\Eq,
+       rmul=\EzH, rs1=\Ez_\Eb@\EcA, sgr0=\Ez_, smcup=\Ev\Ee\Ez_,
+       smso=\Ep, smul=\EyH,
+
+#### Atari ST
+#
+
+# From: Simson L. Garfinkel <simsong@media-lab.mit.edu>
+atari-old|atari st,
+       OTbs, am,
+       cols#80, it#8, lines#25,
+       clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC,
+       cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM,
+       ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB,
+       kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep,
+# UniTerm terminal program for the Atari ST:  49-line VT220 emulation mode
+# From: Paul M. Aoki <aoki@ucbvax.berkeley.edu>
+uniterm|uniterm49|UniTerm VT220 emulator with 49 lines,
+       lines#49,
+       is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H,
+       use=vt220,
+# MiNT VT52 emulation. 80 columns, 25 rows.
+# MiNT is Now TOS, the operating system which comes with all Ataris now
+# (mainly Atari Falcon). This termcap is for the VT52 emulation you get
+# under tcsh/zsh/bash/sh/ksh/ash/csh when you run MiNT in `console' mode
+# From: Per Persson <pp@gnu.ai.mit.edu>, 27 Feb 1996
+st52-old|Atari ST with VT52 emulation,
+       am, km,
+       cols#80, lines#25,
+       bel=^G, civis=\Ef, clear=\EH\EJ, cnorm=\Ee, cr=^M, cub1=\ED,
+       cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
+       cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
+       ind=^J, ka1=\E#7, ka3=\E#5, kb2=\E#9, kbs=^H, kc1=\E#1,
+       kc3=\E#3, kclr=\E#7, kcub1=\E#K, kcud1=\E#P, kcuf1=\E#M,
+       kcuu1=\E#H, kf0=\E#D, kf1=\E#;, kf2=\E#<, kf3=\E#=, kf4=\E#>,
+       kf5=\E#?, kf6=\E#@, kf7=\E#A, kf8=\E#B, kf9=\E#C, khome=\E#G,
+       kil1=\E#R, kind=\E#2, kri=\E#8, lf0=f10, nel=^M^J, rc=\Ek,
+       ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq,
+       smcup=\Ee, smso=\Ep,
 
 #### BeOS
 #
@@ -702,13 +896,14 @@ beterm|BeOS Terminal,
 #
 linux-basic|linux console,
        am, bce, eo, mir, msgr, xenl, xon,
-       it#8, ncv#18,
+       it#8, ncv#18, U8#1,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        bel=^G, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr,
-       cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
-       cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
-       dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
-       el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H,
+       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J,
+       cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+       cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
+       dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J,
+       el=\E[K, el1=\E[1K, flash=\E[?5h\E[?5l$<200/>, home=\E[H,
        hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
        il=\E[%p1%dL, il1=\E[L, ind=^J, kb2=\E[G, kbs=\177,
        kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
@@ -720,7 +915,7 @@ linux-basic|linux console,
        khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
        kspd=^Z, nel=^M^J, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l,
        rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R, sc=\E7,
-       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
+       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;11%;m,
        smam=\E[?7h, smir=\E[4h, smul=\E[4m, tbc=\E[3g,
        vpa=\E[%i%p1%dd, use=vt102+enq, use=klone+sgr,
        use=ecma+color,
@@ -736,21 +931,49 @@ linux-m|Linux console no color,
 # 1.9.9.
 linux-c-nc|linux console with color-change,
        ccc,
-       initc=\E]P%p1%x%p2%{256}%*%{1000}%/%02x%p3%{256}%*%{1000}%/%02x%p4%{256}%*%{1000}%/%02x,
+       initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
        oc=\E]R, use=linux-basic,
 # From: Dennis Henriksen <opus@osrl.dk>, 9 July 1996
 linux-c|linux console 1.3.6+ for older ncurses,
        ccc,
-       initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p3%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p4%{256}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;,
+       initc=\E]P%?%p1%{9}%>%t%p1%{10}%-%'a'%+%c%e%p1%d%;%p2%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p3%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%p4%{255}%*%{1000}%/%Pr%gr%{16}%/%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;%gr%{15}%&%Px%?%gx%{9}%>%t%gx%{10}%-%'a'%+%c%e%gx%d%;,
        oc=\E]R, use=linux-basic,
 
 # The 2.2.x kernels add a private mode that sets the cursor type; use that to
 # get a block cursor for cvvis.
 # reported by Frank Heckenbach <frank@g-n-u.de>.
-linux|linux console,
+linux2.2|linux 2.2.x console,
        civis=\E[?25l\E[?1c, cnorm=\E[?25h\E[?0c,
        cvvis=\E[?25h\E[?8c, use=linux-c-nc,
 
+# Linux 2.6.x has a fix for SI/SO to work with UTF-8 encoding added here:
+#      http://lkml.indiana.edu/hypermail/linux/kernel/0602.2/0868.html
+# Using SI/SO has the drawback that it confuses screen.  SCS would work.
+# However, SCS is buggy (see comment in Debian #515609) -TD
+# Further, this breaks longstanding workarounds for Linux console's line
+# drawing (see Debian 665959) -TD
+linux2.6|linux 2.6.x console,
+       rmacs=^O,
+       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;m%?%p9%t\016%e\017%;,
+       sgr0=\E[m\017, smacs=^N, use=linux2.2,
+
+# The 3.0 kernel adds support for clearing scrollback buffer (capability E3).
+linux3.0|linux 3.0 kernels,
+       E3=\E[3;J, use=linux2.6,
+
+# This is Linux console for ncurses.
+linux|linux console,
+       use=linux2.2,
+
+# Subject: linux 2.6.26 vt back_color_erase
+# Changes to the Linux console driver broke bce model as reported in
+#      https://bugzilla.novell.com/show_bug.cgi?id=418613
+# apparently from
+#      http://lkml.org/lkml/2008/4/26/305
+#      http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/87f98338f0d636bb/aa96e8b86cee0d1e?lnk=st&q=#aa96e8b86cee0d1e
+linux2.6.26|linux console w/o bce,
+       bce@, use=linux2.6,
+
 # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
 linux-nic|linux with ich/ich1 suppressed for non-curses programs,
        ich@, ich1@, use=linux,
@@ -795,6 +1018,41 @@ kon|kon2|jfbterm|Kanji ON Linux console,
        initp@, kcbt@, oc@, op=\E[37;40m, rs1=\Ec, tsl=\E[?T,
        use=linux,
 
+# 16-color linux console entry; this works with a 256-character
+# console font but bright background colors turn into dim ones when
+# you use a 512-character console font. This uses bold for bright
+# foreground colors and blink for bright background colors.
+linux-16color|linux console with 16 colors,
+       colors#16, ncv#54, pairs#256,
+       setab=\E[4%p1%{8}%m%d%?%p1%{8}%>%t;5%e%p1%{8}%=%t;2%e;25%;m,
+       setaf=\E[3%p1%{8}%m%d%?%p1%{8}%>%t;1%e%p1%{8}%=%t;2%e;21%;m,
+       use=linux,
+
+# bterm (bogl 0.1.18)
+# Implementation is in bogl-term.c
+# Key capabilities from linux terminfo entry
+#
+# Notes:
+# bterm only supports acs using wide-characters, has case for these: qjxamlkut
+# bterm does not support sgr, since it only processes one parameter -TD
+bterm|bogl virtual terminal,
+       am, bce,
+       colors#8, cols#80, lines#24, pairs#64,
+       acsc=aajjkkllmmqqttuuxx, bold=\E[1m, civis=\E[?25l,
+       clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M, cub1=^H, cud1=^J,
+       cup=\E[%i%p1%d;%p2%dH, ed=\E[J, el=\E[K, home=\E[H, ind=^J,
+       kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~, kf1=\E[[A,
+       kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
+       kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
+       kf18=\E[32~, kf19=\E[33~, kf2=\E[[B, kf20=\E[34~,
+       kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
+       kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
+       kmous=\E[M, knp=\E[6~, kpp=\E[5~, kspd=^Z, nel=^M^J,
+       op=\E49;39m, rev=\E[7m, ri=\EM, rmacs=^O, rmso=\E[27m,
+       rmul=\E[24m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+       sgr0=\E[0m, smacs=^N, smso=\E[7m, smul=\E[4m,
+
 #### Mach
 #
 
@@ -820,6 +1078,24 @@ mach-color|Mach Console with ANSI color,
        dim=\E[2m, invis=\E[8m, op=\E[37;40m, rmso=\E[27m,
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=mach,
 
+# From: Samuel Thibault
+# Source: git://git.sv.gnu.org/hurd/gnumach.git
+# Files: i386/i386at/kd.c
+#
+# Added nel, hpa, sgr and removed rmacs, smacs based on source -TD
+mach-gnu|GNU Mach,
+       acsc=+>\,<-\^.v0\333`+a\261f\370g\361h\260i#j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
+       dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, ech=\E[%p1%dX,
+       el1=\E[1K, hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[@,
+       indn=\E[%p1%dS, invis=\E[8m, nel=\EE, rin=\E[%p1%dT,
+       sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m,
+       use=mach,
+
+mach-gnu-color|Mach Console with ANSI color,
+       colors#8, pairs#64,
+       op=\E[37;40m, rmso=\E[27m, setab=\E[4%p1%dm,
+       setaf=\E[3%p1%dm, use=mach-gnu,
+
 # From: Marcus Brinkmann
 # http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/hurd/hurd/console/
 #
@@ -850,7 +1126,7 @@ mach-color|Mach Console with ANSI color,
 hurd|The GNU Hurd console server,
        am, bce, bw, eo, km, mir, msgr, xon,
        colors#8, it#8, ncv#18, pairs#64,
-       acsc=++\,\,--..00ii``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\Ec, cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr,
        cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
@@ -919,7 +1195,7 @@ pmcons|pmconsole|PMAX console,
 scoansi-old|SCO Extended ANSI standard crt (5.0.5),
        OTbs, am, bce, eo, xon,
        colors#8, cols#80, it#8, lines#25, pairs#64,
-       acsc=-\230.\231\,.+/0[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3yszr{c}\034~\207,
+       acsc=+/\,.-\230.\2310[5566778899\:\:;;<<==>>FFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXX`\204a0fxgqh2jYk?lZm@nEqDtCu4vAwBx3yszr{c}\034~\207,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
        civis=\E[=14;12C, clear=\E[H\E[2J, cnorm=\E[=10;12C,
        cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
@@ -950,7 +1226,7 @@ scoansi-new|SCO Extended ANSI standard crt (5.0.6),
        civis=\E[=0c, cnorm=\E[=1c, csr=\E[%i%p1%d;%p2%dr,
        cvvis=\E[=2c, mgc=\E[=r, oc=\E[51m, op=\E[50m,
        rep=\E[%p1%d;%p2%db, rmm=\E[=11L,
-       sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m,
+       sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%e;10%;m,
        smgb=\E[=1;0m, smgbp=\E[=1;%i%p1%dm,
        smglp=\E[=2;%i%p1%dm, smgr=\E[=3;0m,
        smgrp=\E[=3;%i%p1%dm, smgt=\E[=0;0m,
@@ -986,7 +1262,7 @@ att6386|at386|386at|AT&T WGS 6386 console,
        sc=\E7,
        sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;12%e;10%;%?%p7%t;9%;m,
        sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m,
-       tbc=\E[2g, vpa=\E[%i%p1%dd, use=klone+color,
+       tbc=\E[3g, vpa=\E[%i%p1%dd, use=klone+color,
 # (pc6300plus: removed ":KM=/usr/lib/ua/kmap.s5:"; renamed BO/EE/CI/CV -- esr)
 pc6300plus|AT&T 6300 plus,
        OTbs, am, xon,
@@ -1354,7 +1630,7 @@ qnxt2|qnx 2.15 serial terminal,
 qansi-g|QNX ANSI,
        am, eslok, hs, xon,
        colors#8, cols#80, it#8, lines#25, ncv#19, pairs#64, wsl#80,
-       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~Oa,
+       acsc=Oa``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[2J\E[H, cnorm=\E[?25h\E[?12l, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D,
@@ -1397,7 +1673,7 @@ qansi-g|QNX ANSI,
        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
        sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;9%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smso=\E[7m,
-       smul=\E[4m, tbc=\E[2g,
+       smul=\E[4m, tbc=\E[3g,
        tsl=\E7\E1;24r\E[?6l\E[25;%i%p1%dH,
 #
 qansi|QNX ansi with console writes,
@@ -1416,6 +1692,56 @@ qansi-m|QNX ansi with mouse,
 qansi-w|QNX ansi for windows,
        xvpa, use=qansi-m,
 
+#### OpenBSD consoles
+#
+# From: Alexei Malinin <Alexei.Malinin@mail.ru>; October, 2011.
+#
+# The following terminal descriptions for the  AMD/Intel PC console
+# were prepared  based on information contained in  the OpenBSD-4.9
+# termtypes.master and wscons(4) & vga(4) manuals (2010, November).
+#
+# Added bce based on testing with tack -TD
+# Added several capabilities to pccon+base, reading wsemul_vt100_subr.c -TD
+# Changed kbs to DEL and removed keys that duplicate stty settings -TD
+#
+pccon+keys|OpenBSD PC keyboard keys,
+       kbs=\177, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+       kdch1=\E[3~, kend=\E[8~, kent=^M, kf1=\E[11~, kf10=\E[21~,
+       kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~,
+       kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
+       kf9=\E[20~, khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
+       krfr=^R,
+pccon+sgr+acs0|sgr and simple ASCII pseudographics for OpenBSD PC console,
+       acsc=+>\,<-\^.v0#`+a\:f\\h#i#j+k+l+m+n+o~p-q-r-s_t+u+v+w+x|y#z#{*|!}#~o,
+       sgr=\E[0%?%p1%p3%|%t;7%;m, sgr0=\E[m,
+pccon+sgr+acs|sgr and default ASCII pseudographics for OpenBSD PC console,
+       acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       enacs=\E)0$<5>, rmacs=\E(B$<5>,
+       sgr=\E[0%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<5>,
+       sgr0=\E[m\E(B$<5>, smacs=\E(0$<5>,
+pccon+colors|ANSI colors for OpenBSD PC console,
+       bce,
+       colors#8, pairs#64,
+       op=\E[m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+pccon+base|base capabilities for OpenBSD PC console,
+       am, km, mc5i, msgr, npc, nxon, xenl, xon,
+       cols#80, it#8, lines#24,
+       bel=^G, clear=\E[H\E[J, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch=\E[%p1%dP,
+       dch1=\E[P, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
+       el1=\E[1K, home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@,
+       il1=\E[L, ind=\ED, nel=\EE, rev=\E[7m, ri=\EM, rmam=\E[?7l,
+       rmso=\E[m, rs2=\Ec$<50>, smam=\E[?7h, smso=\E[7m,
+       tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n,
+pccon0-m|OpenBSD PC console without colors & with simple ASCII pseudographics,
+       use=pccon+base, use=pccon+sgr+acs0, use=pccon+keys,
+pccon0|OpenBSD PC console with simple ASCII pseudographics,
+       use=pccon0-m, use=pccon+colors,
+pccon-m|OpenBSD PC console without colors,
+       use=pccon+base, use=pccon+sgr+acs, use=pccon+keys,
+pccon|OpenBSD PC console,
+       use=pccon-m, use=pccon+colors,
+
 #### NetBSD consoles
 #
 # pcvt termcap database entries (corresponding to release 3.31)
@@ -1553,7 +1879,7 @@ x68k|x68k-ite|NetBSD/x68k ITE,
 ofcons|DNARD OpenFirmware console,
        bw,
        cols#80, lines#30,
-       bel=^G, blink=\2337;2m, bold=\2331m, clear=^L, cr=^M,
+       bel=^G, blink=\2335m, bold=\2331m, clear=^L, cr=^M,
        cub=\233%p1%dD, cub1=\233D, cud=\233%p1%dB, cud1=\233B,
        cuf=\233%p1%dC, cuf1=\233C, cup=\233%i%p1%d;%p2%dH,
        cuu=\233%p1%dA, cuu1=\233A, dch=\233%p1%dP, dch1=\233P,
@@ -1565,8 +1891,8 @@ ofcons|DNARD OpenFirmware console,
        kf4=\2330x, kf5=\2330t, kf6=\2330u, kf7=\2330q, kf8=\2330r,
        kf9=\2330p, knp=\233/, kpp=\233?, nel=^M^J, rev=\2337m,
        rmso=\2330m, rmul=\2330m,
-       sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
-       sgr0=\2330m,
+       sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t2%;%?%p7%t8%;%?%p1%p3%|%t;7%;m,
+       sgr0=\2330m, smso=\2337m, smul=\2334m,
 
 # NetBSD "wscons" emulator in vt220 mode.
 # This entry is based on the NetBSD termcap entry, correcting the ncv value.
@@ -1586,8 +1912,8 @@ wsvt25|NetBSD wscons in 25 line DEC VT220 mode,
        is2=\E[r\E[25;1H, kend=\E[8~, kf1=\E[11~, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~,
        kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
-       kf9=\E[20~, khome=\E[7~, op=\E[m, setab=\E[4%p1%dm,
-       setaf=\E[3%p1%dm, use=vt220,
+       kf9=\E[20~, khome=\E[7~, op=\E[m, rs1=\Ec,
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm, use=vt220,
 
 wsvt25m|NetBSD wscons in 25 line DEC VT220 mode with Meta,
        km, use=wsvt25,
@@ -1686,6 +2012,8 @@ cons25w|ansiw|ansi80x25-raw|freebsd console (25-line raw mode),
 cons25|ansis|ansi80x25|freebsd console (25-line ansi mode),
        acsc=-\030.^Y0\333`\004a\260f\370g\361h\261i\025j\331k\277l\332m\300n\305q\304t\303u\264v\301w\302x\263y\363z\362~\371,
        use=cons25w,
+cons25-debian|freebsd console with debian backspace (25-line ansi mode),
+       kbs=\177, kdch1=\E[3~, use=cons25,
 cons25-m|ansis-mono|ansi80x25-mono|freebsd console (25-line mono ansi mode),
        colors@, pairs@,
        bold@, dim@, op@, rmul=\E[m, setab@, setaf@,
@@ -1830,7 +2158,7 @@ bsdos-ppc|PowerPC BSD/OS Console,
 vt52|dec vt52,
        OTbs,
        cols#80, it#8, lines#24,
-       acsc=ffgghhompoqqss.k, bel=^G, clear=\EH\EJ, cr=^M,
+       acsc=+h.k0affggolpnqprrss, bel=^G, clear=\EH\EJ, cr=^M,
        cub1=\ED, cud1=\EB, cuf1=\EC,
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
        el=\EK, home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB,
@@ -2142,8 +2470,9 @@ vt132|DEC vt132,
 # with the key marked (ESC) on the vt220.  See vt220d for an alternate mapping.
 # PF1--PF4 are used as F1--F4.
 #
+# added msgr -TD
 vt220-old|vt200-old|DEC VT220 in vt100 emulation mode,
-       OTbs, OTpt, am, mir, xenl, xon,
+       OTbs, OTpt, am, mir, msgr, xenl, xon,
        cols#80, lines#24, vt#3,
        OTnl=^J,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
@@ -2170,7 +2499,7 @@ vt220-old|vt200-old|DEC VT220 in vt100 emulation mode,
 # changed rmacs/smacs from shift-in/shift-out to vt200-old's explicit G0/G1
 # designation to accommodate bug in pcvt -TD
 vt220|vt200|dec vt220,
-       OTbs, am, mc5i, mir, msgr, xenl, xon,
+       OTbs, am, mir, msgr, xenl, xon,
        cols#80, it#8, lines#24, vt#3,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M,
@@ -2189,13 +2518,13 @@ vt220|vt200|dec vt220,
        kf20=\E[34~, kf3=\EOR, kf4=\EOS, kf6=\E[17~, kf7=\E[18~,
        kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khlp=\E[28~,
        kich1=\E[2~, knp=\E[6~, kpp=\E[5~, krdo=\E[29~, kslt=\E[4~,
-       lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, mc0=\E[i, mc4=\E[4i,
-       mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m, ri=\EM,
-       rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmso=\E[27m,
-       rmul=\E[24m, rs1=\E[?3l, sc=\E7,
+       lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4, nel=\EE, rc=\E8, rev=\E[7m,
+       ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l,
+       rmso=\E[27m, rmul=\E[24m, rs1=\E[?3l, sc=\E7,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
        sgr0=\E[m\E(B, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h,
-       smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+       smso=\E[7m, smul=\E[4m, tbc=\E[3g, use=ansi+pp,
+       use=ansi+enq,
 vt220-w|vt200-w|DEC vt220 in wide mode,
        cols#132,
        rs3=\E[?3h, use=vt220,
@@ -2260,13 +2589,14 @@ vt220-nam|v200-nam|VT220 in vt100 mode with no auto margins,
 #
 # From: Alexander Latzko <latzko@marsenius.rutgers.edu>, 30 Dec 1996
 # (Added vt100 <rc>,<sc> to quiet a tic warning -- esr)
+# added msgr -TD
 vt200-js|vt220-js|dec vt200 series with jump scroll,
-       am,
+       am, msgr,
        cols#80,
        bel=^G, clear=\E[H\E[J, cr=^M, csr=\E[%i%p1%d;%p2%dr,
-       cub1=^H, cud1=^J, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
-       dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
-       il1=\E[L, ind=\ED,
+       cub1=^H, cud1=^J, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+       cuu1=\E[A, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H,
+       ht=^I, il1=\E[L, ind=\ED,
        is2=\E[61"p\E[H\E[?3l\E[?4l\E[?1l\E[?5l\E[?6l\E[?7h\E[?8h\E[?25h\E>\E[m,
        kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=^M\ED, rc=\E8,
@@ -2299,7 +2629,7 @@ vt320nam|v320n|DEC VT320 in vt100 emul. mode with NO AUTO WRAP mode,
 # From: Adam Thompson <athompso@pangea.ca> Sept 10 1995
 # (vt320: uncommented <fsl> --esr)
 vt320|vt300|dec vt320 7 bit terminal,
-       am, eslok, hs, mir, msgr, xenl,
+       am, hs, mir, msgr, xenl,
        cols#80, lines#24, wsl#80,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
@@ -2308,9 +2638,8 @@ vt320|vt300|dec vt320 7 bit terminal,
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
-       ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, fsl=\E[0$},
-       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL,
-       il1=\E[L, ind=\ED,
+       ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, home=\E[H, ht=^I,
+       hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\ED,
        is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r\E[24;1H,
        kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kdch1=\E[3~, kel=\E[4~, kf10=\E[21~, kf11=\E[23~,
@@ -2318,8 +2647,7 @@ vt320|vt300|dec vt320 7 bit terminal,
        kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
        kf20=\E[34~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
        kf9=\E[20~, khome=\E[1~, kich1=\E[2~, knp=\E[6~, knxt=^I,
-       kpp=\E[5~, kprv=\E[Z, kslt=\E[4~, mc0=\E[i, mc4=\E[?4i,
-       mc5=\E[?5i, nel=\EE, rc=\E8, rev=\E[7m,
+       kpp=\E[5~, kprv=\E[Z, kslt=\E[4~, nel=\EE, rc=\E8, rev=\E[7m,
        rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B,
        rmam=\E[?7l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[m,
        rmul=\E[m,
@@ -2328,7 +2656,7 @@ vt320|vt300|dec vt320 7 bit terminal,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
        sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
-       tsl=\E[1$}\E[H\E[K, use=vt220+keypad,
+       use=dec+pp, use=vt220+keypad, use=dec+sl, use=ansi+enq,
 vt320-nam|vt300-nam|dec vt320 7 bit terminal with no am to make SAS happy,
        am@,
        is2=\E>\E[?3l\E[?4l\E[?5l\E[?7l\E[?8h\E[1;24r\E[24;1H,
@@ -2438,33 +2766,38 @@ vt400|vt400-24|dec-vt400|dec vt400 24x80 column autowrap,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
        sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
-       tsl=\E[2$~\E[1$}\E[1;%dH,
+       tsl=\E[2$~\E[1$}\E[1;%dH, use=dec+sl,
 
 # (vt420: I removed <kf0>, it collided with <kf10>.  I also restored
 # a missing <sc> -- esr)
+# add msgr and other capabilities from vt220 -TD
 vt420|DEC VT420,
-       am, mir, xenl, xon,
-       cols#80, lines#24, vt#3,
+       am, mir, msgr, xenl, xon,
+       cols#80, it#8, lines#24, vt#3,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
-       bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>,
-       clear=\E[H\E[2J$<50>, cr=^M, csr=\E[%i%p1%d;%p2%dr,
-       cub1=^H, cud1=\E[B, cuf1=\E[C,
-       cup=\E[%i%p1%d;%p2%dH$<10>, cuu1=\E[A, dch1=\E[P,
-       dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, home=\E[H, ht=^I,
-       if=/usr/share/tabset/vt300, il1=\E[L, ind=\ED,
-       is2=\E[1;24r\E[24;1H, is3=\E[?67h\E[64;1"p, kbs=^H,
-       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
-       kdch1=\E[3~, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR,
-       kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~,
-       kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
-       kslt=\E[4~, rc=\E8, rev=\E[7m$<2>,
-       rf=/usr/share/tabset/vt300, ri=\EM, rmacs=\E(B$<4>,
-       rmam=\E[?7l, rmir=\E[4l, rmkx=\E>,
+       bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>, civis=\E[?25l,
+       clear=\E[H\E[2J$<50>, cnorm=\E[?25h, cr=^M,
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+       cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH$<10>, cuu=\E[%p1%dA, cuu1=\E[A,
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
+       ech=\E[%p1%dX, ed=\E[J$<50>, el=\E[K$<3>, el1=\E[1K,
+       enacs=\E)0, flash=\E[?5h$<200/>\E[?5l, home=\E[H, ht=^I,
+       hts=\EH, ich=\E[%p1%d@, if=/usr/share/tabset/vt300,
+       il=\E[%p1%dL, il1=\E[L, ind=\ED, is2=\E[1;24r\E[24;1H,
+       is3=\E[?67h\E[64;1"p, kbs=^H, kcub1=\E[D, kcud1=\E[B,
+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kf1=\EOP, kf10=\E[29~,
+       kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[17~, kf6=\E[18~,
+       kf7=\E[19~, kf8=\E[20~, kf9=\E[21~, kfnd=\E[1~,
+       kich1=\E[2~, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, nel=\EE,
+       rc=\E8, rev=\E[7m$<2>, rf=/usr/share/tabset/vt300,
+       ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l, rmkx=\E>,
        rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
-       rmso=\E[m, rmul=\E[m, rs3=\E[?67h\E[64;1"p, sc=\E7,
+       rmso=\E[27m, rmul=\E[24m, rs3=\E[?67h\E[64;1"p, sc=\E7,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
-       sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h,
-       smkx=\E=, smso=\E[7m, smul=\E[4m,
+       sgr0=\E[m\E(B$<2>, smacs=\E(0$<2>, smam=\E[?7h,
+       smir=\E[4h, smkx=\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+       use=ansi+pp, use=dec+sl, use=ansi+enq,
 
 # DEC VT220 and up support DECUDK (user-defined keys).  DECUDK (i.e., pfx)
 # takes two parameters, the key and the string.  Translating the key is
@@ -2538,8 +2871,9 @@ vt510pcdos|DEC VT510 w/PC for DOS Merge,
 # assigned to an unknown key, Set-Up may be entered by pressing
 # [F3] as the first key after power up, regardless of keyboard type.
 # (vt520: I added <rmam>/<smam> based on the init string, also <sc> -- esr)
+# added msgr -TD
 vt520|DEC VT520,
-       am, mir, xenl, xon,
+       am, mir, msgr, xenl, xon,
        cols#80, lines#24, vt#3,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>,
@@ -2561,34 +2895,11 @@ vt520|DEC VT520,
        rmso=\E[m, rmul=\E[m, rs3=\E[?67h\E[64;1"p, sc=\E7,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
        sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h,
-       smso=\E[7m, smul=\E[4m,
+       smso=\E[7m, smul=\E[4m, use=ansi+tabs, use=ansi+enq,
+       use=dec+sl,
 
-# (vt525: I added <rmam>/<smam> based on the init string;
-# removed <rmso>=\E[m, <rmul>=\E[m, added <sc> -- esr)
 vt525|DEC VT525,
-       am, mir, xenl, xon,
-       cols#80, lines#24, vt#3,
-       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
-       bel=^G, blink=\E[5m$<2>, bold=\E[1m$<2>,
-       clear=\E[H\E[2J$<50>, cr=^M, csr=\E[%i%p1%d;%p2%dr,
-       cub1=^H, cud1=\E[B, cuf1=\E[C,
-       cup=\E[%i%p1%d;%p2%dH$<10>, cuu1=\E[A, dch1=\E[P,
-       dl1=\E[M, ed=\E[J$<50>, el=\E[K$<3>, home=\E[H, ht=^I,
-       if=/usr/share/tabset/vt300, il1=\E[L, ind=\ED,
-       is2=\E[1;24r\E[24;1H, is3=\E[?67h\E[64;1"p, kbs=^H,
-       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
-       kdch1=\E[3~, kf1=\EOP, kf10=\E[29~, kf2=\EOQ, kf3=\EOR,
-       kf4=\EOS, kf5=\E[17~, kf6=\E[18~, kf7=\E[19~, kf8=\E[20~,
-       kf9=\E[21~, kfnd=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
-       kslt=\E[4~,
-       pfx=\EP1;1|%?%{16}%p1%>%t%{0}%e%{21}%p1%>%t%{1}%e%{25}%p1%>%t%{2}%e%{27}%p1%>%t%{3}%e%{30}%p1%>%t%{4}%e%{5}%;%p1%+%d/%p2%s\E\\,
-       rc=\E8, rev=\E[7m$<2>, rf=/usr/share/tabset/vt300,
-       ri=\EM, rmacs=\E(B$<4>, rmam=\E[?7l, rmir=\E[4l,
-       rmsc=\E[?0;0r\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
-       rmso=\E[m, rmul=\E[m, rs3=\E[?67h\E[64;1"p, sc=\E7,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
-       sgr0=\E[m$<2>, smacs=\E(0$<2>, smam=\E[?7h, smir=\E[4h,
-       smso=\E[7m, smul=\E[4m,
+       use=vt520,
 
 #### VT100 emulations
 #
@@ -2652,8 +2963,8 @@ crt|crt-vt220|CRT 2.3 emulating VT220,
 # the default behavior -TD
 
 putty|PuTTY terminal emulator,
-       am, bce, bw, ccc, hs, mir, msgr, xenl, xon,
-       colors#8, it#8, ncv#22, pairs#64,
+       am, bce, bw, ccc, mir, msgr, xenl, xon, XT,
+       colors#8, it#8, ncv#22, pairs#64, U8#1,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[H\E[J, cnorm=\E[?25h, cr=^M,
@@ -2662,20 +2973,19 @@ putty|PuTTY terminal emulator,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
        dch=\E[%p1%dP, dch1=\E[P,
        dispc=%?%p1%{8}%=%t\E%%G\342\227\230\E%%@%e%p1%{10}%=%t\E%%G\342\227\231\E%%@%e%p1%{12}%=%t\E%%G\342\231\0\E%%@%e%p1%{13}%=%t\E%%G\342\231\252\E%%@%e%p1%{14}%=%t\E%%G\342\231\253\E%%@%e%p1%{15}%=%t\E%%G\342\230\274\E%%@%e%p1%{27}%=%t\E%%G\342\206\220\E%%@%e%p1%{155}%=%t\E%%G\340\202\242\E%%@%e%p1%c%;,
-       dl=\E[%p1%dM, dl1=\E[M, dsl=\E]0;\007, ech=\E[%p1%dX,
-       ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E(B\E)0,
-       flash=\E[?5h\E[?5l, fsl=^G, home=\E[H, hpa=\E[%i%p1%dG,
-       ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
-       indn=\E[%p1%dS,
+       dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
+       el1=\E[1K, enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H,
+       hpa=\E[%i%p1%dG, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L,
+       ind=^J, indn=\E[%p1%dS,
        initc=\E]P%p1%x%p2%{255}%*%{1000}%/%02x%p3%{255}%*%{1000}%/%02x%p4%{255}%*%{1000}%/%02x,
        is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>\E]R,
-       kb2=\E[G, kbs=\177, kcan=^C, kcbt=\E[Z, kcub1=\E[D,
-       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
-       kend=\E[4~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
-       kf12=\E[24~, kf13=\E[25~, kf14=\E[26~, kf15=\E[28~,
-       kf16=\E[29~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
-       kf2=\E[12~, kf20=\E[34~, kf3=\E[13~, kf4=\E[14~,
-       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       kb2=\E[G, kbs=\177, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
+       kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kend=\E[4~,
+       kf1=\E[11~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
+       kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~,
+       kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\E[12~,
+       kf20=\E[34~, kf3=\E[13~, kf4=\E[14~, kf5=\E[15~,
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
        kspd=^Z, nel=^M^J, oc=\E]R, op=\E[39;49m, rc=\E8, rev=\E[7m,
        ri=\EM, rin=\E[%p1%dT, rmacs=^O, rmam=\E[?7l,
@@ -2687,12 +2997,13 @@ putty|PuTTY terminal emulator,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smcup=\E[?47h,
        smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m,
-       tbc=\E[3g, tsl=\E]0;, vpa=\E[%i%p1%dd, use=vt102+enq,
+       tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt102+enq, use=xterm+sl,
 vt100-putty|Reset PuTTY to pure vt100,
        rs2=\E<\E["p\Ec\E[?3l\E]R\E[40"p\E[61"p\E[50;1;2"p,
        use=vt100,
+# palette is hardcoded...
 putty-256color|PuTTY 0.58 with xterm 256-colors,
-       use=xterm+256color, use=putty,
+       initc@, use=xterm+256color, use=putty,
 
 # One of the keyboard selections is "VT100+".
 # pterm (the X11 port) uses shifted F1-F10 as F11-F20
@@ -2701,6 +3012,28 @@ putty-vt100|VT100+ keyboard layout,
        kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW,
        kf9=\EOX, use=putty,
 
+# Unlike xterm-sco, this leaves kmous ambiguous with kf1.
+#
+# Use modifiers to obtain function keys past 12:
+# F1-F12 - normal
+# F13-F24 - shift
+# F25-F36 - control/alt
+# F37-F48 - control/shift
+#
+putty-sco|putty with SCO function keys,
+       kbeg=\E[E, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+       kdch1=\177, kend=\E[F, kf1=\E[M, kf10=\E[V, kf11=\E[W,
+       kf12=\E[X, kf13=\E[Y, kf14=\E[Z, kf15=\E[a, kf16=\E[b,
+       kf17=\E[c, kf18=\E[d, kf19=\E[e, kf2=\E[N, kf20=\E[f,
+       kf21=\E[g, kf22=\E[h, kf23=\E[i, kf24=\E[j, kf25=\E[k,
+       kf26=\E[l, kf27=\E[m, kf28=\E[n, kf29=\E[o, kf3=\E[O,
+       kf30=\E[p, kf31=\E[q, kf32=\E[r, kf33=\E[s, kf34=\E[t,
+       kf35=\E[u, kf36=\E[v, kf37=\E[w, kf38=\E[x, kf39=\E[y,
+       kf4=\E[P, kf40=\E[z, kf41=\E[@, kf42=\E[[, kf43=\E[\\,
+       kf44=\E[], kf45=\E[\^, kf46=\E[_, kf47=\E[`, kf48=\E[{,
+       kf5=\E[Q, kf6=\E[R, kf7=\E[S, kf8=\E[T, kf9=\E[U, khome=\E[H,
+       kich1=\E[L, knp=\E[G, kpp=\E[I, use=putty,
+
 # This entry is for Tera Term Pro version 2.3, for MS-Windows 95/NT written by
 # T. Teranishi dated Mar 10, 1998.  It is a free software terminal emulator
 # (communication program) which supports:
@@ -2740,7 +3073,7 @@ putty-vt100|VT100+ keyboard layout,
 # retrieving the window title, and for setting the window size (i.e., using
 # "resize -s"), though it does not pass SIGWINCH to the application if the
 # user resizes the window with the mouse.
-teraterm|Tera Term Pro,
+teraterm2.3|Tera Term Pro,
        km, xon@,
        ncv#43, vt@,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
@@ -2760,6 +3093,28 @@ teraterm|Tera Term Pro,
        smul=\E[4m, vpa=\E[%i%p1%dd, use=vt100+enq,
        use=klone+color, use=vt100,
 
+# Version 4.59 has regular vt100 line-drawing (so it is no longer necessary
+# to choose a Windows OEM font).
+#
+# Testing with tack:
+#      - it does not have xenl (suppress that)
+#      - underline seems to work with color (modify ncv).
+# Testing with vttest:
+#      - wrapping differs from vt100 (menu 1).
+#      - it recognizes xterm's X10 and normal mouse tracking, but none of the
+#        other flavors.
+#      - it recognizes the dtterm window controls for reporting size in
+#        characters and pixels.
+#      - it passes SIGWINCH.
+teraterm4.59|Tera Term Pro,
+       bce, xenl@,
+       ncv#41,
+       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       kmous=\E[M, use=teraterm2.3,
+
+teraterm|Tera Term,
+       use=teraterm4.59,
+
 # Tested with WinNT 4.0, the telnet application assumes the screensize is
 # 25x80.  This entry uses the 'Terminal' font, to get line-drawing characters.
 #
@@ -2822,14 +3177,19 @@ ms-vt100+|vt100+|windows XP vt100+ (sic),
 ms-vt-utf8|vt-utf8|UTF-8 flavor of vt100+,
        use=ms-vt100+,
 
+# expect-5.44.1.15/example/tkterm
 # a minimal subset of a vt100 (compare with "news-unk).
+#
+# The missing "=" in smkx is not a typo (here), but an error in tkterm.
 tt|tkterm|Don Libes' tk text widget terminal emulator,
-       clear=\E[H\E[J, cr=^M, cuf1=\E[C, cup=\E[%p1%d;%p2%dH,
-       cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
-       kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, rmso=\E[m,
+       clear=\E[H\E[J, cr=^M, cub1=^H, cud1=^J, cuf1=\E[C,
+       cup=\E[%p1%d;%p2%dH, cuu1=\E[A, ind=^J, kf1=\EOP, kf2=\EOQ,
+       kf3=\EOR, kf4=\EOS, kf5=\EOT, kf6=\EOU, kf7=\EOV, kf8=\EOW,
+       kf9=\EOX, rmkx=\E[?1l\E>, rmso=\E[m, smkx=\E[?1h\E,
        smso=\E[7m,
 
-#### X terminal emulators
+######## X TERMINAL EMULATORS
+#### XTERM
 #
 # You can add the following line to your .Xdefaults to change the terminal type
 # set by the xterms you start up to my-xterm:
@@ -2921,7 +3281,7 @@ xterm-r6|xterm-old|xterm X11R6 version,
 # This is the base xterm entry for the xterm supplied with XFree86 3.2 & up.
 # The name has been changed and some aliases have been removed.
 xterm-xf86-v32|xterm terminal emulator (XFree86 3.2 Window System),
-       OTbs, am, bce, km, mir, msgr, xenl,
+       OTbs, am, bce, km, mir, msgr, xenl, XT,
        cols#80, it#8, lines#24, ncv@,
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
@@ -2965,13 +3325,13 @@ xterm-xf86-v33|xterm terminal emulator (XFree86 3.3 Window System),
 # xterm to use terminfo-based descriptions with the titeInhibit resource.
 # -- the distribution contained incorrect khome/kend values -TD
 xterm-xf86-v333|xterm terminal emulator (XFree86 3.3.3 Window System),
-       mc5i,
        blink=\E[5m, ich1@, invis=\E[8m,
        is2=\E[!p\E[?3;4l\E[4l\E>, kdch1=\E[3~, kfnd@, kslt@,
-       mc0=\E[i, mc4=\E[4i, mc5=\E[5i, rmcup=\E[?1047l\E[?1048l,
-       rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>,
+       rmcup=\E[?1047l\E[?1048l, rs1=\Ec,
+       rs2=\E[!p\E[?3;4l\E[4l\E>,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
-       smcup=\E[?1048h\E[?1047h, use=xterm-xf86-v33,
+       smcup=\E[?1048h\E[?1047h, use=ansi+pp,
+       use=xterm-xf86-v33,
 
 # This version was released in XFree86 4.0.
 xterm-xf86-v40|xterm terminal emulator (XFree86 4.0 Window System),
@@ -3006,21 +3366,20 @@ xterm-xf86-v44|xterm terminal emulator (XFree86 4.4 Window System),
        cnorm=\E[?12l\E[?25h, cvvis=\E[?12;25h, indn=\E[%p1%dS,
        rin=\E[%p1%dT, use=xterm-xf86-v43,
 
-# This is the most common alias for xterm-new.
 xterm-xfree86|xterm terminal emulator (XFree86),
-       use=xterm-new,
-#      use=xterm-old,
+       use=xterm-xf86-v44,
 
 # This version reflects the current xterm features.
 xterm-new|modern xterm terminal emulator,
        npc,
-       indn=\E[%p1%dS, kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H,
-       kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~,
-       kRIT=\E[1;2C, kb2=\EOE, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB,
-       kcuf1=\EOC, kcuu1=\EOA, kend=\EOF, kent=\EOM, khome=\EOH,
-       kich1=\E[2~, kind=\E[1;2B, kmous=\E[M, knp=\E[6~,
-       kpp=\E[5~, kri=\E[1;2A, rin=\E[%p1%dT, use=xterm+pcfkeys,
+       indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
+       rin=\E[%p1%dT, use=xterm+pcfkeys, use=xterm+tmux,
        use=xterm-basic,
+
+# This fragment is for people who cannot agree on what the backspace key
+# should send.
+xterm+kbs|fragment for backspace key,
+       kbs=^H,
 #
 # This fragment describes as much of XFree86 xterm's "pc-style" function
 # keys as will fit into terminfo's 60 function keys.
@@ -3038,7 +3397,16 @@ xterm-new|modern xterm terminal emulator,
 # The meta key may also be used as a modifier in this scheme, adding another
 # bit to the parameter.
 xterm+pcfkeys|fragment for PC-style fkeys,
-       use=xterm+pcf2, use=xterm+pcc2,
+       use=xterm+app, use=xterm+pcf2, use=xterm+pcc2,
+       use=xterm+pce2,
+#
+xterm+noapp|fragment with cursor keys in normal mode,
+       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[F,
+       khome=\E[H,
+
+xterm+app|fragment with cursor keys in application mode,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\EOF,
+       khome=\EOH,
 #
 # The "PC-style" modifier scheme was introduced in xterm patch #94 (1999/3/27)
 # and revised in patch #167 (2002/8/24).  Some other terminal emulators copied
@@ -3060,25 +3428,41 @@ xterm+pcfkeys|fragment for PC-style fkeys,
 # modifyCursorKeys resource.  These fragments list the modified cursor-keys
 # that might apply to xterm+pcfkeys with different values of that resource.
 xterm+pcc3|fragment with modifyCursorKeys:3,
-       kDN=\E[>1;2B, kDN5=\E[>1;5B, kDN6=\E[>1;6B,
-       kLFT5=\E[>1;5D, kLFT6=\E[>1;6D, kRIT5=\E[>1;5C,
-       kRIT6=\E[>1;6C, kUP=\E[>1;2A, kUP5=\E[>1;5A,
-       kUP6=\E[>1;6A,
+       kLFT=\E[>1;2D, kRIT=\E[>1;2C, kind=\E[>1;2B,
+       kri=\E[>1;2A, kDN=\E[>1;2B, kDN3=\E[>1;3B, kDN4=\E[>1;4B,
+       kDN5=\E[>1;5B, kDN6=\E[>1;6B, kDN7=\E[>1;7B,
+       kLFT3=\E[>1;3D, kLFT4=\E[>1;4D, kLFT5=\E[>1;5D,
+       kLFT6=\E[>1;6D, kLFT7=\E[>1;7D, kRIT3=\E[>1;3C,
+       kRIT4=\E[>1;4C, kRIT5=\E[>1;5C, kRIT6=\E[>1;6C,
+       kRIT7=\E[>1;7C, kUP=\E[>1;2A, kUP3=\E[>1;3A,
+       kUP4=\E[>1;4A, kUP5=\E[>1;5A, kUP6=\E[>1;6A,
+       kUP7=\E[>1;7A,
 
 xterm+pcc2|fragment with modifyCursorKeys:2,
-       kDN=\E[1;2B, kDN5=\E[1;5B, kDN6=\E[1;6B, kLFT5=\E[1;5D,
-       kLFT6=\E[1;6D, kRIT5=\E[1;5C, kRIT6=\E[1;6C, kUP=\E[1;2A,
-       kUP5=\E[1;5A, kUP6=\E[1;6A,
+       kLFT=\E[1;2D, kRIT=\E[1;2C, kind=\E[1;2B, kri=\E[1;2A,
+       kDN=\E[1;2B, kDN3=\E[1;3B, kDN4=\E[1;4B, kDN5=\E[1;5B,
+       kDN6=\E[1;6B, kDN7=\E[1;7B, kLFT3=\E[1;3D, kLFT4=\E[1;4D,
+       kLFT5=\E[1;5D, kLFT6=\E[1;6D, kLFT7=\E[1;7D,
+       kRIT3=\E[1;3C, kRIT4=\E[1;4C, kRIT5=\E[1;5C,
+       kRIT6=\E[1;6C, kRIT7=\E[1;7C, kUP=\E[1;2A, kUP3=\E[1;3A,
+       kUP4=\E[1;4A, kUP5=\E[1;5A, kUP6=\E[1;6A, kUP7=\E[1;7A,
 
 xterm+pcc1|fragment with modifyCursorKeys:1,
-       kDN=\E[2B, kDN5=\E[5B, kDN6=\E[6B, kLFT5=\E[5D,
-       kLFT6=\E[6D, kRIT5=\E[5C, kRIT6=\E[6C, kUP=\E[2A,
-       kUP5=\E[5A, kUP6=\E[6A,
+       kLFT=\E[2D, kRIT=\E[2C, kind=\E[2B, kri=\E[2A, kDN=\E[2B,
+       kDN3=\E[3B, kDN4=\E[4B, kDN5=\E[5B, kDN6=\E[6B, kDN7=\E[7B,
+       kLFT3=\E[3D, kLFT4=\E[4D, kLFT5=\E[5D, kLFT6=\E[6D,
+       kLFT7=\E[7D, kRIT3=\E[3C, kRIT4=\E[4C, kRIT5=\E[5C,
+       kRIT6=\E[6C, kRIT7=\E[7C, kUP=\E[2A, kUP3=\E[3A,
+       kUP4=\E[4A, kUP5=\E[5A, kUP6=\E[6A, kUP7=\E[7A,
 
 xterm+pcc0|fragment with modifyCursorKeys:0,
-       kDN=\EO2B, kDN5=\EO5B, kDN6=\EO6B, kLFT5=\EO5D,
-       kLFT6=\EO6D, kRIT5=\EO5C, kRIT6=\EO6C, kUP=\EO2A,
-       kUP5=\EO5A, kUP6=\EO6A,
+       kLFT=\EO2D, kRIT=\EO2C, kind=\EO2B, kri=\EO2A, kDN=\EO2B,
+       kDN3=\EO3B, kDN4=\EO4B, kDN5=\EO5B, kDN6=\EO6B, kDN7=\EO7B,
+       kLFT3=\EO3D, kLFT4=\EO4D, kLFT5=\EO5D, kLFT6=\EO6D,
+       kLFT7=\EO7D, kRIT3=\EO3C, kRIT4=\EO4C, kRIT5=\EO5C,
+       kRIT6=\EO6C, kRIT7=\EO7C, kUP=\EO2A, kUP3=\EO3A,
+       kUP4=\EO4A, kUP5=\EO5A, kUP6=\EO6A, kUP7=\EO7A,
+
 #
 # Here are corresponding fragments from xterm patch #216:
 #
@@ -3121,9 +3505,47 @@ xterm+pcf2|fragment with modifyFunctionKeys:2,
        kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
        kf8=\E[19~, kf9=\E[20~,
 #
+# Chunks from xterm #230:
+xterm+pce2|fragment with modifyCursorKeys:2,
+       kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~,
+       kNXT=\E[6;2~, kPRV=\E[5;2~, kich1=\E[2~, knp=\E[6~,
+       kpp=\E[5~, kDC3=\E[3;3~, kDC4=\E[3;4~, kDC5=\E[3;5~,
+       kDC6=\E[3;6~, kDC7=\E[3;7~, kEND3=\E[1;3F, kEND4=\E[1;4F,
+       kEND5=\E[1;5F, kEND6=\E[1;6F, kEND7=\E[1;7F,
+       kHOM3=\E[1;3H, kHOM4=\E[1;4H, kHOM5=\E[1;5H,
+       kHOM6=\E[1;6H, kHOM7=\E[1;7H, kIC3=\E[2;3~, kIC4=\E[2;4~,
+       kIC5=\E[2;5~, kIC6=\E[2;6~, kIC7=\E[2;7~, kNXT3=\E[6;3~,
+       kNXT4=\E[6;4~, kNXT5=\E[6;5~, kNXT6=\E[6;6~,
+       kNXT7=\E[6;7~, kPRV3=\E[5;3~, kPRV4=\E[5;4~,
+       kPRV5=\E[5;5~, kPRV6=\E[5;6~, kPRV7=\E[5;7~,
+       use=xterm+edit,
+
+xterm+edit|fragment for 6-key editing-keypad,
+       kdch1=\E[3~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
+       use=xterm+pc+edit,
+
+xterm+pc+edit|fragment for pc-style editing keypad,
+       kend=\E[4~, khome=\E[1~,
+
+xterm+vt+edit|fragment for vt220-style editing keypad,
+       kfnd=\E[1~, kslt=\E[4~,
+
+#
+# Those chunks use the new-style (the xterm oldFunctionKeys resource is false).
+# Alternatively, the same scheme with old-style function keys as in xterm-r6
+# is shown here (because that is used in mrxvt and mlterm):
+xterm+r6f2|xterm with oldFunctionKeys and modifyFunctionKeys:2,
+       kf1=\E[11~, kf13=\E[11;2~, kf14=\E[12;2~, kf15=\E[13;2~,
+       kf16=\E[14;2~, kf2=\E[12~, kf25=\E[11;5~, kf26=\E[12;5~,
+       kf27=\E[13;5~, kf28=\E[14;5~, kf3=\E[13~, kf37=\E[11;6~,
+       kf38=\E[12;6~, kf39=\E[13;6~, kf4=\E[14~, kf40=\E[14;6~,
+       kf49=\E[11;3~, kf50=\E[12;3~, kf51=\E[13;3~,
+       kf52=\E[14;3~, kf61=\E[11;4~, kf62=\E[12;4~,
+       kf63=\E[13;4~, use=xterm+pcf2,
+#
 # This chunk is used for building the VT220/Sun/PC keyboard variants.
 xterm-basic|modern xterm terminal emulator - common,
-       OTbs, am, bce, km, mc5i, mir, msgr, xenl, AX,
+       OTbs, am, bce, km, mir, msgr, xenl, AX, XT,
        colors#8, cols#80, it#8, lines#24, pairs#64,
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
@@ -3135,29 +3557,36 @@ xterm-basic|modern xterm terminal emulator - common,
        dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K,
        flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG,
        ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L,
-       ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kbs=^H,
-       kdch1=\E[3~, kmous=\E[M, mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
-       meml=\El, memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
-       rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l,
-       rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m,
-       rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
-       setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+       ind=^J, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>,
+       kmous=\E[M, meml=\El, memu=\Em, op=\E[39;49m, rc=\E8,
+       rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l,
+       rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>,
+       rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+       rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm,
+       setaf=\E[3%p1%dm,
        setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
        sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
        smir=\E[4h, smkx=\E[?1h\E=, smm=\E[?1034h, smso=\E[7m,
-       smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt100+enq,
+       smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=ansi+pp,
+       use=xterm+kbs, use=vt100+enq,
 
 # From: David J. MacKenzie <djm@va.pubnix.com>, 14 Nov 1997
 # In retrospect, something like xterm-r6 was intended here -TD
 xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1,
        rmso=\E[m, rmul=\E[m, use=xterm-xf86-v33,
 
-# This is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey)
+# 16-colors is one of the variants of XFree86 3.3 xterm, updated for 4.0 (T.Dickey)
+# If configured to support 88- or 256-colors (which is fairly common in 2009),
+# xterm also recognizes the control sequences for initc -TD
 xterm-16color|xterm with 16 colors like aixterm,
+       ccc,
+       initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
        use=ibm+16color, use=xterm-new,
 
+# 256-colors is a compile-time feature of XFree86 xterm beginning with
+# patch #111 (1999/7/10) -TD
 xterm+256color|xterm 256-color feature,
        ccc,
        colors#256, pairs#32767,
@@ -3166,6 +3595,22 @@ xterm+256color|xterm 256-color feature,
        setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
        setb@, setf@,
 
+# 88-colors is a compile-time feature of XFree86 xterm beginning with
+# patch #115 (1999/9/18) -TD
+#
+# Note that the escape sequences used are the same as for 256-colors - xterm
+# has a different table of default color resource values.  If built for
+# 256-colors, it can still handle an 88-color palette by using the initc
+# capability.
+#
+# At this time (2007/7/14), except for rxvt 2.7.x, none of the other terminals
+# which support the xterm+256color feature support the associated initc
+# capability.  So it is cancelled in the entries which use this and/or the
+# xterm+256color block.
+#
+# The default color palette for the 256- and 88-colors are different.  A
+# given executable will have one palette (perhaps compiled-in).  If the program
+# supports xterm's control sequence, it can be programmed using initc.
 xterm+88color|xterm 88-color feature,
        colors#88, pairs#7744, use=xterm+256color,
 
@@ -3183,6 +3628,28 @@ xterm-1002|testing xterm-mouse,
 xterm-1003|testing xterm-mouse,
        XM=\E[?1003%?%p1%{1}%=%th%el%;, use=xterm-new,
 
+# This chunk is based on suggestions by Ailin Nemui and Nicholas Marriott, who
+# asked for some of xterm's advanced features to be added to its terminfo
+# entry.  It defines extended capabilities not found in standard terminfo or
+# termcap.  These are useful in tmux, for instance, hence the name.
+#
+# One caveat in adding extended capabilities in ncurses is that if the names
+# are longer than two characters, then they will not be visible through the
+# termcap interface.
+#
+# Ms modifies the selection/clipboard.  Its parameters are
+#      p1 = the storage unit (clipboard, selection or cut buffer)
+#      p2 = the base64-encoded clipboard content.
+# 
+# Ss is used to set the cursor style as described by the DECSCUSR
+#      function to a block or underline.
+# Se resets the cursor style to the terminal power-on default.
+#  
+# Cs and Cr set and reset the cursor colour.
+xterm+tmux|advanced xterm features used in tmux,
+       Cr=\E]112\007, Cs=\E]12;%p1%s\007,
+       Ms=\E]52;%p1%s;%p2%s\007, Se=\E[2 q, Ss=\E[%p1%d q,
+
 # This is another variant, for XFree86 4.0 xterm (T.Dickey)
 # This is an 8-bit version of xterm, which emulates DEC vt220 with ANSI color.
 # To use it, your decTerminalID resource must be set to 200 or above.
@@ -3208,8 +3675,8 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
        hpa=\233%i%p1%dG, ht=^I, hts=\210, ich=\233%p1%d@,
        il=\233%p1%dL, il1=\233L, ind=^J, invis=\2338m,
        is2=\E[62"p\E G\233m\233?7h\E>\E7\233?1;3;4;6l\2334l\233r\E8,
-       ka1=\217w, ka3=\217u, kb2=\217y, kbeg=\217E, kbs=^H,
-       kc1=\217q, kc3=\217s, kcbt=\233Z, kcub1=\217D, kcud1=\217B,
+       ka1=\217w, ka3=\217u, kb2=\217y, kbeg=\217E, kc1=\217q,
+       kc3=\217s, kcbt=\233Z, kcub1=\217D, kcud1=\217B,
        kcuf1=\217C, kcuu1=\217A, kdch1=\2333~, kend=\2334~,
        kent=\217M, kf1=\23311~, kf10=\23321~, kf11=\23323~,
        kf12=\23324~, kf13=\23325~, kf14=\23326~, kf15=\23328~,
@@ -3231,6 +3698,7 @@ xterm-8bit|xterm terminal emulator 8-bit controls (X Window System),
        smcup=\233?1049h, smir=\2334h, smkx=\233?1h\E=,
        smso=\2337m, smul=\2334m, tbc=\2333g, u6=\233[%i%d;%dR,
        u7=\E[6n, u8=\233[?1;2c, u9=\E[c, vpa=\233%i%p1%dd,
+       use=xterm+kbs,
 
 xterm-hp|xterm with hpterm function keys,
        kclr=\EJ, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
@@ -3269,19 +3737,21 @@ xterm-vt220|xterm emulating vt220,
        kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, kich1=\E[2~, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
-       use=xterm-basic, use=vt220+keypad,
+       use=xterm+app, use=xterm+edit, use=xterm-basic,
+       use=vt220+keypad,
 
 xterm-vt52|xterm emulating dec vt52,
        cols#80, it#8, lines#24,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, clear=\EH\EJ, cr=^M, cub1=\ED, cud1=\EB, cuf1=\EC,
        cup=\EY%p1%' '%+%c%p2%' '%+%c, cuu1=\EA, ed=\EJ, el=\EK,
-       home=\EH, ht=^I, ind=^J, kbs=^H, kcub1=\ED, kcud1=\EB,
-       kcuf1=\EC, kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF,
+       home=\EH, ht=^I, ind=^J, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
+       kcuu1=\EA, nel=^M^J, ri=\EI, rmacs=\EG, smacs=\EF,
+       use=xterm+kbs,
 
 xterm-noapp|xterm with cursor keys in normal mode,
-       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, rmcup@,
-       rmkx=\E>, smcup@, smkx=\E=, use=xterm,
+       rmcup@, rmkx=\E>, smcup@, smkx=\E=, use=xterm+noapp,
+       use=xterm,
 
 xterm-24|vs100|xterms|xterm terminal emulator (X Window System),
        lines#24, use=xterm,
@@ -3290,25 +3760,73 @@ xterm-24|vs100|xterms|xterm terminal emulator (X Window System),
 xterm|xterm terminal emulator (X Window System),
        use=xterm-new,
 
-# These entries allow access to the X titlebar and icon name as a status line.
-# Note that twm (and possibly window managers descended from it such as tvtwm,
-# ctwm, and vtwm) track windows by icon-name; thus, you don't want to mess
-# with it.
+# This entry assumes that xterm's handling of VT100 SI/SO is disabled by
+# setting the vt100Graphics resource to false.
+xterm-utf8|xterm with no VT100 line-drawing in UTF-8 mode,
+       U8#1, use=xterm,
+
+# These building-blocks allow access to the X titlebar and icon name as a
+# status line.  There are a few problems in using them in entries:
+#
+# a) tsl should have a parameter to denote the column on which to transfer to
+#    the status line.
+# b) the "0" code for xterm updates both icon-title and window title.  Some
+#    window managers such as twm (and possibly window managers descended from
+#    it such as tvtwm, ctwm, and vtwm) track windows by icon-name. Thus, you
+#    don't want to mess with icon-name when using those window managers.
 xterm+sl|access X title line and icon name,
        hs,
-       wsl#40,
-       dsl=\E]0;\007, fsl=^G, tsl=\E]0;, use=xterm,
+       dsl=\E]0;\007, fsl=^G, tsl=\E]0;,
 xterm+sl-twm|access X title line (pacify twm-descended window managers),
        hs,
-       wsl#40,
-       dsl=\E]2;\007, fsl=^G, tsl=\E]2;, use=xterm,
+       dsl=\E]2;\007, fsl=^G, tsl=\E]2;,
+
+# In contrast, this block can be used for a DEC vt320 and up.  There are two
+# controls used.
+#
+# DECSASD (select active status display)
+#      \E[0$}  Main display
+#      \E[1$}  Status line
+#
+# DECSSDT (select status line type)
+#      \E[0$~  No status line
+#      \E[1$~  Indicator status line
+#      \E[2$~  Host-writable status line
+#
+# The building block assumes that the terminal always shows something at the
+# status line (either the indicator, or status line).  That is because if no
+# status line is used, then the terminal makes that line part of the user
+# window, changing its size without notice.
+#
+# Because there is no "esl" (enable status line) capability, the "tsl"
+# capability ensures that the status line is host-writable.  A DEC terminal
+# will clear the status line when changing from indicator to host-writable
+# mode.
+#
+# Once on the status line, the row part of cursor addressing is ignored.  Since
+# tsl expects a parameter (to specify the column), the shortest addressing that
+# can be used for this purpose is HPA, e.g., \E[5d to go to column 5.
+#
+dec+sl|DEC VTxx status line,
+       eslok, hs,
+       dsl=\E[1$~, fsl=\E[0$}, tsl=\E[2$~\E[1$}\E[%i%p1%d`,
 
 #
 # The following xterm variants don't depend on your base version
 #
 # xterm with bold instead of underline
 xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold,
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;1%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
        smso=\E[7m, smul=\E[1m, use=xterm,
+
+# See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
+xterm-nic|xterm with ich/ich1 suppressed for non-curses programs,
+       ich@, ich1@, use=xterm,
+# From: Mark Sheppard <kimble@mistral.co.uk>, 4 May 1996
+xterm1|xterm terminal emulator ignoring the alternate screen buffer,
+       rmcup@, smcup@, use=xterm,
+
+#### KTERM
 # (kterm: this had extension capabilities ":KJ:TY=ascii:" -- esr)
 # (kterm should not invoke DEC Graphics as the alternate character set
 #  -- Kenji Rikitake)
@@ -3316,7 +3834,7 @@ xterm-bold|xterm terminal emulator (X11R6 Window System) standout w/bold,
 #  -- MATSUMOTO Shoji)
 # kterm implements acsc via built-in table of X Drawable's
 kterm|kterm kanji terminal emulator (X window system),
-       eslok, hs,
+       eslok, hs, XT,
        ncv@,
        acsc=``aajjkkllmmnnooppqqrrssttuuvvwwxx~~,
        csr=\E[%i%p1%d;%p2%dr, dsl=\E[?H, enacs=, fsl=\E[?F,
@@ -3326,12 +3844,51 @@ kterm|kterm kanji terminal emulator (X window system),
        tsl=\E[?E\E[?%i%p1%dT, use=xterm-r6, use=ecma+color,
 kterm-color|kterm-co|kterm with ANSI colors,
        ncv@, use=kterm, use=ecma+color,
-# See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
-xterm-nic|xterm with ich/ich1 suppressed for non-curses programs,
-       ich@, ich1@, use=xterm,
-# From: Mark Sheppard <kimble@mistral.co.uk>, 4 May 1996
-xterm1|xterm terminal emulator ignoring the alternate screen buffer,
-       rmcup@, smcup@, use=xterm,
+
+#### Other XTERM
+# These (xtermc and xtermm) are distributed with Solaris.  They refer to a
+# variant of xterm which is apparently no longer supported, but are interesting
+# because they illustrate SVr4 curses mouse controls - T.Dickey
+xtermm|xterm terminal emulator (monocrome),
+       OTbs, am, km, mir, msgr, xenl,
+       btns#3, cols#80, it#8, lines#24,
+       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       bel=^G, blink@, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D,
+       cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
+       el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, getm=\E[%p1%dY,
+       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
+       il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, kcub1=\EOD,
+       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kf0=\EOy,
+       kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf5=\EOT, kf6=\EOU,
+       kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, kmous=\E[^_,
+       knp=\E[U, kpp=\E[V, rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM,
+       rmacs=^O, rmcup=\E@0\E[?4r, rmso=\E[m,
+       rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
+       rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
+       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
+       sgr0=\E[m\017, smacs=^N, smcup=\E@0\E[?4s\E[?4h\E@1,
+       smso=\E[7m, tbc=\E[3g, use=vt100+fnkeys,
+
+xtermc|xterm terminal emulator (color),
+       colors#8, ncv#7, pairs#64,
+       op=\E[100m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+       setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+       setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+       use=xtermm,
+
+# From: David J. MacKenzie <djm@va.pubnix.com> 20 Apr 1995
+# Here's a termcap entry I've been using for xterm_color, which comes
+# with BSD/OS 2.0, and the X11R6 contrib tape too I think.  Besides the
+# color stuff, I also have a status line defined as the window manager
+# title bar. [I have translated it to terminfo -- ESR]
+xterm-pcolor|xterm with color used for highlights and status line,
+       wsl#40,
+       bold=\E[1;43m, rev=\E[7;34m,
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1;43%;%?%p2%t;4;42%;%?%p1%t;7;31%;%?%p3%t;7;34%;%?%p4%t;5%;%?%p7%t;8%;m,
+       smso=\E[7;31m, smul=\E[4;42m, use=xterm+sl, use=xterm-r6,
 
 # This describes the capabilities of color_xterm, an xterm variant from
 # before ECMA-64 color support was folded into the main-line xterm release.
@@ -3340,7 +3897,7 @@ xterm1|xterm terminal emulator ignoring the alternate screen buffer,
 # The README's with the distribution also say that it supports SGR 21, 24, 25
 # and 27, but they are not present in the terminfo or termcap.
 color_xterm|cx|cx100|color_xterm color terminal emulator for X,
-       OTbs, am, km, mir, msgr, xenl,
+       OTbs, am, km, mir, msgr, xenl, XT,
        cols#80, it#8, lines#65, ncv@,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
@@ -3379,6 +3936,32 @@ xterm-color|nxterm|generic color xterm,
        ncv@,
        op=\E[m, use=xterm-r6, use=klone+color,
 
+# This entry describes an xterm with Sun-style function keys enabled
+# via the X resource setting "xterm*sunFunctionKeys:true"
+# To understand <kf11>/<kf12> note that L1,L2 and F11,F12 are the same.
+# The <kf13>...<kf20> keys are L3-L10.  We don't set <kf16=\E[197z>
+# because we want it to be seen as <kcpy>.
+# The <kf31>...<kf45> keys are R1-R15.  We treat some of these in accordance
+# with their Sun keyboard labels instead.
+# From: Simon J. Gerraty <sjg@zen.void.oz.au> 10 Jan 1996
+xterm-sun|xterm with sunFunctionKeys true,
+       kb2=\E[218z, kcpy=\E[197z, kcub1=\EOD, kcud1=\EOB,
+       kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3z, kend=\E[220z,
+       kent=\EOM, kf1=\E[224z, kf10=\E[233z, kf11=\E[192z,
+       kf12=\E[193z, kf13=\E[194z, kf14=\E[195z, kf15=\E[196z,
+       kf17=\E[198z, kf18=\E[199z, kf19=\E[200z, kf2=\E[225z,
+       kf20=\E[201z, kf3=\E[226z, kf31=\E[208z, kf32=\E[209z,
+       kf33=\E[210z, kf34=\E[211z, kf35=\E[212z, kf36=\E[213z,
+       kf38=\E[215z, kf4=\E[227z, kf40=\E[217z, kf42=\E[219z,
+       kf44=\E[221z, kf45=\E[222z, kf46=\E[234z, kf47=\E[235z,
+       kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z,
+       kf9=\E[232z, kfnd=\E[200z, khlp=\E[196z, khome=\E[214z,
+       kich1=\E[2z, knp=\E[222z, kpp=\E[216z, kund=\E[195z,
+       use=xterm-basic,
+xterms-sun|small (80x24) xterm with sunFunctionKeys true,
+       cols#80, lines#24, use=xterm-sun,
+
+#### GNOME (VTE)
 # this describes the alpha-version of Gnome terminal shipped with Redhat 6.0
 gnome-rh62|Gnome terminal,
        bce,
@@ -3432,7 +4015,7 @@ gnome-rh80|GNOME Terminal,
 #
 # bce and msgr are repaired.
 gnome-rh90|GNOME Terminal,
-       bce, msgr,
+       bce, msgr, XT,
        hpa=\E[%i%p1%dG, kDC=\E[3;2~, kLFT=\EO2D, kRIT=\EO2C,
        kb2=\E[E, kcbt=\E[Z, kend=\EOF, khome=\EOH, tbc=\E[3g,
        vpa=\E[%i%p1%dd, use=xterm+pcf0, use=xterm+pcfkeys,
@@ -3445,11 +4028,68 @@ gnome-fc5|GNOME Terminal,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[!p\E[?1;3;4;6l\E[4l\E>\E[?1000l\E[?25h,
        use=ansi+enq, use=xterm+pcc0, use=gnome-rh90,
 
+# GNOME Terminal 2.18.1 (2007 snapshot)
+#
+# For any "recent" version of gnome-terminal, it is futile to attempt to
+# support modifiers on cursor- and keypad keys because the program usually
+# is hardcoded to set $TERM to "xterm", and on startup, it builds a subset
+# of the keys (which more/less correspond to the termcap values), and will
+# interpret those according to the $TERM value, but others not in the
+# terminfo according to some constantly changing set of hacker guidelines -TD
+vte-2007|VTE in GNOME Terminal snapshot 2.18.1,
+       use=xterm+pcc2, use=gnome-fc5,
+gnome-2007|GNOME Terminal snapshot 2.18.1,
+       use=vte-2007,
+
+# GNOME Terminal 2.22.3 (2008 snapshot)
+#
+# In vttest, it claims to be a vt220 with national replacement character-sets,
+# but aside from the identifier string, implements only a small fraction of
+# vt220's behavior, which will make it less usable on a VMS system (unclear
+# what the intent of the developer is, since the NRC feature exposed in vttest
+# by this change does not work).
+vte-2008|VTE in GNOME Terminal snapshot 2.22.3,
+       use=vte+pcfkeys, use=vte-2007,
+gnome-2008|GNOME Terminal snapshot 2.22.3,
+       use=vte-2008,
+
+# GNOME terminal may automatically use the contents of the "xterm" terminfo to
+# supply key information which is not built into the program.  With 2.22.3,
+# this list is built into the program (which addresses the inadvertant use of
+# random terminfo data, though using a set of values which does not correspond
+# to any that xterm produces - still not solving the problem that GNOME
+# terminal hardcodes the $TERM variable as "xterm").
+#
+#      terminfo        modifier        code    keys
+#      kf13-kf24       shift           2       F1 to F12
+#      kf25-kf36       control         5       F1 to F12
+#      kf37-kf48       shift/control   6       F1 to F12
+#      kf49-kf60       alt             3       F1 to F12
+#      kf61-kf63       shift-alt       4       F1 to F3
+#
+# The parameters with \EO (SS3) are technically an error, since SS3 should have
+# no parameters.  This appears to be rote copying based on xterm+pcc0.
+vte+pcfkeys|VTE's variation on xterm+pcfkeys,
+       kf1=\EOP, kf13=\EO1;2P, kf14=\EO1;2Q, kf15=\EO1;2R,
+       kf16=\EO1;2S, kf2=\EOQ, kf25=\EO1;5P, kf26=\EO1;5Q,
+       kf27=\EO1;5R, kf28=\EO1;5S, kf3=\EOR, kf37=\EO1;6P,
+       kf38=\EO1;6Q, kf39=\EO1;6R, kf4=\EOS, kf40=\EO1;6S,
+       kf49=\EO1;3P, kf50=\EO1;3Q, kf51=\EO1;3R, kf52=\EO1;3S,
+       kf61=\EO1;4P, kf62=\EO1;4Q, kf63=\EO1;4R,
+       use=xterm+pcfkeys,
+gnome+pcfkeys|VTE's variation on xterm+pcfkeys,
+       use=vte+pcfkeys,
+
+vte|VTE aka GNOME Terminal,
+       use=vte-2008,
 gnome|GNOME Terminal,
-       use=gnome-fc5,
+       use=vte,
 
+# palette is hardcoded...
+vte-256color|VTE with xterm 256-colors,
+       initc@, use=xterm+256color, use=vte,
 gnome-256color|GNOME Terminal with xterm 256-colors,
-       use=xterm+256color, use=gnome,
+       use=vte-256color,
 
 # XFCE Terminal 0.2.5.4beta2
 #
@@ -3458,8 +4098,9 @@ gnome-256color|GNOME Terminal with xterm 256-colors,
 # Since most of the terminfo-related behavior is due to the VTE library,
 # the terminfo is the same as gnome-terminal.
 xfce|Xfce Terminal,
-       use=gnome,
+       use=vte,
 
+#### Other GNOME
 # Multi-Gnome-Terminal 1.6.2
 #
 # This does not use VTE, and does have different behavior (compare xfce and
@@ -3467,6 +4108,7 @@ xfce|Xfce Terminal,
 mgt|Multi GNOME Terminal,
        indn=\E[%p1%dS, rin=\E[%p1%dT, use=xterm-xf86-v333,
 
+#### KDE
 # This is kvt 0-18.7, shipped with Redhat 6.0 (though whether it supports bce
 # or not is debatable).
 kvt|KDE terminal,
@@ -3503,8 +4145,16 @@ kvt|KDE terminal,
 #
 # Updated for konsole 1.6.4:
 #    add konsole-solaris
+#
+# Updated for konsole 1.6.6:
+#    add control-key modifiers for function-keys, etc.
+#
+# vttest menu 1 shows that both konsole and gnome terminal do wrapping
+# different from xterm (and vt100's).  They have the same behavior in this
+# detail, but it is unclear which copies the other.
 konsole-base|KDE console window,
-       bce, km@, npc,
+       bce, km@, npc, XT,
+       ncv@,
        bel@, blink=\E[5m, civis=\E[?25l, cnorm=\E[?25h,
        ech=\E[%p1%dX, flash=\E[?5h$<100/>\E[?5l,
        hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1@,
@@ -3531,11 +4181,12 @@ konsole-xf3x|KDE console window with keyboard for XFree86 3.x xterm,
 # The value for kbs reflects local customization rather than the settings used
 # for XFree86 xterm.
 konsole-xf4x|KDE console window with keyboard for XFree86 4.x xterm,
-       kend=\EOF, kf1=\EOP, kf13=\EO2P, kf14=\EO2Q, kf15=\EO2R,
-       kf16=\EO2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~,
-       kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~,
-       kf23=\E[23;2~, kf24=\E[24;2~, kf3=\EOR, kf4=\EOS,
-       khome=\EOH, use=konsole-vt100,
+       kend=\EOF, khome=\EOH, use=konsole+pcfkeys,
+       use=konsole-vt100,
+# Konsole does not implement shifted cursor-keys.
+konsole+pcfkeys|konsole subset of xterm+pcfkeys,
+       kLFT@, kRIT@, kcbt=\E[Z, kind@, kri@, kDN@, kUP@, use=xterm+pcc2,
+       use=xterm+pcf0,
 # KDE's "vt100" keyboard has no relationship to any terminal that DEC made, but
 # it is still useful for deriving the other entries.
 konsole-vt100|KDE console window with vt100 (sic) keyboard,
@@ -3552,16 +4203,32 @@ konsole-16color|klone of xterm-16color,
 konsole|KDE console window,
        use=konsole-xf4x,
 
-# Based on mlterm 2.9.2's mlterm.ti, with corrections/additions from reading
-# the source code and running tack -TD
+# palette is hardcoded...
+konsole-256color|KDE console window with xterm 256-colors,
+       initc@, use=xterm+256color, use=konsole,
+
+#### MLTERM
+# This is mlterm 2.9.3's mlterm.ti, with some additions/corrections -TD
 #
-# This is nominally a vt102 emulator, with features borrowed from rxvt and
+# It is nominally a vt102 emulator, with features borrowed from rxvt and
 # xterm.
 #
-# There are some problems with vttest:
-#      test of character sets leaves it in line-drawing mode.
+# The function keys are numbered based on shift/control/alt modifiers, except
+# that the control-modifier itself is used to spawn a new copy of mlterm (the
+# "-P" option).  So control/F1 to control/F12 may not be usable, depending on
+# how it is configured.
+#
+#                              kf1 to kf12     \E[11~   to \E[24~
+#      shift                   kf1 to kf12     \E[11;2~ to \E[24;2~
+#      alt                     kf1 to kf12     \E[11;3~ to \E[24;3~
+#      shift/alt               kf1 to kf12     \E[11;4~ to \E[24;4~
+#      control                 kf1 to kf12     \E[11;5~ to \E[24;5~ (maybe)
+#      control/shift           kf1 to kf12     \E[11;6~ to \E[24;6~
+#      control/alt             kf1 to kf12     \E[11;7~ to \E[24;7~
+#      control/shift/alt       kf1 to kf12     \E[11;8~ to \E[24;8~
+#
 mlterm|multi lingual terminal emulator,
-       am, eslok, km, mc5i, mir, msgr, npc, xenl,
+       am, eslok, km, mc5i, mir, msgr, npc, xenl, XT,
        colors#8, cols#80, it#8, lines#24, pairs#64,
        acsc=00``aaffgghhjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
@@ -3574,23 +4241,39 @@ mlterm|multi lingual terminal emulator,
        home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
        ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS,
        is2=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>,
-       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
-       kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\E[11~, kf10=\E[21~,
-       kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, kf3=\E[13~,
-       kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~,
-       kf9=\E[20~, kfnd=\E[1~, khome=\EOH, kich1=\E[2~,
-       kmous=\E[M, knp=\E[6~, kpp=\E[5~, kslt=\E[4~, mc0=\E[i,
+       kbs=\177, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+       kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kfnd=\E[1~,
+       khome=\EOH, kich1=\E[2~, kind=\EO1;2B, kmous=\E[M,
+       knp=\E[6~, kpp=\E[5~, kri=\EO1;2A, kslt=\E[4~, mc0=\E[i,
        nel=\EE, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
-       rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l,
-       rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, rmkx=\E[?1l\E>,
-       rmso=\E[27m, rmul=\E[24m,
+       rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
+       rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;3;4;6l\E[4l\E>\E[?1000l,
        sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;,
-       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E7\E[?47h,
+       sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
-       tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt100+enq,
+       tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c,
+       vpa=\E[%i%p1%dd, use=mlterm+pcfkeys, use=xterm+r6f2,
+
+# The insert/delete/home/end keys do not respond to modifiers because mlterm
+# looks in its termcap to decide which string to send.  If it used terminfo
+# (when available), it could use the extended names introduced for xterm.
+mlterm+pcfkeys|fragment for PC-style fkeys,
+       kLFT=\EO1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\EO1;2C,
+       kDN=\EO1;2B, kDN3=\EO1;3B, kDN4=\EO1;4B, kDN5=\EO1;5B,
+       kDN6=\EO1;6B, kDN7=\EO1;7B, kIC5=\E[2;5~, kIC6=\E[2;6~,
+       kLFT3=\EO1;3D, kLFT4=\EO1;4D, kLFT5=\EO1;5D,
+       kLFT6=\EO1;6D, kLFT7=\EO1;7D, kNXT5=\E[6;5~,
+       kNXT6=\E[6;6~, kPRV5=\E[5;5~, kPRV6=\E[5;6~,
+       kRIT3=\EO1;3C, kRIT4=\EO1;4C, kRIT5=\EO1;5C,
+       kRIT6=\EO1;6C, kRIT7=\EO1;7C, kUP=\EO1;2A, kUP3=\EO1;3A,
+       kUP4=\EO1;4A, kUP5=\EO1;5A, kUP6=\EO1;6A, kUP7=\EO1;7A,
+
+mlterm-256color|mlterm 3.0 with xterm 256-colors,
+       use=xterm+256color, use=rxvt,
 
+#### RXVT
 # From: Thomas Dickey <dickey@clark.net> 04 Oct 1997
 # Updated: Oezguer Kesim <kesim@math.fu-berlin.de> 02 Nov 1997
 # Notes:
@@ -3608,12 +4291,12 @@ mlterm|multi lingual terminal emulator,
 #
 # rxvt is normally configured to look for "xterm" or "xterm-color" as $TERM.
 # Since rxvt is not really compatible with xterm, it should be configured as
-# "rxvt" (monochrome) and "rxvt-color".
+# "rxvt" or "rxvt-color".
 #
 # removed dch/dch1 because they are inconsistent with bce/ech -TD
 # remove km as per tack test -TD
 rxvt-basic|rxvt terminal base (X Window System),
-       OTbs, am, bce, eo, mir, msgr, xenl, xon,
+       OTbs, am, bce, eo, mir, msgr, xenl, xon, XT,
        cols#80, it#8, lines#24,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
@@ -3678,6 +4361,7 @@ rxvt-basic|rxvt terminal base (X Window System),
 #  F18              ESC [ 32 ~   ESC [ 32 $   ESC [ 32 ^   ESC [ 32 @
 #  F19              ESC [ 33 ~   ESC [ 33 $   ESC [ 33 ^   ESC [ 33 @
 #  F20              ESC [ 34 ~   ESC [ 34 $   ESC [ 34 ^   ESC [ 34 @
+#
 #                                                          Application
 #  Up               ESC [ A      ESC [ a      ESC O a      ESC O A
 #  Down             ESC [ B      ESC [ b      ESC O b      ESC O B
@@ -3705,10 +4389,18 @@ rxvt-basic|rxvt terminal base (X Window System),
 #  XK_KP_8          8                                      ESC O x
 #  XK_KP_9          9                                      ESC O y
 #
+# The source-code for rxvt actually defines mappings for F21-F35, using
+# "ESC [ 35 ~" to "ESC [  49 ~".  Keyboards with more than 12 function keys
+# are rare, so this entry uses the shift- and control-modifiers as in
+# xterm+pcfkeys to define keys past F12.
+#
+# kIC is normally not used, since rxvt performs a paste for that (shifted
+# insert), unless private mode 35 is set.
+#
 # kDN, kDN5, kDN6, etc are extensions based on the names from xterm+pcfkeys -TD
 # Removed kDN6, etc (control+shift) since rxvt does not implement this -TD
 rxvt+pcfkeys|fragment for PC-style fkeys,
-       kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E2$, kLFT=\E[d,
+       kDC=\E[3$, kEND=\E[8$, kHOM=\E[7$, kIC=\E[2$, kLFT=\E[d,
        kNXT=\E[6$, kPRV=\E[5$, kRIT=\E[c, kcub1=\E[D, kcud1=\E[B,
        kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kel=\E[8\^,
        kend=\E[8~, kf1=\E[11~, kf10=\E[21~, kf11=\E[23~,
@@ -3722,9 +4414,12 @@ rxvt+pcfkeys|fragment for PC-style fkeys,
        kf38=\E[29\^, kf39=\E[31\^, kf4=\E[14~, kf40=\E[32\^,
        kf41=\E[33\^, kf42=\E[34\^, kf43=\E[23@, kf44=\E[24@,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
-       kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
-       kslt=\E[4~, kDN=\E[b, kDN5=\EOb, kLFT5=\EOd, kRIT5=\EOc,
-       kUP=\E[a, kUP5=\EOa,
+       kfnd=\E[1~, khome=\E[7~, kich1=\E[2~, kind=\E[a, knp=\E[6~,
+       kpp=\E[5~, kri=\E[b, kslt=\E[4~, kDC5=\E[3\^, kDC6=\E[3@,
+       kDN=\E[b, kDN5=\EOb, kEND5=\E[8\^, kEND6=\E[8@,
+       kHOM5=\E[7\^, kHOM6=\E[7@, kIC5=\E[2\^, kIC6=\E[2@,
+       kLFT5=\EOd, kNXT5=\E[6\^, kNXT6=\E[6@, kPRV5=\E[5\^,
+       kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa,
 
 rxvt|rxvt terminal emulator (X Window System),
        ncv@,
@@ -3734,13 +4429,15 @@ rxvt-color|rxvt terminal emulator (X Window System),
        use=rxvt,
 rxvt-256color|rxvt 2.7.9 with xterm 256-colors,
        use=xterm+256color, use=rxvt,
+rxvt-88color|rxvt 2.7.9 with xterm 88-colors,
+       use=xterm+88color, use=rxvt,
 rxvt-xpm|rxvt terminal emulator (X Window System),
        use=rxvt,
 rxvt-cygwin|rxvt terminal emulator (X Window System) on cygwin,
-       acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
+       acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        use=rxvt,
 rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygwin,
-       acsc=0\333+\257\,\256-\^`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376,
+       acsc=+\257\,\256-\^0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330~\376,
        use=rxvt-cygwin,
 
 # This variant is supposed to work with rxvt 2.7.7 when compiled with
@@ -3748,6 +4445,25 @@ rxvt-cygwin-native|rxvt terminal emulator (native MS Window System port) on cygw
 rxvt-16color|xterm with 16 colors like aixterm,
        ncv#32, use=ibm+16color, use=rxvt,
 
+#### MRXVT
+# mrxvt 0.5.4
+#
+# mrxvt is based on rxvt 2.7.11, but has by default XTERM_FKEYS defined, which
+# makes its function-keys different from other flavors of rxvt -TD
+mrxvt|multitabbed rxvt,
+       XT,
+       kEND=\E[8;2~, kHOM=\E[7;2~, kcub1=\E[D, kcud1=\E[B,
+       kcuf1=\E[C, kcuu1=\E[A, kend=\E[8~, khome=\E[7~,
+       kEND3=\E[8;3~, kEND4=\E[8;4~, kEND5=\E[8;5~,
+       kEND6=\E[8;6~, kEND7=\E[8;7~, kHOM3=\E[7;3~,
+       kHOM4=\E[7;4~, kHOM5=\E[7;5~, kHOM6=\E[7;6~,
+       kHOM7=\E[7;7~, use=xterm+r6f2, use=xterm+pcfkeys,
+       use=rxvt,
+
+mrxvt-256color|multitabbed rxvt with 256 colors,
+       use=xterm+256color, use=mrxvt,
+
+#### ETERM
 # From: Michael Jennings <mej@valinux.com>
 #
 # Eterm 0.9.3
@@ -3759,7 +4475,7 @@ rxvt-16color|xterm with 16 colors like aixterm,
 # remove nonworking flash -TD
 # remove km as per tack test -TD
 Eterm|Eterm-color|Eterm with xterm-style color support (X Window System),
-       am, bce, bw, eo, mc5i, mir, msgr, xenl, xon,
+       am, bce, bw, eo, mc5i, mir, msgr, xenl, xon, XT,
        btns#5, cols#80, it#8, lines#24, lm#0, ncv@,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
@@ -3787,6 +4503,19 @@ Eterm|Eterm-color|Eterm with xterm-style color support (X Window System),
        vpa=\E[%i%p1%dd, use=vt100+enq, use=rxvt+pcfkeys,
        use=ecma+color,
 
+Eterm-256color|Eterm with xterm 256-colors,
+       use=xterm+256color, use=Eterm,
+
+Eterm-88color|Eterm with 88 colors,
+       use=xterm+88color, use=Eterm,
+
+#### ATERM
+# Based on rxvt 2.4.8, it has a few differences in key bindings
+aterm|AfterStep terminal,
+       XT,
+       kbs=\177, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, use=rxvt,
+
+#### XITERM
 # xiterm  0.5-5.2
 # This is not based on xterm's source...
 # vttest shows several problems with keyboard, cursor-movements.
@@ -3795,48 +4524,8 @@ xiterm|internationalized terminal emulator for X,
        km@,
        kbs=\177, kdch1=\E[3~, use=klone+color, use=xterm-r6,
 
-# These (xtermc and xtermm) are distributed with Solaris.  They refer to a
-# variant of xterm which is apparently no longer supported, but are interesting
-# because they illustrate SVr4 curses mouse controls - T.Dickey
-xtermm|xterm terminal emulator (monocrome),
-       OTbs, am, km, mir, msgr, xenl,
-       btns#3, cols#80, it#8, lines#24,
-       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
-       bel=^G, blink@, bold=\E[1m, clear=\E[H\E[2J, cr=^M,
-       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[1D,
-       cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
-       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
-       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
-       el=\E[K, el1=\E[1K$<3>, enacs=\E(B\E)0, getm=\E[%p1%dY,
-       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
-       il=\E[%p1%dL, il1=\E[L, ind=^J, kbs=^H, kcub1=\EOD,
-       kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kend=\E[Y, kf0=\EOy,
-       kf10=\EOY, kf11=\EOZ, kf12=\EOA, kf5=\EOT, kf6=\EOU,
-       kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H, kmous=\E[^_,
-       knp=\E[U, kpp=\E[V, rc=\E8, reqmp=\E[492Z, rev=\E[7m, ri=\EM,
-       rmacs=^O, rmcup=\E@0\E[?4r, rmso=\E[m,
-       rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
-       rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
-       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
-       sgr0=\E[m\017, smacs=^N, smcup=\E@0\E[?4s\E[?4h\E@1,
-       smso=\E[7m, tbc=\E[3g, use=vt100+fnkeys,
-
-xtermc|xterm terminal emulator (color),
-       colors#8, ncv#7, pairs#64,
-       op=\E[100m, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
-       setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
-       setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
-       use=xtermm,
-
-# From: David J. MacKenzie <djm@va.pubnix.com> 20 Apr 1995
-# Here's a termcap entry I've been using for xterm_color, which comes
-# with BSD/OS 2.0, and the X11R6 contrib tape too I think.  Besides the
-# color stuff, I also have a status line defined as the window manager
-# title bar. [I have translated it to terminfo -- ESR]
-xterm-pcolor|xterm with color used for highlights and status line,
-       bold=\E[1m\E[43m, rev=\E[7m\E[34m, smso=\E[7m\E[31m,
-       smul=\E[4m\E[42m, use=xterm+sl, use=xterm-r6,
 
+#### HPTERM
 # HP ships this (HPUX 9 and 10), except for the pb#9600 which was merged in
 # from BSD termcap.  (hpterm:  added empty <acsc>, we have no idea what ACS
 # chars look like --esr)
@@ -3862,38 +4551,14 @@ hpterm|X-hpterm|hp X11 terminal emulator,
        sgr0=\E&d@, smacs=^N, smir=\EQ, smkx=\E&s1A, smln=\E&jB,
        smso=\E&dJ, smul=\E&dD, tbc=\E3, vpa=\E&a%p1%dY,
 # HPUX 11 provides a color version.
-hpterm-color|HP X11 terminal emulator with color,
-       ccc,
-       colors#64, pairs#8,
-       home=\E&a0y0C,
-       initp=\E&v%p2%da%p3%db%p4%dc%p5%dx%p6%dy%p7%dz%p1%dI,
-       op=\E&v0S, scp=\E&v%p1%dS, use=hpterm,
-
-# This entry describes an xterm with Sun-style function keys enabled
-# via the X resource setting "xterm*sunFunctionKeys:true"
-# To understand <kf11>/<kf12> note that L1,L2 and F11,F12 are the same.
-# The <kf13>...<kf20> keys are L3-L10.  We don't set <kf16=\E[197z>
-# because we want it to be seen as <kcpy>.
-# The <kf31>...<kf45> keys are R1-R15.  We treat some of these in accordance
-# with their Sun keyboard labels instead.
-# From: Simon J. Gerraty <sjg@zen.void.oz.au> 10 Jan 1996
-xterm-sun|xterm with sunFunctionKeys true,
-       kb2=\E[218z, kcpy=\E[197z, kcub1=\EOD, kcud1=\EOB,
-       kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3z, kend=\E[220z,
-       kent=\EOM, kf1=\E[224z, kf10=\E[233z, kf11=\E[192z,
-       kf12=\E[193z, kf13=\E[194z, kf14=\E[195z, kf15=\E[196z,
-       kf17=\E[198z, kf18=\E[199z, kf19=\E[200z, kf2=\E[225z,
-       kf20=\E[201z, kf3=\E[226z, kf31=\E[208z, kf32=\E[209z,
-       kf33=\E[210z, kf34=\E[211z, kf35=\E[212z, kf36=\E[213z,
-       kf38=\E[215z, kf4=\E[227z, kf40=\E[217z, kf42=\E[219z,
-       kf44=\E[221z, kf45=\E[222z, kf46=\E[234z, kf47=\E[235z,
-       kf5=\E[228z, kf6=\E[229z, kf7=\E[230z, kf8=\E[231z,
-       kf9=\E[232z, kfnd=\E[200z, khlp=\E[196z, khome=\E[214z,
-       kich1=\E[2z, knp=\E[222z, kpp=\E[216z, kund=\E[195z,
-       use=xterm-basic,
-xterms-sun|small (80x24) xterm with sunFunctionKeys true,
-       cols#80, lines#24, use=xterm-sun,
+hpterm-color|HP X11 terminal emulator with color,
+       ccc,
+       colors#64, pairs#8,
+       home=\E&a0y0C,
+       initp=\E&v%p2%da%p3%db%p4%dc%p5%dx%p6%dy%p7%dz%p1%dI,
+       op=\E&v0S, scp=\E&v%p1%dS, use=hpterm,
 
+#### EMU
 # This is for the extensible terminal emulator on the X11R6 contrib tape.
 # It corresponds to emu's internal emulation:
 #      emu -term emu
@@ -3906,7 +4571,7 @@ emu|emu native mode,
        acsc=61a\202f\260g2j\213k\214l\215m\216n\217o\220q\222s\224t\225u\226v\227w\230x\231~\244,
        bel=^G, blink=\EW, bold=\EU, civis=\EZ, clear=\EP\EE0;0;,
        cnorm=\Ea, cr=^M, csr=\Ek%p1%d;%p2%d;, cub=\Eq-%p1%d;,
-       cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\ED,
+       cub1=^H, cud=\Ep%p1%d;, cud1=\EB, cuf=\Eq%p1%d;, cuf1=\EC,
        cup=\EE%p1%d;%p2%d;, cuu=\Ep-%p1%d;, cuu1=\EA,
        dch=\EI%p1%d;, dch1=\EI1;, dl=\ER%p1%d;, dl1=\ER1;,
        ech=\Ej%p1%d;, ed=\EN, el=\EK, el1=\EL, home=\EE0;0;, ht=^I,
@@ -3955,6 +4620,8 @@ emu-220|Emu-220 (vt200-7bit mode),
        sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m, smacs=^N, smcup=\E[?1l\E=, smkx=\E=,
        smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g,
+
+#### MVTERM
 # A commercial product, Reportedly a version of Xterm with an OPEN LOOK UI,
 # print interface, ANSI X3.64 colour escape sequences, etc.  Newsgroup postings
 # indicate that it emulates more than one terminal, but incompletely.
@@ -3989,7 +4656,7 @@ mvterm|vv100|SwitchTerm aka mvTERM,
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        tsl=\E[?E\E[?%i%p1%dT, use=vt100+fnkeys,
 
-### MTERM
+#### MTERM
 #
 # This application is available by email from <mouse@Rodents.Montreal.QC.CA>.
 #
@@ -4051,6 +4718,31 @@ decansi|ANSI emulation with DEC compatibility hacks,
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, u6=\E[%i%d;%dR,
        u7=\E[6n, vpa=\E[%i%p1%dd,
 
+#### VWM
+#
+# vwmterm is a terminal emulator written for the VWM console window manager
+#
+vwmterm|(vwm term),
+       am, bce, ccc, mir, msgr, npc, xenl, xon,
+       colors#8, pairs#64,
+       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
+       clear=\E[H\E[J, cnorm=\E[?25h, cr=^M, cub=\E[%p1%dD,
+       cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
+       cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
+       cuu1=\E[A, cvvis=\E[?25h, dim=\E[2m, ed=\E[J, el=\E[K,
+       home=\E[H, il1=\E[L, ind=^J, invis=\E[8m, kcub1=\E[D,
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
+       kend=\E[4~, kf1=\E[[A, kf10=\E[21~, kf11=\E[22~,
+       kf12=\E[23~, kf2=\E[[B, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E,
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       khome=\E[1~, knp=\E[6~, kpp=\E[5~, rev=\E[7m, rmacs=\E[10m,
+       rmam=\E[?7l, rmcup=\E[?1049l, rs1=\E[H\E[J\E[m\Ec,
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+       sgr=\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,
+       sgr0=\E[0;10m, smacs=\E[11m, smam=\E[?7h,
+       smcup=\E[?1049h, smso=\E[3m, smul=\E[4m,
+
 #### MGR
 #
 # MGR is a Bell Labs window system lighter-weight than X.
@@ -4085,6 +4777,123 @@ mgr-linux|Mgr window with Linux keyboard,
        kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\E[1~, knp=\E[6~, kpp=\E[5~, use=mgr,
 
+#### SIMPLETERM
+# st.suckless.org
+# st-0.1.1
+#
+# Note:  the original terminfo description uses leading blank to persuade
+# ncurses to use "st" as its name.  Proper fix for that is to use "st" as an
+# alias.
+#
+# Reading the code shows it should work for aixterm 16-colors
+# - added st-16color
+#
+# Using tack:
+# - set eo (erase-overstrike)
+# - set xenl
+# - tbc doesn't work
+# - hts works
+# - cbt doesn't work
+# - shifted cursor-keys send sequences like rxvt
+# - sgr referred to unimplemented "invis" mode.
+# Fixes: add eo and xenl per tack, remove nonworking cbt, hts and tbc, invis
+simpleterm|st| simpleterm,
+       am, eo, mir, msgr, ul, xenl,
+       colors#8, cols#80, it#8, lines#24, ncv#3, pairs#64,
+       acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       bel=^G, bold=\E[1m, civis=\E[?25l, clear=\E[H\E[2J,
+       cnorm=\E[?12l\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr,
+       cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+       dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H,
+       hpa=\E[%i%p1%dG, ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL,
+       il1=\E[L, ind=^J, indn=\E[%p1%dS, kbs=\177, kcub1=\E[D,
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~,
+       kend=\E[4~, kf1=\EOP, kf10=\E[21~, kf11=\E[23~,
+       kf12=\E[24~, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\E[15~,
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       khome=\E[1~, knp=\E[6~, kpp=\E[5~, op=\E[37;40m, rc=\E8,
+       rev=\E[7m, rmacs=\E(B, rmso=\E[m, rmul=\E[m, sc=\E7,
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
+       sgr0=\E[0m, smacs=\E(0, smso=\E[7m, smul=\E[4m,
+st-16color|simpleterm with 16-colors,
+       use=ibm+16color, use=simpleterm,
+# 256 colors "works", but when running xterm's test-scripts, some garbage is
+# shown in the titlebar.
+st-256color|simpleterm with 256 colors,
+       ccc@,
+       initc@, use=xterm+256color, use=simpleterm,
+
+### TERMINATOR
+# http://software.jessies.org/terminator/
+# Tested using their Debian package org.jessies.terminator 6.104.3256 on 64-bit
+# Debian/current -TD (2011/8/20)
+#
+# There are some packaging problems:
+# a) using Java, the program starts off using 50Mb, and climbs from there,
+#    up to 114Mb after testing (no scrollback).
+# b) it insists on reinstalling its terminal description in $HOME/.terminfo
+#    (two copies, just in case the host happens to be Mac OS X).
+#    I deleted this after testing with tack.
+#
+# Issues/features found with tack:
+# a) tbc does not work (implying that hts also is broken).
+#    Comparing with the tabs utility shows a problem with the last tabstop on
+#    a line.
+# b) has xterm-style shifted function-key strings
+#    meta also is used, but control is ignored.
+# c) has xterm-style modifiers for cursor keys (shift, control, shift+control, meta)
+# d) some combinations of shift/control send xterm-style sequences for
+#    insert/delete/home/end.
+# e) numeric keypad sends only numbers (compare with vttest).
+# f) meta mode (km) is not implemented.
+#
+# Issues found with ncurses test-program:
+# a) bce is inconsistently implemented
+# b) widths of Unicode values above 256 do not always agree with wcwidth.
+#
+# Checked with vttest, found low degree of compatibility there.
+#
+# Checked with xterm's scripts, found that the 256-color palette is fixed.
+#
+# Fixes:
+# a) add sgr string
+# b) corrected sgr0 to reset alternate character set
+# c) modified smacs/rmacs to use SCS rather than SI/SO
+# d) removed bce
+# e) removed km
+terminator|Terminator no line wrap,
+       eo, mir, msgr, xenl, xon,
+       colors#256, cols#80, it#8, lines#24, lm#0, pairs#32767,
+       acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
+       bold=\E[1m, civis=\E[?25l, clear=\E[H\E[2J,
+       cnorm=\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr,
+       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J,
+       cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
+       cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
+       dl=\E[%p1%dM, dl1=\E[M, dsl=\E]2;\007, ed=\E[J, el=\E[K,
+       el1=\E[1K, enacs=\E(B\E)0, flash=^G, fsl=^G, home=\E[H,
+       hpa=\E[%i%p1%dG, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L,
+       ind=^J, is1=\E[?47l\E=\E[?1l,
+       is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=^H,
+       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+       kdch1=\E[3~, kend=\E[4~, kf1=\EOP, kf10=\E[21~,
+       kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
+       kf15=\E[28~, kf16=\E[29~, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
+       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
+       op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E(B,
+       rmcup=\E[?47l\E8, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m,
+       rs1=\E>\E[1;3;4;5;6l\E[?7h\E[m\E[r\E[2J\E[H,
+       rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E>,
+       s0ds=\E(B, s1ds=\E(0, sc=\E7, setab=\E[48;5;%p1%dm,
+       setaf=\E[38;5;%p1%dm,
+       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%;m%?%p9%t\E(0%e\E(B%;,
+       sgr0=\E[m\E(B, smacs=\E(0, smcup=\E7\E[?47h, smir=\E[4h,
+       smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E]2;%p1,
+       vpa=\E[%i%p1%dd,
+
 ######## UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS
 #
 
@@ -4123,6 +4932,26 @@ eterm|gnu emacs term.el terminal emulation,
        sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, smso=\E[7m,
        smul=\E[4m,
 
+# The codes supported by the term.el terminal emulation in GNU Emacs 22.2
+eterm-color|Emacs term.el terminal emulator term-protocol-version 0.96,
+       am, mir, msgr, xenl,
+       colors#8, cols#80, lines#24, pairs#64,
+       bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[J, cr=^M,
+       csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
+       cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
+       el=\E[K, el1=\E[1K, home=\E[H, ht=^I, ich=\E[%p1%d@,
+       il=\E[%p1%dL, il1=\E[L, ind=^J, invis=\E[8m, kbs=\177,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
+       kdch1=\E[3~, kend=\E[4~, khome=\E[1~, kich1=\E[2~,
+       knp=\E[6~, kpp=\E[5~, op=\E[39;49m, rc=\E8, rev=\E[7m,
+       ri=\EM, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+       sc=\E7, setab=\E[%p1%'('%+%dm, setaf=\E[%p1%{30}%+%dm,
+       sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m,
+       sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m,
+       u6=\E[%i%d;%dR, u7=\E[6n,
+
 # Entries for use by the `screen' program by Juergen Weigert,
 # Michael Schroeder, Oliver Laumann.  The screen and
 # screen-w entries came with version 3.7.1.  The screen2 and screen3 entries
@@ -4140,7 +4969,7 @@ eterm|gnu emacs term.el terminal emulation,
 # tested with screen 3.09.08
 screen|VT 100/ANSI X3.64 virtual terminal,
        OTbs, OTpt, am, km, mir, msgr, xenl, G0,
-       colors#8, cols#80, it#8, lines#24, pairs#64,
+       colors#8, cols#80, it#8, lines#24, ncv@, pairs#64, U8#1,
        acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
        clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=^M,
@@ -4166,7 +4995,8 @@ screen|VT 100/ANSI X3.64 virtual terminal,
 # The bce and status-line entries are from screen 3.9.13 (and require some
 # changes to .screenrc).
 screen-bce|VT 100/ANSI X3.64 virtual terminal with bce,
-       bce, use=screen,
+       bce,
+       ech@, use=screen,
 screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line,
        dsl=\E_\E\\, fsl=\E\\, tsl=\E_, use=screen,
 
@@ -4219,13 +5049,20 @@ screen-256color-bce-s|GNU Screen with 256 colors, BCE, and status line,
 #       if the terminal is wide (132 cols or more)).  If even this
 #       entry cannot be found, "vt100" is used as a substitute.
 #
+# Notwithstanding the manpage, screen uses its own notion of the termcap
+# and some keys from "screen.<term>" are ignored.  Here is an entry which
+# covers those (tested with screen 4.00.02) -TD
+screen+fkeys|function-keys according to screen,
+       kend=\E[4~, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kfnd@,
+       khome=\E[1~, kslt@,
+#
 # Here are a few customized entries which are useful -TD
 #
 # Notes:
 # (a)  screen does not support invis.
 # (b)  screen's implementation of bw is incorrect according to tack.
 # (c)  screen appears to hardcode the strings for khome/kend, making it
-#      necessary to override the "use=" clause's values.
+#      necessary to override the "use=" clause's values (screen+fkeys).
 # (d)  screen sets $TERMCAP to a termcap-formatted copy of the 'screen' entry,
 #      which is NOT the same as the terminfo screen.<term>.
 # (e)  when screen finds one of these customized entries, it sets $TERM to
@@ -4237,24 +5074,79 @@ screen-256color-bce-s|GNU Screen with 256 colors, BCE, and status line,
 #      translation.  They are suppressed here to show what is tested by tack.
 screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm,
        bce@, bw,
-       invis@, kIC@, kNXT@, kPRV@, kend=\E[4~, khome=\E[1~, meml@,
-       memu@,
+       invis@, kIC@, kNXT@, kPRV@, meml@, memu@,
        sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m,
-       use=xterm-new,
+       use=screen+fkeys, use=xterm-new,
 # xterm-r6 does not really support khome/kend unless it is propped up by
 # the translations resource.
 screen.xterm-r6|screen customized for X11R6 xterm,
-       bw, use=xterm-r6,
+       bw, use=screen+fkeys, use=xterm-r6,
 # Color applications running in screen and TeraTerm do not play well together
 # on Solaris because Sun's curses implementation gets confused.
 screen.teraterm|disable ncv in teraterm,
        ncv#127,
        acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
-       use=screen,
+       use=screen+fkeys, use=screen,
+# Other terminals
+screen.rxvt|screen in rxvt,
+       bw, XT,
+       cvvis@, flash@, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+       kcuu1=\EOA, use=screen+fkeys, use=vt100+enq,
+       use=rxvt+pcfkeys, use=vt220+keypad, use=screen,
+screen.Eterm|screen in Eterm,
+       use=screen+fkeys, use=Eterm,
+screen.mrxvt|screen in mrxvt,
+       use=screen+fkeys, use=mrxvt,
+screen.vte|screen in any VTE-based terminal,
+       use=screen+fkeys, use=vte,
+screen.gnome|screen in GNOME Terminal,
+       use=screen+fkeys, use=gnome,
+screen.konsole|screen in KDE console window,
+       use=screen+fkeys, use=konsole,
 # fix the backspace key
 screen.linux|screen in linux console,
        bw,
-       kbs=\177, kcbt@, use=screen,
+       kbs=\177, kcbt@, use=screen+fkeys, use=screen,
+screen.mlterm|screen in mlterm,
+       use=screen+fkeys, use=mlterm,
+
+# The default "screen" entry is reasonably portable, but not optimal for the
+# most widely-used terminal emulators.  The "bce" capability is supported in
+# screen since 3.9.13, and when used, will require fewer characters to be sent
+# to the terminal for updates.
+#
+# If you are using only terminals which support bce, then you can use this
+# feature in your screen configuration.
+#
+# Adding these lines to your ".screenrc" file will allow using these customized
+# entries:
+#      term screen-bce
+#      bce on
+#      defbce on
+screen-bce.xterm-new|screen optimized for modern xterm,
+       bce,
+       ech@, use=screen.xterm-new,
+screen-bce.rxvt|screen optimized for rxvt,
+       bce,
+       ech@, use=screen.rxvt,
+screen-bce.Eterm|screen optimized for Eterm,
+       bce,
+       ech@, use=screen.Eterm,
+screen-bce.mrxvt|screen optimized for mrxvt,
+       bce,
+       ech@, use=screen.mrxvt,
+screen-bce.gnome|screen optimized for GNOME-Terminal,
+       bce,
+       ech@, use=screen.gnome,
+screen-bce.konsole|screen optimized for KDE console window,
+       bce,
+       ech@, use=screen.konsole,
+screen-bce.linux|screen optimized for linux console,
+       bce,
+       ech@, use=screen.linux,
+screen-bce.mlterm|screen optimized for mlterm,
+       bce,
+       ech@, use=screen.mlterm,
 
 screen-w|VT 100/ANSI X3.64 virtual terminal with 132 cols,
        cols#132, use=screen,
@@ -4324,18 +5216,18 @@ screen3|older VT 100/ANSI X3.64 virtual terminal,
 # sequences for setting the window-title.  So you must use tsl and fsl in
 # pairs, since the latter ends the string that is loaded to the window-title.
 ncsa-m|ncsa-vt220-8|NCSA Telnet 2.6 for Macintosh in vt220-8 mode,
-       am, hs, km, mir, msgr, xenl,
+       am, km, mir, msgr, xenl,
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
        clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
-       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M,
-       dsl=\E]0;\007, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0,
-       flash=\E[?5h\E[?5l, fsl=^G, home=\E[H, ht=^I, hts=\EH,
-       ich=\E[%p1%d@, if=/usr/share/tabset/vt100,
-       il=\E[%p1%dL, il1=\E[L, ind=\n$<150*>,
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J,
+       el=\E[K, el1=\E[1K, enacs=\E)0, flash=\E[?5h\E[?5l,
+       home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@,
+       if=/usr/share/tabset/vt100, il=\E[%p1%dL, il1=\E[L,
+       ind=\n$<150*>,
        is2=\E7\E[r\E[m\E[?7h\E[?1;4;6l\E[4l\E8\E>, kbs=^H,
        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
        kdch1=\E[4~, kend=\E[5~, kf1=\E[17~, kf10=\E[28~,
@@ -4349,8 +5241,8 @@ ncsa-m|ncsa-vt220-8|NCSA Telnet 2.6 for Macintosh in vt220-8 mode,
        rs2=\E7\E[r\E8\E[m\E[?7h\E[?1;4;6l\E[4l\E>, sc=\E7,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;,
        sgr0=\E[m\E(B, smacs=\E(0, smam=\E[?7h, smcup=\E7,
-       smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g, tsl=\E]0;,
-       u8=\E[?62;1;6c, use=ansi+enq,
+       smir=\E[4h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+       u8=\E[?62;1;6c, use=xterm+sl, use=ansi+enq,
 ncsa|NCSA Telnet 2.7 for Macintosh in vt220-8 mode,
        use=ncsa-m, use=klone+color,
 ncsa-ns|NCSA Telnet 2.7 for Macintosh in vt220-8 mode,
@@ -4468,10 +5360,10 @@ sun-il|Sun Microsystems console with working insert-line,
        kf10=\E[233z, kf11=\E[234z, kf12=\E[235z, kf2=\E[225z,
        kf3=\E[226z, kf4=\E[227z, kf5=\E[228z, kf6=\E[229z,
        kf7=\E[230z, kf8=\E[231z, kf9=\E[232z, khome=\E[214z,
-       knp=\E[222z, kopt=\E[194z, kpp=\E[216z, kres=\E[193z,
-       kund=\E[195z, rev=\E[7m, rmso=\E[m, rmul@, rs2=\E[s,
-       sgr=\E[0%?%p1%p3%|%t;7%;m, sgr0=\E[m, smso=\E[7m,
-       u8=\E[1t, u9=\E[11t,
+       kich1=\E[247z, knp=\E[222z, kopt=\E[194z, kpp=\E[216z,
+       kres=\E[193z, kund=\E[195z, rev=\E[7m, rmso=\E[m, rmul@,
+       rs2=\E[s, sgr=\E[0%?%p1%p3%|%t;7%;m, sgr0=\E[m,
+       smso=\E[7m, u8=\E[1t, u9=\E[11t,
 # On some versions of CGSIX framebuffer firmware (SparcStation 5), <il1>/<il>
 # flake out on the last line.  Unfortunately, without them the terminal has no
 # way to scroll.
@@ -4481,6 +5373,10 @@ sun-cgsix|sun-ss5|Sun SparcStation 5 console,
 sun|sun1|sun2|Sun Microsystems Inc. workstation console,
        use=sun-il,
 
+sun+sl|Sun Workstation window status line,
+       hs,
+       dsl=\E]l\E\\, fsl=\E\\, tsl=\E]l,
+
 # From: <john@ucbrenoir>  Tue Sep 24 13:14:44 1985
 sun-s|Sun Microsystems Workstation window with status line,
        hs,
@@ -4514,14 +5410,32 @@ sun-type4|Sun Workstation console with type 4 keyboard,
 # Most of the current references to sun-color are from users wondering why this
 # is the default on install.  Details from reading the wscons manpage, adding
 # cub, etc., here (rather than in the base sun-il entry) since it is not clear
-# when those were added -TD
+# when those were added -TD (2005-05-28)
+#
+# According to wscons manpage, color is supported only on IA systems.
+# Sun's terminfo entry documents bold and smul/rmul capabilities, but wscons
+# does not list these.  It also sets ncv#3, however that corresponds to
+# underline and standout.
+#
+# Since the documentation and terminfo do not agree, see also current code at
+# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/io/tem_safe.c
+#
+# That (actually a different driver which "supports" sun-color) also supports
+# these features:
+#      vpa=\E[%i%p1%dd
+#      hpa=\E[%i%p1%d`
+#      cbt=\E[Z
+#      dim=\E[2m
+#      blink=\E[5m
+# It supports bold, but not underline -TD (2009-09-19)
 sun-color|Sun Microsystems Workstation console with color support (IA systems),
-       colors#8, pairs#64,
+       colors#8, ncv#3, pairs#64,
        cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
-       cuu=\E[%p1%dA, home=\E[H, op=\E[m\E[p, setab=\E[4%p1%dm,
-       setaf=\E[3%p1%dm,
+       cuu=\E[%p1%dA, home=\E[H, op=\E[0m, rs2=\E[s,
+       setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
        setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m,
+       sgr=\E[0%?%p1;1%;%?%p3%;7%;m, sgr0=\E[m, smso=\E[1m,
        use=sun,
 
 #### Iris consoles
@@ -4730,7 +5644,7 @@ news29|news28-a|sony vt100 emulator 29 lines,
 nwp511|nwp-511|nwp-511 vt100,
        OTbs, OTpt, am, xenl,
        cols#80, lines#24,
-       clear=\E[;H\E[2J$<20/>, cuf1=\E[C,
+       clear=\E[;H\E[2J$<20/>, cub1=\E[D, cud1=\E[B, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A$<2/>, dl1=\E[M,
        ed=\E[J$<30/>, el=\E[K$<3/>,
        flash=\E[?5h\0\0\0\0\0\0\0\0\0\0\0\0\0\E[?5l,
@@ -4792,26 +5706,7 @@ dtterm|CDE desktop terminal,
 #### Non-Unix Consoles
 #
 
-### EMX termcap.dat compatibility modes
-#
-# Keypad:      Home=\0G        Up=\0H  PrPag=\0I
-#              ka1,kh          kcuu1           kpp,ka3
-#
-#              Left=\0K        5=\0L           Right=\0M
-#              kcub1           kb2             kcuf1
-#
-#              End=\0O         Down=\0P        NxPag=\0Q
-#              kc1,kend        kcud1           kc3,knp
-#
-#              Ins=\0R         Del=\0S
-#              kich1           kdch1
-#
-# On keyboard with 12 function keys,
-#      shifted f-keys: F13-F24
-#      control f-keys: F25-F36
-#      alt f-keys:     F37-F48
-# The shift/control/alt keys do not modify each other, but alt overrides both,
-# and control overrides shift.
+#### EMX termcap.dat compatibility modes
 #
 # Also (possibly only EMX, so we don't put it in ansi.sys, etc): set the
 # no_color_video to inform the application that standout(1), underline(2)
@@ -4819,19 +5714,7 @@ dtterm|CDE desktop terminal,
 emx-base|DOS special keys,
        bce, bw,
        it#8, ncv#71,
-       bel=^G, ka1=\0G, ka3=\0I, kb2=\0L, kbs=^H, kc1=\0O, kc3=\0Q,
-       kcbt=\0^O, kcub1=\0K, kcud1=\0P, kcuf1=\0M, kcuu1=\0H,
-       kdch1=\0S, kend=\0O, kf1=\0;, kf10=\0D, kf11=\0\205,
-       kf12=\0\206, kf13=\0T, kf14=\0U, kf15=\0V, kf16=\0W,
-       kf17=\0X, kf18=\0Y, kf19=\0Z, kf2=\0<, kf20=\0[, kf21=\0\\,
-       kf22=\0], kf23=\0\207, kf24=\0\210, kf25=\0\^, kf26=\0_,
-       kf27=\0`, kf28=\0a, kf29=\0b, kf3=\0=, kf30=\0c, kf31=\0d,
-       kf32=\0e, kf33=\0f, kf34=\0g, kf35=\0\211, kf36=\0\212,
-       kf37=\0h, kf38=\0i, kf39=\0j, kf4=\0>, kf40=\0k, kf41=\0l,
-       kf42=\0m, kf43=\0n, kf44=\0o, kf45=\0p, kf46=\0q,
-       kf47=\0\213, kf48=\0\214, kf5=\0?, kf6=\0@, kf7=\0A, kf8=\0B,
-       kf9=\0C, khome=\0G, kich1=\0R, knp=\0Q, kpp=\0I,
-       use=ansi.sys,
+       bel=^G, use=ansi.sys,
 
 # Except for the "-emx" suffixes, these are as distributed with EMX 0.9b,
 # a Unix-style environment used on OS/2.  (Note that the suffix makes some
@@ -4962,7 +5845,7 @@ cygwin|ansi emulation for Cygwin,
        rmacs=\E[10m, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
        rmpch=\E[10m, rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]R,
        sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
-       sgr=\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,
+       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;11%;m,
        sgr0=\E[0;10m, smacs=\E[11m, smcup=\E7\E[?47h,
        smir=\E[4h, smpch=\E[11m, smso=\E[7m, smul=\E[4m, tsl=\E];,
        vpa=\E[%i%p1%dd, use=vt102+enq,
@@ -4997,9 +5880,9 @@ cygwinDBG|Debug Version for Cygwin,
        rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E[10m, rmir=\E[4l,
        rmso=\E[m, rmul=\E[m, rs1=\Ec\E]R, sc=\E7,
        setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
-       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m,
+       sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p7%t;8%;%?%p9%t;12%;m,
        sgr0=\E[0;10m, smacs=\E[11m, smir=\E[4h, smso=\E[7m,
-       smul=\E[4m, tbc=\E[2g, vpa=\E[%i%p1%dd, use=vt102+enq,
+       smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, use=vt102+enq,
 
 # Key definitions:
 # The encodings for unshifted arrow keys, F1-F12, Home, Insert, etc.  match the
@@ -5243,7 +6126,7 @@ pcmw|PC running Microsoft Works,
        ht=^I, hts=\EH$<2/>, ind=\ED$<5/>, is2=\E[1;24r\E[24;1H,
        kbs=^H, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, nel=\r\ED$<5/>,
-       rc=\E8, rev=\E[7m$<2/>, rf=/usr/share/lib/tabset/vt100,
+       rc=\E8, rev=\E[7m$<2/>, rf=/usr/share/tabset/vt100,
        ri=\EM$<5/>, rmso=\E[m$<2/>, rmul=\E[m$<2/>,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
        sgr0=\E[m$<2/>, smso=\E[7m$<2/>, smul=\E[4m$<2/>,
@@ -5262,7 +6145,7 @@ pcmw|PC running Microsoft Works,
 interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color,
        am, bw, msgr,
        colors#8, cols#80, lines#25, ncv#3, pairs#64,
-       acsc=`\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\,\021+^P0\333p\304r\304y\363z\362{\343|\330}\234,
+       acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
        bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[2J, cub=\E[%p1%dD,
        cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC,
        cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
@@ -5288,7 +6171,7 @@ interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with colo
        rmcup=\E[2b\E[u\r\E[K, rmso=\E[m, rmul=\E[m, rs1=\Ec,
        sc=\E[s, setab=\E[4%p1%dm, setaf=\E[3%p1%dm,
        setb=\E[%p1%{40}%+%dm, setf=\E[%p1%{30}%+%dm,
-       sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[1m, smul=\E[4m,
+       sgr0=\E[0m, smcup=\E[s\E[1b, smso=\E[7m, smul=\E[4m,
 
 opennt-35|ntconsole-35|OpenNT-term35 compatible with color,
        lines#35, use=opennt,
@@ -5386,7 +6269,7 @@ altos2|alt2|altos-2|altos II,
 #      :cC=^Al\r:cD=^Am\r:cE=^An\r:cF=^Ao\r:
 #      :XU=^Aq\r:XD=^Ar\r:XR=^As\r:XL=^At\r:\
 #      :HL=^AP\r:SP=\E[i:\
-#      :IS=\E[@:DE=\E[P:IL=\E[L:NS=\E[S:PS=\E[T:\
+#      :IS=\E[@:DE=\E[P:IL=\E[L:NS=\E[S:PS=\E[T:
 altos3|altos5|alt3|alt5|altos-3|altos-5|altos III or V,
        blink=\E[5p, ri=\EM, sgr0=\E[p, use=altos2,
 altos4|alt4|altos-4|altos IV,
@@ -5601,7 +6484,7 @@ hp2626|hp2626a|hp2626p|hp 2626,
        da, db,
        lm#0, pb#19200,
        ed=\ED\EJ$<500>\EC, indn=\E&r%p1%dD, ip=$<4>,
-       is2=\E&j@\r, rin=\E&r%p1%dU, use=hp+pfk+cr,
+       is2=\E&j@\r, rin=\E&r%p1%dU, use=hp+pfk-cr,
        use=hp+labels, use=scrhp,
 
 # This entry is for sysline. It allocates a 23 line window with
@@ -5802,7 +6685,7 @@ hp2621b-kx-p|hp 2621b with new keyboard & printer,
 hp2622|hp2622a|hp 2622,
        da, db,
        lm#0, pb#19200,
-       is2=\E&dj@\r, use=hp+pfk+cr, use=hp+labels, use=scrhp,
+       is2=\E&dj@\r, use=hp+pfk-cr, use=hp+labels, use=scrhp,
 
 # The 2623 is a 2622 with extra graphics hardware.
 hp2623|hp2623a|hp 2623,
@@ -5960,10 +6843,10 @@ hp9837|hp98720|hp98721|HP 9000/300 workstations,
 hp9845|HP 9845,
        OTbs, am, da, db, eo, mir, xhp,
        cols#80, lines#21,
-       OTbc=\ED, clear=\EH\EJ, cuf1=\EC, cup=\E&a%p2%2dc%p1%2dY,
-       cuu1=\EA, dch1=\EP, dl1=\EM, ed=\EJ, el=\EK,
-       if=/usr/share/tabset/std, il1=\EL, rmir=\ER, rmso=\E&d@,
-       smir=\EQ, smso=\E&dB,
+       OTbc=\ED, clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC,
+       cup=\E&a%p2%2dc%p1%2dY, cuu1=\EA, dch1=\EP, dl1=\EM,
+       ed=\EJ, el=\EK, if=/usr/share/tabset/std, il1=\EL,
+       rmir=\ER, rmso=\E&d@, smir=\EQ, smso=\E&dB,
 # From: Charles A. Finnell of MITRE <finnell@mitre.org>, developed 07SEP90
 # (hp98550: replaced /usr/share/tabset/9837 with std because <it#8>,<hts=\E1>;
 # added empty <acsc> to avoid warnings re <smacs>/<rmacs> --esr)
@@ -7630,8 +8513,8 @@ tvi9065|televideo 9065,
        rmxon=^N, rs1=\EC\EDF\E[0;0v\E[8;1v\E[=65l,
        rs2=\E.b\E[10;20v\E[14;1v\E[3;0v\E[7;0v\E[=11.h\E[=12.h\E[=13.h\E[=14.h\E[=15l\E[=20h\E[=60l\E[=61h\E[=9l\E[=10l\E[=21l\E[=23l\E[=3l\E_40\E_50\En\Ew\Ee \Ex0\0\0\Ex1\0\0\Ex2\0\0\Ex3\0\0\Ex4\0\0\E1,
        rs3=\E[=19h\E.3\E9\E0O\0\0\0\0\0\E0o\0\0\0\0\0\E0J\177\0\0\0\0,
-       sgr=\EG0%?%p1%t\EGt%;%?%p2%t\EG8%;%?%p3%t\EG4%;%?%p4%t\EG2%;%?%p5%t\EGp%;%?%p6%t\EG\,%;%?%p7%t\EG1%;%?%p9%t\E$%e\E%%%;,
-       sgr0=\EG0, smacs=\E$, smam=\E=7h, smcup=\E.2, smdc=\Er,
+       sgr=\EG0%?%p1%t\EGt%;%?%p2%t\EG8%;%?%p3%t\EG4%;%?%p4%t\EG2%;%?%p5%t\EGp%;%?%p6%t\EG\,%;%?%p7%t\EG1%;%?%p8%t\E&%;%?%p9%t\E$%e\E%%%;,
+       sgr0=\EG0\E%, smacs=\E$, smam=\E=7h, smcup=\E.2, smdc=\Er,
        smir=\Eq, smln=\E[4;2v, smso=\EGt, smul=\EG8, smxon=^O,
        tbc=\E3, tsl=\E[4;1v\E_30, uc=\EG8\EG0,
 
@@ -8004,7 +8887,7 @@ wy100|wyse 100,
 wy120|wyse120|wy150|wyse150|Wyse 120/150,
        am, bw, hs, km, mc5i, mir, msgr, xon,
        cols#80, it#8, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45,
-       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+       acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>,
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>,
@@ -8083,7 +8966,7 @@ wy120-w-vb|wy120-wvb|wyse120-wvb|wy150-w-vb|wyse150-w-vb|Wyse 120/150 132-column
 wy60|wyse60|Wyse 60,
        am, bw, hs, km, mc5i, mir, msgr,
        cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#45,
-       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+       acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<100>,
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
@@ -8252,7 +9135,7 @@ wy99a-ansi|Wyse WY-99GT in ansi mode (US PC keyboard),
 wy99f|wy99fgt|wy-99fgt|Wyse WY-99GT (int'l PC keyboard),
        am, bw, hs, km, mc5i, mir, msgr, xon,
        cols#80, it#8, lines#25, wsl#46,
-       acsc='x+y.wi~_vj(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G,
+       acsc='x+y.w_vi~j(k'l&m%n)o9q*s8t-u.v\,w+x=, bel=^G,
        blink=\EG2, cbt=\EI, civis=\E`0, clear=\E'\E(\032,
        cnorm=\E`4\E`1, cr=^M, cub1=^H, cud1=\Ej, cuf1=^L,
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K,
@@ -8304,7 +9187,7 @@ wy99fa|wy99fgta|wy-99fgta|Wyse WY-99GT (US PC keyboard),
 wy160|wyse160|Wyse 160,
        am, bw, hs, km, mc5i, mir, msgr,
        cols#80, lh#1, lines#24, lw#8, nlab#8, wsl#38,
-       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+       acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<30>,
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<5>,
@@ -8612,7 +9495,7 @@ wy185-wvb|wyse185-wvb|wyse 185+flash+132 cols,
 wy325|wyse325|Wyse epc,
        am, bw, hs, mc5i, mir,
        cols#80, lh#1, lines#24, lw#8, nlab#8, pb#9601, wsl#45,
-       acsc=+/\,.0[iha2fxgqh1jYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
+       acsc=+/\,.0[a2fxgqh1ihjYk?lZm@nEqDtCu4vAwBx3yszr{c~~,
        bel=^G, blink=\EG2, cbt=\EI, civis=\E`0, clear=\E+$<50>,
        cnorm=\E`1, cr=^M, cub1=^H, cud1=^J, cuf1=^L,
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW$<7>,
@@ -9059,7 +9942,7 @@ wy100q|Wyse 100 for Quotron,
 kermit|standard kermit,
        OTbs,
        cols#80, lines#24,
-       clear=\EE, cub1=^H, cuf1=\EC,
+       clear=\EE, cub1=^H, cud1=\EB, cuf1=\EC,
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
        el=\EK, home=\EH, is2=K0 Standard Kermit  9-25-84\n,
        kcub1=^H, kcud1=^J, kcuf1=^L, kcuu1=^K, khome=^^,
@@ -9398,7 +10281,7 @@ att5410v1|att4410v1|tty5410v1|AT&T 4410/5410 80 columns - version 1,
        pln=\E[%p1%d;00q%p2%:-16s, rc=\E8, rev=\E[7m, ri=\EM,
        rmacs=^O, rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y,
        sc=\E7,
-       sgr=\E[0%?%p1%p5%|%t;2%;%?%p2%p6%|%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p1%p5%|%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smso=\E[7m, smul=\E[4m,
        tsl=\E7\E[25;%p1%{1}%+%dH,
 
@@ -9496,7 +10379,7 @@ att4415|tty5420|att5420|AT&T 4415/5420 80 cols,
        pln=\E[%p1%d;0;0;0q%p2%:-16.16s, prot=\EV,
        rin=\E[%p1%dF, rmam=\E[?7l, rmir=\E[4l,
        rmkx=\E[19;0j\E[21;1j\212, rmln=\E|,
-       sgr=\E[0%?%p1%p5%|%t;2%;%?%p2%p6%|%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p1%p5%|%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p8%t\EV%;%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smam=\E[?7h, smir=\E[4h,
        smkx=\E[19;1j\E[21;4j\Eent, smln=\E~, tbc=\E[3g,
        tsl=\E7\E[25;%p1%{8}%+%dH, vpa=\E[%p1%{1}%+%dd,
@@ -9544,14 +10427,14 @@ att5420_2|AT&T 5420 model 2 80 cols,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        blink=\E[5m, cbt=\E[1Z, clear=\EH\EJ, cnorm=\E[11;0j,
        cr=\EG, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
-       cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C,
-       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cvvis=\E[11;1j,
-       dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
-       dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J, el=\E[0K,
-       el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8, home=\E[H,
-       hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
-       ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dE,
-       invis=\E[8m,
+       cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC, cuf1=\E[1C,
+       cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[1A,
+       cvvis=\E[11;1j, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
+       dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%ds\E[%p1%dD, ed=\E[0J,
+       el=\E[0K, el1=\E[1K, flash=\E[?5h$<200>\E[?5l, fsl=\E8,
+       home=\E[H, hpa=\E[%p1%{1}%+%dG, ht=^I, hts=\EH,
+       ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J,
+       indn=\E[%p1%dE, invis=\E[8m,
        is1=\E[0;23r\Ex\Ey\E[2;0j\E[3;3j\E[4;0j\E[5;0j\E[6;0j\E[7;0j\E[8;0j\E[9;1j\E[10;0j\E[15;0j\E[16;1j\E[19;0j\E[20;1j\E[29;0j\E[1;24r,
        kbeg=\Et, kbs=^H, kcbt=\E[Z, kclr=\E[2J, kcub1=\E[D,
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[P, kdl1=\E[M,
@@ -9702,7 +10585,7 @@ att5425|tty5425|att4425|AT&T 4425/5425,
        rev=\E[7m, ri=\EM, rin=\E[%p1%dF, rmacs=^O, rmam=\E[?7l,
        rmir=\E[4l, rmkx=\E[21;0j\E[25;1j\212, rmln=\E|,
        rmso=\E[m, rmul=\E[m, rs2=\Ec\E[?3l\E[2;0y, sc=\E7,
-       sgr=\E[0%?%p1%p5%|%t;2%;%?%p2%p6%|%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p5%p6%|%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%p6%|%t;7%;%?%p7%t;8%;m%?%p8%t\EV%;%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smam=\E[?7h, smir=\E[4h,
        smkx=\E[21;1j\E[25;4j\Eent\E~, smln=\E~, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, tsl=\E7\E[25;%p1%{8}%+%dH,
@@ -9724,7 +10607,7 @@ att4426|tty4426|teletype 4426S,
        bel=^G, bold=\E[5m, clear=\E[H\E[2J\E[1U\E[H\E[2J\E[1V,
        cr=^M, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB, cud1=\E[B,
        cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
-       cuu=\E[%p1%dA, cuu1=\EA, dch=\E[%p1%dP, dch1=\EP,
+       cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EP,
        dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[0K, home=\E[H,
        hpa=\E[%p1%dG, ht=^I, hts=\E1, ich=\E[%p1%d@, ich1=\E\^,
        il=\E[%p1%dL, il1=\EL, ind=^J, indn=\E[%p1%dS,
@@ -9752,7 +10635,7 @@ att510a|bct510a|AT&T 510A Personal Terminal,
        acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z,
        civis=\E[11;0|, clear=\E[H\E[J, cnorm=\E[11;3|, cr=^M,
-       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[1B,
+       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
        cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
        cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP,
        dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J,
@@ -9785,7 +10668,7 @@ att510d|bct510d|AT&T 510D Personal Terminal,
        acsc=+g\,h-f.e`bhrisjjkkllmmnnqqttuuvvwwxx{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[2;7m, cbt=\E[Z,
        clear=\E[H\E[J, cnorm=\E[11;3|, cr=^M, cub=\E[%p1%dD,
-       cub1=^H, cud=\E[%p1%dB, cud1=\E[1B, cuf=\E[%p1%dC,
+       cub1=^H, cud=\E[%p1%dB, cud1=\E[B, cuf=\E[%p1%dC,
        cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
        cuu1=\E[A, cvvis=\E[11;2|, dch=\E[%p1%dP, dch1=\E[P,
        dim=\E[2m, dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[0K,
@@ -10099,7 +10982,7 @@ att620|AT&T 620; 80 column; 98key keyboard,
        ri=\EM, rin=\E[%p1%dT, rmacs=\E(B\017, rmam=\E[?7l,
        rmir=\E[4l, rmln=\E[2p, rmso=\E[m, rmul=\E[m,
        rs2=\Ec\E[?3l, sc=\E7,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p3%p1%|%t;7%;%?%p7%t;8%;m%?%p9%t\E)0\016%e\E(B\017%;,
        sgr0=\E[m\E(B\017, smacs=\E)0\016, smam=\E[?7h,
        smir=\E[4h, smln=\E[p, smso=\E[7m, smul=\E[4m,
        tsl=\E7\E[25;%i%p1%dx,
@@ -10159,7 +11042,7 @@ att630|AT&T 630 windowing terminal,
        mc5=\E[?5i, nel=^M^J, pfx=\E[%p1%d;%p2%l%dq%p2%s, rc=\E8,
        rev=\E[7m, ri=\EM, rin=\E[%p1%dT, rmir=\E[4l, rmso=\E[m,
        rmul=\E[m, rs2=\Ec, sc=\E7,
-       sgr=\E[0%?%p2%t;4%;%?%p1%p3%|%p4%|%p5%|%t;7%;m,
+       sgr=\E[0%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%p4%|%t;7%;m,
        sgr0=\E[m, smir=\E[4h, smso=\E[7m, smul=\E[4m,
 att630-24|5630-24|5630DMD-24|630MTG-24|AT&T 630 windowing terminal 24 lines,
        lines#24, use=att630,
@@ -10809,23 +11692,23 @@ aaa+unk|aaa-unk|ann arbor ambassador (internal - don't use this directly),
        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m,
        rmkx=\EP`>y~[[J`8xy~[[A`4xy~[[D`6xy~[[C`2xy~[[B\E\\,
        rmm=\E[>52l, rmso=\E[m, rmul=\E[m, sc=\E7,
-       sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
+       sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m,
        sgr0=\E[m,
        smkx=\EP`>z~[[J`8xz~[[A`4xz~[[D`6xz~[[C`2xz~[[B\E\\,
-       smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[2g,
+       smm=\E[>52h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        vpa=\E[%p1%{1}%+%dd,
 
 aaa+rv|ann arbor ambassador in reverse video,
        blink=\E[5;7m, bold=\E[1;7m, invis=\E[7;8m,
        is1=\E[7m\E7\E[H\E9\E8, rev=\E[m, rmso=\E[7m, rmul=\E[7m,
        rs1=\E[H\E[7m\E[J$<156>,
-       sgr=\E[%?%p1%p3%|%!%t7;%;%?%p2%t4;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m,
+       sgr=\E[%?%p2%t4;%;%?%p4%t5;%;%?%p6%t1;%;%?%p1%p2%|%p3%!%t7;%;%?%p7%t8;%;m\016,
        sgr0=\E[7m\016, smso=\E[m, smul=\E[4;7m,
 # Ambassador with the DEC option, for partial vt100 compatibility.
 aaa+dec|ann arbor ambassador in dec vt100 mode,
        acsc=aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}},
        csr=\E[%i%p1%d;%p2%dr, enacs=\E(0, rmacs=^N,
-       sgr=\E[%?%p1%p3%|%!%t7;%;%?%p2%t4;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m%?%p9%t\017%e\016%;,
+       sgr=\E[%?%p2%t4;%;%?%p4%t5;%;%?%p6%t1;%;%?%p1%p3%|%!%t7;%;%?%p7%t8;%;m%?%p9%t\017%e\016%;,
        smacs=^O,
 aaa-18|ann arbor ambassador/18 lines,
        lines#18,
@@ -10992,7 +11875,7 @@ aaa-rv-unk|ann arbor unknown type,
        blink=\E[5;7m, bold=\E[1;7m, home=\E[H, invis=\E[7;8m,
        is1=\E[7m\E7\E[H\E9\E8, rev=\E[m, rmso=\E[7m, rmul=\E[7m,
        rs1=\E[H\E[7m\E[J,
-       sgr=\E[%?%p1%!%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m,
+       sgr=\E[%?%p6%t1;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p1%!%t7;%;%?%p7%t8;%;m,
        sgr0=\E[7m, smso=\E[m, smul=\E[4;7m,
 
 #### Applied Digital Data Systems (adds)
@@ -11182,7 +12065,7 @@ adds980|a980|adds consul 980,
 cit80|cit-80|citoh 80,
        OTbs, am,
        cols#80, lines#24,
-       clear=\E[H\EJ, cr=^M, cub1=^H, cuf1=\E[C,
+       clear=\E[H\EJ, cr=^M, cub1=^H, cud1=\E[B, cuf1=\E[C,
        cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, ed=\EJ, el=\EK, ff=^L,
        ind=^J, is2=\E>, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
        kcuu1=\EOA, rmkx=\E[?1l\E>, smkx=\E[?1h\E=,
@@ -11191,9 +12074,9 @@ cit80|cit-80|citoh 80,
 cit101|citc|C.itoh fast vt100,
        OTbs, am, xenl,
        cols#80, lines#24,
-       bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cuf1=\E[C,
-       cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, cvvis=\E7\E[U,
-       dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
+       bel=^G, clear=\E[H\E[2J, cnorm=\E[V\E8, cub1=^H, cud1=\E[B,
+       cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
+       cvvis=\E7\E[U, dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
        flash=\E[?5h$<200/>\E[?5l, ich1=\E[@, il1=\E[L,
        is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[3g\E[>5g,
        kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
@@ -11211,9 +12094,9 @@ cit101e|C. Itoh CIT-101e,
        OTbs, OTpt, am, mir, msgr,
        cols#80, it#8, lines#24,
        acsc=, clear=\E[H\E[J, cnorm=, csr=\E[%i%p1%2d;%p2%2dr,
-       cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A,
-       cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M, ed=\E[J,
-       el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L,
+       cub1=\E[D, cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%2d;%p2%2dH,
+       cuu1=\E[A, cvvis=\E[?1l\E[?4l\E[?7h, dch1=\E[P, dl1=\E[M,
+       ed=\E[J, el=\E[K, if=/usr/share/tabset/vt100, il1=\E[L,
        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\EOT,
        kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOm, kf6=\EOl,
        kf7=\EOM, kf8=\EOn, rc=\E8, ri=\EM, rmacs=^O, rmir=\E[4l,
@@ -11834,7 +12717,7 @@ oc100|oconcept|c100-1p|old 1 page concept 100,
 #       and mc5= should use the \E[?4i and \E[?5i strings instead).
 
 hds200|Human Designed Systems HDS200,
-       am, bw, eslok, hs, km, mc5i, mir, msgr, xenl, xon,
+       am, bw, eslok, hs, km, mir, msgr, xenl, xon,
        cols#80, it#8, lines#24, lm#0,
        acsc=``aaffggjjkkllmmnnooqqssttuuvvwwxx~~, bel=^G,
        blink=\E[0;5m, bold=\E[0;1m, cbt=\E[Z, civis=\E[6+{,
@@ -11863,13 +12746,12 @@ hds200|Human Designed Systems HDS200,
        kf51=^\051\r, kf52=^\052\r, kf53=^\053\r, kf6=^\006\r,
        kf7=^\007\r, kf8=^\008\r, kf9=^\009\r, khome=\E[H,
        kind=\E[T, knp=\E[U, kpp=\E[V, kri=\E[S, ll=\E[H\E[A,
-       mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\E[E, rc=\E8,
-       rev=\E[0;7m, ri=\EM, rmacs=^O, rmir=\E[4l, rmso=\E[m\017,
-       rmul=\E[m\017, sc=\E7,
+       nel=\E[E, rc=\E8, rev=\E[0;7m, ri=\EM, rmacs=^O, rmir=\E[4l,
+       rmso=\E[m\017, rmul=\E[m\017, sc=\E7,
        sgr=\E[0%?%p1%p6%O%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%O%t;7%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smir=\E[4h, smso=\E[0;1;7m,
        smul=\E[0;4m, tbc=\E[3g, tsl=\E[2!w\E[%i%p1%dG,
-       vpa=\E[%i%p1%dd,
+       vpa=\E[%i%p1%dd, use=ansi+pp,
 
 # <ht> through <el> included to specify padding needed in raw mode.
 # (avt-ns: added empty <acsc> to suppress a tic warning --esr)
@@ -11896,10 +12778,11 @@ avt-ns|concept avt no status line,
        ri=\EM$<4>, rmacs=\016$<1>, rmcup=\E[w\E2\r\n,
        rmir=\E[4l, rmkx=\E[!z\E[0;2u, rmso=\E[7!{, rmul=\E[4!{,
        sc=\E7,
-       sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
-       sgr0=\E[m, smacs=\017$<1>, smcup=\E[=4l\E[1;24w\E2\r,
-       smir=\E[4h, smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m,
-       tbc=\E[2g, vpa=\E[%p1%{1}%+%dd,
+       sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;%?%p8%t99;%;m%?%p5%t\E[1!{%;%?%p9%t\017%e\016%;$<1>,
+       sgr0=\E[m\016$<1>, smacs=\017$<1>,
+       smcup=\E[=4l\E[1;24w\E2\r, smir=\E[4h,
+       smkx=\E[1!z\E[0;3u, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+       vpa=\E[%p1%{1}%+%dd,
 avt-rv-ns|concept avt in reverse video mode/no status line,
        flash=\E[=205l$<200>\E[=205h, is1=\E[=103l\E[=205h,
        use=avt-ns,
@@ -12109,7 +12992,7 @@ dgmode+color|Color info for Data General D470C terminals in DG mode,
 dgunix+ccc|Configurable color info for DG D430C terminals in DG-UNIX mode,
        bce, ccc,
        colors#52, ncv#53, pairs#26,
-       initp=\036RG0%p1%02X%p2%{256}%*%{1001}%/%02X%p3%{256}%*%{1001}%/%02X%p4%{256}%*%{1001}%/%02X%p5%{256}%*%{1001}%/%02X%p6%{256}%*%{1001}%/%02X%p7%{256}%*%{1001}%/%02X,
+       initp=\036RG0%p1%02X%p2%{255}%*%{1000}%/%02X%p3%{255}%*%{1000}%/%02X%p4%{255}%*%{1000}%/%02X%p5%{255}%*%{1000}%/%02X%p6%{255}%*%{1000}%/%02X%p7%{255}%*%{1000}%/%02X,
        oc=\036RG01A00FF00000000\036RG01B00000000FF00\036RG01C007F00000000\036RG01D000000007F00,
        op=\036RF4831A\036RF2E31B\036RF1D31C\036RF3F31D,
        scp=\036RG2%p1%02X,
@@ -12118,7 +13001,7 @@ dgunix+ccc|Configurable color info for DG D430C terminals in DG-UNIX mode,
 dg+ccc|Configurable color info for DG D430C terminals in DG mode,
        bce, ccc,
        colors#52, ncv#53, pairs#26,
-       initp=\036RG0%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c%p2%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p3%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p4%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p5%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p6%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p7%{256}%*%{1001}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c,
+       initp=\036RG0%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c%p2%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p3%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p4%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p5%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p6%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c%p7%{255}%*%{1000}%/%Pa%ga%{16}%/%{48}%+%c%ga%{16}%m%{48}%+%c,
        oc=\036RG01\:00??00000000\036RG01;00000000??00\036RG01<007?00000000\036RG01=000000007?00,
        op=\036RF4831\:\036RF2>31;\036RF1=31<\036RF3?31=,
        scp=\036RG2%p1%{16}%/%{48}%+%c%p1%{16}%m%{48}%+%c,
@@ -12154,11 +13037,11 @@ dg200|data general dasher 200,
 dg210|dg-ansi|Data General 210/211,
        am,
        cols#80, lines#24,
-       OTnl=\E[B, clear=\E[2J, cud1=\E[B, cup=\E[%i%p1%d;%p2%dH,
-       cuu1=\E[A, ed=\E[J, el=\E[K, home=\E[H, kcub1=\E[D,
-       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
-       nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m, smso=\E[7;m,
-       smul=\E[4;m,
+       OTnl=\E[B, clear=\E[2J, cub1=\E[D, cud1=\E[B, cuf1=\E[C,
+       cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, ed=\E[J, el=\E[K,
+       home=\E[H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+       khome=\E[H, nel=\r\E[H\E[A\n, rmso=\E[0;m, rmul=\E[0;m,
+       smso=\E[7;m, smul=\E[4;m,
 # From: Peter N. Wan <ihnp4!gatech!gacsr!wan>
 # courtesy of Carlos Rucalde of Vantage Software, Inc.
 # (dg211: this had <cup=\020%r%.%>., which was an ancient termcap hangover.
@@ -12181,7 +13064,6 @@ dg450|dg6134|data general 6134,
 # backspace on all terminals.  This is not so in DG mode.
 # (dg460-ansi: removed obsolete ":kn#6:"; also removed ":mu=\EW:", on the
 # grounds that there is no matching ":ml:"
-# fixed garbled ":k9=\E[00\:z:" capability -- esr)
 dg460-ansi|Data General Dasher 460 in ANSI-mode,
        OTbs, am, msgr, ul,
        cols#80, it#8, lines#24,
@@ -12192,10 +13074,12 @@ dg460-ansi|Data General Dasher 460 in ANSI-mode,
        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
        kf0=\E[001z, kf1=\E[002z, kf2=\E[003z, kf3=\E[004z,
        kf4=\E[005z, kf5=\E[006z, kf6=\E[007z, kf7=\E[008z,
-       kf8=\E[009z, kf9=\E[010z, khome=\E[H, lf0=f1, lf1=f2, lf2=f3,
-       lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10, rev=\E[7m,
-       ri=\E[T, rmso=\E[m, rmul=\E[05, sgr0=\E[m, smso=\E[7m,
-       smul=\E[4m,
+       kf8=\E[009z, kf9=\E[00\:z, khome=\E[H, lf0=f1, lf1=f2,
+       lf2=f3, lf3=f4, lf4=f5, lf5=f6, lf6=f7, lf7=f8, lf9=f10,
+       mc0=\E[i, rev=\E[7m, ri=\E[T, rmso=\E[m, rmul=\E[05,
+       sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p5%t;2%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m,
+       sgr0=\E(B\E[m, smso=\E[7m, smul=\E[4m, u6=\E[%d;%dR,
+       u7=\E[6n, u8=\E[5n, u9=\E[0n,
 # From: Wayne Throop <mcnc!rti-sel!rtp47!throopw> (not official)
 # Data General 605x
 # Ought to work for a Model 6242, Type D210 as well as a 605x.
@@ -12242,7 +13126,7 @@ d210|d214|Data General DASHER D210 series,
        cuu=\E[%p1%dA, cuu1=\E[A, dim=\E[2m, ed=\E[J, el=\E[K,
        el1=\E[1K, home=\E[H, ind=^J, is1=\E[<0;<1;<4l,
        ll=\E[H\E[A, nel=^J, rev=\E[7m, rmso=\E[m, rmul=\E[m,
-       sgr=\E[%?%p1%p3%|%p6%|%t7;%;%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;m,
+       sgr=\E[%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;%?%p1%p3%|%p6%|%t7;%;m,
        sgr0=\E[m, smso=\E[2;7m, smul=\E[4m, use=dgkeys+7b,
 
 # DASHER D210 series terminals in DG mode.
@@ -12444,7 +13328,7 @@ d410|d411|d460|d461|Data General DASHER D410/D460 series,
        is2=\E[3;2;2;1;1;1v\E(B\E)4\017, mc4=\E[4i, mc5=\E[5i,
        ri=\EM, rmacs=\E)4\017, rs1=\Ec\E[<2h,
        rs2=\E[4;0;2;1;1;1v\E(B\E)4,
-       sgr=\E[%?%p1%p3%|%p6%|%t7;%;%?%p4%t5;%;%?%p2%p6%|%t4;%;%?%p1%p5%|%t2;%;m\E)%?%p9%t6\016%e4\017%;,
+       sgr=\E[%?%p1%t2;7%;%?%p3%t7;%;%?%p4%t5;%;%?%p2%t4;%;%?%p1%p5%|%t2;%;%?%p6%t4;7;%;m\E)%?%p9%t6\016%e4\017%;,
        sgr0=\E[m\E)4\017, smacs=\E)6\016, use=d211,
 
 # Initialization string 2 sets:
@@ -12614,12 +13498,12 @@ d430c-unix-sr-ccc|d430-unix-sr-ccc|Data General D430C in DG-UNIX mode with scrol
 #
 d470c|d470|Data General DASHER D470C,
        is1=\E[<0;<1;<2;<4l\E[1;1;80w\E[1;6;<2h,
-       sgr=\E[%?%p1%p3%|%p6%|%t7;%{1}%e%{0}%;%PR%?%p4%t5;%{1}%e%{0}%;%PB%?%p2%p6%|%t4;%{1}%e%{0}%;%PU%?%p1%p5%|%t2;%{1}%e%{0}%;%PDm\E)%?%p9%t6\016%e4\017%;,
+       sgr=\E[%?%p3%t7;%;%?%p4%t5;%;%?%p2%t4;%;%?%p6%t4;7;%;%?%p1%t2;7;%;%?%p5%t2;%;m\E)%?%p9%t6\016%e4\017%;,
        use=dg+color, use=d460,
 
 d470c-7b|d470-7b|Data General DASHER D470C in 7 bit mode,
        is1=\E[<0;<1;<2;<4l\E[1;1;80w\E[1;6;<2h,
-       sgr=\E[%?%p1%p3%|%p6%|%t7;%{1}%e%{0}%;%PR%?%p4%t5;%{1}%e%{0}%;%PB%?%p2%p6%|%t4;%{1}%e%{0}%;%PU%?%p1%p5%|%t2;%{1}%e%{0}%;%PDm%?%p9%t\016%e\017%;,
+       sgr=\E[%?%p3%t7;%;%?%p4%t5;%;%?%p2%t4;%;%?%p6%t4;7;%;%?%p1%t2;7;%;%?%p5%t2;%;m%?%p9%t\016%e\017%;,
        use=dg+color, use=d460-7b,
 
 # Initialization string 2 sets:
@@ -13030,7 +13914,7 @@ f200vi-w|Liberty Freedom 200 - 132 cols for vi,
 go140|graphon go-140,
        OTbs,
        cols#80, it#8, lines#24,
-       clear=\E[H\E[2J$<10/>, cub1=^H, cuf1=\E[C,
+       clear=\E[H\E[2J$<10/>, cub1=^H, cud1=\E[B, cuf1=\E[C,
        cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M,
        ed=\E[J$<10/>, el=\E[K, ht=^I,
        if=/usr/share/tabset/vt100, il1=\E[L,
@@ -13175,7 +14059,7 @@ superbeeic|super bee with insert char,
 sb2|sb3|fixed superbee,
        xsb@, use=superbee,
 
-####  Beehive Medical Electronics
+#### Beehive Medical Electronics
 #
 # Steve Seymour <srseymour@mindspring.com> writes (Wed, 03 Feb 1999):
 # Regarding your question though; Beehive terminals weren't made by Harris.
@@ -13996,7 +14880,7 @@ icl6404|kds7372|icl6402|kds6402|ICL 6404 aka Kokusai Display Systems 7372,
        is1=\EC\E.3\EDF\EV1\Eg\E[0ZZ, nel=^_, rev=\E[4ZZ,
        rmir=\Er, rmso=\E[%gh%{4}%^%Ph%gh%dZZ,
        rmul=\E[%gh%{8}%^%Ph%gh%dZZ, rs2=\Eo1,
-       sgr=\E[%{0}%?%p1%t%{4}%|%;%?%p2%t%{8}%|%;%?%p3%t%{4}%|%;%?%p4%t%{2}%|%;%?%p7%t%{1}%|%;ZZ,
+       sgr=\E[%'0'%?%p1%t%'8'%|%;%?%p2%t%'8'%|%;%?%p3%t%'4'%|%;%?%p4%t%'2'%|%;%?%p7%t%'1'%|%;%cZZ,
        sgr0=\E[0ZZ, smir=\Eq, smso=\E[8ZZ, smul=\E[8ZZ, tbc=\E3,
 icl6404-w|kds7372-w|ICL 6404 aka Kokusai Display Systems 7372 132 cols,
        rs2=\Eo1, use=icl6404,
@@ -14026,9 +14910,9 @@ intext|Interactive Systems Corporation modified owl 1200,
 intext2|intextii|INTERACTIVE modified owl 1251,
        am, bw, ul,
        cols#80, lines#24, xmc#0,
-       bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, cud1=\E[B,
-       cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P,
-       dl1=\E[M, ed=\E[J, el=\E[K,
+       bel=^G, cbt=\E[Z, clear=\E[H\E[2J, cr=^M, cub1=\E[D,
+       cud1=\E[B, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A,
+       dch1=\E[P, dl1=\E[M, ed=\E[J, el=\E[K,
        flash=\E[;;;;;;;;;2;;u$<200/>\E[;;;;;;;;;1;;u,
        hpa=\E[%p1%{1}%+%dG, ht=^I, ich1=\E[@, il1=\E[L, ind=\E[S,
        kbs=^H, kcub1=\ED\r, kcud1=\EB\r, kcuf1=\EC\r, kcuu1=\EA\r,
@@ -14313,7 +15197,7 @@ prism8-w|p8-w|P8-W|MDC Prism-8 in 132 column mode,
 # (esr: commented out <smacs>/<rmacs> because there's no <acsc>)
 #
 prism9|p9|P9|MDC Prism-9 in ANSII mode,
-       am, bw, hs, mc5i, msgr, xenl, xon,
+       am, bw, hs, msgr, xenl, xon,
        cols#80, it#8, lines#24, vt#3, wsl#72,
        bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[<4l,
        clear=^L, cnorm=\E[<4h, cr=^M, csr=\E[%i%p1%d;%p2%d%%v,
@@ -14329,14 +15213,15 @@ prism9|p9|P9|MDC Prism-9 in ANSII mode,
        kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
        kf18=\E[32~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
-       khome=\E[H, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=^M^J,
-       prot=\E[32%{, rc=\E[%z, rep=\E[%p2%db%p1%c, rev=\E[7m,
-       ri=\E[L, rmir=\E[4l, rmso=\E[27m, rmul=\E[24m,
+       khome=\E[H, nel=^M^J, prot=\E[32%{, rc=\E[%z,
+       rep=\E[%p2%db%p1%c, rev=\E[7m, ri=\E[L, rmir=\E[4l,
+       rmso=\E[27m, rmul=\E[24m,
        rs2=\E[&p\E[<12l\E F\E[3g\E[9;17;25;33;41;49;57;65;73 N,
        sc=\E[%y,
-       sgr=\E[%{0}%?%p1%p3%|%t%{7}%+%;%?%p2%t%{2}%+%;%?%p4%t%{5}%+%;%?%p6%t%{1}%+%;m%?%p8%t\E[%{32}%+%d%%{%;%?%p9%t\016%e\017%;,
+       sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;m%?%p8%t\E[32%%{%;%?%p9%t\016%e\017%;,
        sgr0=\E[0m\017, smir=\E[4h, smso=\E[7m, smul=\E[4m,
-       tbc=\E[2g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
+       tbc=\E[3g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
+       use=ansi+pp,
 
 # p9-w: Prism-9 in 132 column mode
 # --------------------------------
@@ -14700,7 +15585,7 @@ ncr260vt100an|NCR 2900_260 vt100 with ansi kybd,
        rmkx=\E[?1l\E>, rmso=\E[0m, rmul=\E[0m,
        rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>,
        sc=\E7,
-       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>,
+       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<20>,
        sgr0=\E[0m\017$<20>, smacs=^N, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[1;7m, smul=\E[4m, tbc=\E[3g,
        tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>, use=vt220+keypad,
@@ -14757,7 +15642,7 @@ ncr260vt200an|NCR 2900_260 vt200 with ansi kybd,
        rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
        rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E(B\E)0\017\E[2J\E[1;1H\E>$<200>,
        sc=\E7,
-       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>,
+       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<20>,
        sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h,
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
        tbc=\E[3g, tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>,
@@ -14813,7 +15698,7 @@ ncr260vt300an|NCR 2900_260 vt300 with ansi kybd,
        rmul=\E[24m,
        rs2=\E[!p\E[?7;19;67h\E[?1;3;4l\E[1;0%w\E(B\E)0\017\E[2J\E[1;1H\E>$<200>,
        sc=\E7,
-       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$<20>,
+       sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;$<20>,
        sgr0=\E[0m\017$<20>, smacs=\016$<20>, smam=\E[?7h,
        smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
        tbc=\E[3g, tsl=\E[2$~\E[1$}, vpa=\E[%p1%dd$<40>,
@@ -15210,7 +16095,7 @@ ncr7901|ncr 7901 model,
 ndr9500|nd9500|Newbury Data 9500,
        am, bw, hs, mc5i, mir, msgr, ul, xon,
        cols#80, lines#24, wsl#79,
-       acsc=qKnImAjDwNuLtMvOlBkCxJ, bel=^G, cbt=\EI, civis=\E.0,
+       acsc=jDkClBmAnIqKtMuLvOwNxJ, bel=^G, cbt=\EI, civis=\E.0,
        clear=\E;, cnorm=\E.1, cr=^M, cub1=^H, cud1=^V, cuf1=^L,
        cup=\E=%p1%{32}%+%c%p2%{32}%+%c, cuu1=^K, dch1=\EW,
        dim=\E), dl1=\ER, dsl=\Eh, ed=\EY, el=\ET,
@@ -15227,7 +16112,7 @@ ndr9500|nd9500|Newbury Data 9500,
        pfloc=\E|%{48}%p1%+%c2%p2\031,
        pfx=\E|%{48}%p1%+%c1%p2\031, prot=\E), ri=\Ej,
        rmacs=\E%%, rmir=\Er, rmso=\E(, rmxon=^N,
-       sgr=\E%%\E(%?%p1%p5%p8%|%|%t\E)%;%?%p9%t\E$%;,
+       sgr=\EG0\E%%%%\E(%?%p1%p5%p8%|%|%t\E)%;%?%p9%t\E$%;,
        sgr0=\EG0\E%%\E(, smacs=\E$, smir=\Eq, smso=\E), smxon=^O,
        tbc=\E3, tsl=\Eg\Ef\011%p1%{32}%+%c, .kbs=^H,
 
@@ -15330,8 +16215,8 @@ uts30|sperry uts30 with cp/m@1R1,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\ER, clear=^L,
        cnorm=\ES, cr=^M, csr=\EU%p1%{32}%+%c%p2%{32}%+%c,
-       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\EB,
-       cuf=\E[%p1%dC, cuf1=\EC, cup=\E[%i%p1%d;%p2%dH,
+       cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
+       cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
        cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\EM,
        dl=\E[%p1%dM, dl1=\EL, ed=\E[J, el=\E[K, fsl=^M, home=\E[H,
        ht=^I, ich=\E[%p1%d@, ich1=\EO, il=\E[%p1%dL, il1=\EN,
@@ -15406,8 +16291,8 @@ dt110|Tandy DT-110 emulating ansi,
        cols#80, lines#24,
        acsc=jjkkllmmnnqqttuuvvwwxx, bel=^G, civis=\E[?25l,
        clear=\E[H\E[2J, cnorm=\E[?25h, cr=^M,
-       csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[0B, cuf1=\E[C,
-       cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[0A, dch1=\E[0P,
+       csr=\E[%i%p1%d;%p2%dr, cub1=^H, cud1=\E[B, cuf1=\E[C,
+       cup=\010\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[0P,
        dl1=\E[0M, ed=\E[0J, el=\E[0K, enacs=\E(B\E)0, home=\E[H,
        ht=^I, ich1=\E[0@, il1=\E[0L, ind=^J, is2=\E[?3l\E)0\E(B,
        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kend=\E[K,
@@ -15558,7 +16443,7 @@ tek4105|tektronix 4105,
        OTbs, am, mir, msgr, ul, xenl, xt,
        cols#79, it#8, lines#29,
        acsc=, bel=^G, blink=\E[=3;<7m, bold=\E[=7;<4m, cbt=\E[Z,
-       clear=\E[2J\E[H, cr=^M, cud1=\E[1B, cuf1=\E[1C,
+       clear=\E[2J\E[H, cr=^M, cub1=\E[1D, cud1=\E[1B, cuf1=\E[1C,
        cup=\E[%i%p1%2d;%p2%2dH, cuu1=\E[1A, dch1=\E[1P,
        dim=\E[=1;<6m, dl1=\E[1M, ed=\E[J, el=\E[K, home=\E[H, ht=^I,
        il1=\E[1L, ind=\E[S, invis=\E[=6;<5, is1=\E%!1\E[m,
@@ -15677,6 +16562,15 @@ tek4106brl|tek4107brl|tek4109brl|Tektronix 4106 4107 or 4109,
        sc=\E7, sgr0=\E[m, smacs=^N, smcup=\E[?6l, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[7;42m, smul=\E[4m, tbc=\E[3g,
 
+# Tektronix 4107/4109 interpret 4 modes using "\E%!" followed by a code:
+# 0 selects Tek mode, i.e., \E%!0
+# 1 selects ANSI mode
+# 2 selects ANSI edit-mode
+# 3 selects VT52 mode
+#
+# One odd thing about the description (which has been unchanged since the 90s)
+# is that the cursor addressing is using VT52 mode, and a few others use the
+# VT52's non-CSI versions of ANSI, e.g., \EJ.
 tek4107|tek4109|tektronix terminals 4107 4109,
        OTbs, am, mir, msgr, ul, xenl, xt,
        cols#79, it#8, lines#29,
@@ -15686,9 +16580,9 @@ tek4107|tek4109|tektronix terminals 4107 4109,
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\E%!3,
        dim=\E%!1\E[<0m$<2>\E%!0, ed=\EJ, el=\EK, ht=^I, ind=^J,
        kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
-       rev=\E%!1\E[7m$<2>\E%0, ri=\EI,
+       rev=\E%!1\E[7m$<2>\E%!0, ri=\EI,
        rmso=\E%!1\E[m$<2>\E%!0, rmul=\E%!1\E[m$<2>\E%!0,
-       sgr=\E%%!1\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m$<2>\E%%!0,
+       sgr=\E%%!1\E[%?%p1%t;7;5%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t<0%;%?%p6%t;1%;m$<2>\E%%!0,
        sgr0=\E%!1\E[m$<2>\E%!0, smso=\E%!1\E[7;5m$<2>\E%!0,
        smul=\E%!1\E[4m$<2>\E%!0,
 # Tektronix 4207 with sysline.  In the ancestral termcap file this was 4107-s;
@@ -15723,9 +16617,9 @@ otek4112|o4112-nd|otek4113|otek4114|old tektronix 4110 series,
 tek4112|tek4114|tektronix 4110 series,
        OTbs, am, db,
        cols#80, lines#34,
-       cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cuf1=\E[C,
-       cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P, dl1=\E[M,
-       ed=\E[0J, el=\E[0K, ich1=\E[@, il1=\E[L,
+       cbt=\E[Z, clear=\E[2J\E[0;0H, cub1=^H, cud1=\E[B,
+       cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu1=\EM, dch1=\E[P,
+       dl1=\E[M, ed=\E[0J, el=\E[0K, ich1=\E[@, il1=\E[L,
        ind=\E7\E[0;0H\E[M\E8, is2=\E3!1, ri=\E7\E[0;0H\E[L\E8,
        rmso=\E[m, rmul=\E[m, sgr0=\E[m, smso=\E[7m, smul=\E[4m,
 tek4112-nd|4112 not in dialog area,
@@ -15788,8 +16682,8 @@ tek4115|newer tektronix 4115 entry with more ANSI capabilities,
        kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H,
        rep=%p1%c\E[%p2%{1}%-%db, rev=\E[7m, rmam=\E[?7l,
        rmso=\E[m, rmul=\E[m,
-       sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
-       sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[2g,
+       sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;%?%p7%t8;%;m,
+       sgr0=\E[m, smam=\E[?7h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        vpa=\E[%p1%{1}%+%dd,
 # The tek4125 emulates a vt100 incorrectly - the scrolling region
 # command is ignored.  The following entry replaces <csr> with the needed
@@ -16048,7 +16942,7 @@ ibmpc|wy60-PC|wyse60-PC|IBM PC/XT running PC/IX,
        kf9=\250, khome=\E[H, kich1=\E[^H, knp=\E[U, kpp=\E[V,
        ll=\E[24;1H, nel=^M, rev=\E[7m, ri=\E[T\E[A,
        rin=\E[%p1%dT\E[%p1%dA, rmso=\E[m, rmul=\E[m,
-       sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m,
+       sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t30;40%;m,
        sgr0=\E[m, smso=\E[7m, smul=\E[4m,
 
 #### Apple II
@@ -16160,7 +17054,7 @@ apple-uterm|Ultraterm for Apple micros,
 # This entry assumes that you are using an apple with the UCSD Pascal
 # language card.  SYSTEM.MISCINFO is assumed to be the same as that
 # supplied with the standard apple except that screenwidth should be set
-# using SETUP to 80 columns.  Note that the right arrow in not mapped in
+# using SETUP to 80 columns.  Note that the right arrow is not mapped in
 # this termcap entry.  This is because that key, on the Apple, transmits
 # a ^U and would thus preempt the more useful "up" function of vi.
 #
@@ -16196,15 +17090,16 @@ apple-videx2|Apple II+ w/ Videx card (similar to Datamedia h1520),
 apple-videx3|vapple|Apple II with 80 col card,
        OTbs, am,
        cols#80, lines#24,
-       clear=\Ev, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
-       cuu1=\EA, el=\Ex, home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
-       kcuu1=\EA, kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!,
-       kf5=\E", kf6=\E#, kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH,
+       clear=\Ev, cub1=\ED, cud1=\EB, cuf1=\EC,
+       cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, el=\Ex,
+       home=\EH, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
+       kf0=\EP, kf1=\EQ, kf2=\ER, kf3=\E\s, kf4=\E!, kf5=\E", kf6=\E#,
+       kf7=\E$, kf8=\E%%, kf9=\E&, khome=\EH,
 #From: decvax!cbosgd!cbdkc1!mww Mike Warren via BRL
 aepro|Apple II+ running ASCII Express Pro--vt52,
        OTbs,
        cols#80, lines#24,
-       clear=\014$<300/>, cuf1=\EC,
+       clear=\014$<300/>, cub1=\ED, cud1=\EB, cuf1=\EC,
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\EJ,
        el=\EK, home=\EH,
 # UCSD addition: Yet another termcap from Brian Kantor's Micro Munger Factory
@@ -16276,17 +17171,102 @@ mac|macintosh|Macintosh with MacTerminal,
 mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
        cols#132, use=mac,
 
+# nsterm*|Apple_Terminal - AppKit Terminal.app
+#
+# Terminal.app is a Terminal emulator bundled with NeXT's NeXTStep and
+# OPENSTEP/Mach operating systems, and with Apple's Rhapsody, Mac OS X
+# Server and Mac OS X operating systems. There is also a
+# "terminal.app" in GNUStep, but I believe it to be an unrelated
+# codebase and I have not attempted to describe it here.
+#
+# For NeXTStep, OPENSTEP/Mach, Rhapsody and Mac OS X Server 1.0, you
+# are pretty much on your own. Use "nsterm-7-m" and hope for the best.
+# You might also try "nsterm-7" and "nsterm-old" if you suspect your
+# version supports color.
+#
+# To determine the version of Terminal.app you're using by running:
+#
+#     echo "$TERM_PROGRAM" "$TERM_PROGRAM_VERSION"
+#
+# For Apple_Terminal v200+, use "nsterm-16color" (a.k.a. "nsterm")
+#
+# For Apple_Terminal v71+/v100+, use "nsterm-bce".
+#
+# For Apple_Terminal v51+, use "nsterm-7-c" or "nsterm-7-c-s".
+#
+# For Apple_Terminal v41+, use "nsterm-old", or "nsterm-s".
+#
+# For all earlier versions (Apple_Terminal), try "nsterm-7-m"
+# (monochrome) or "nsterm-7" (color); "nsterm-7-m-s" and "nsterm-7-s"
+# might work too, but really you're on your own here since these
+# systems are very obsolete and I can't test them. I do welcome
+# patches, though :).
+
+# Other Terminals:
+#
+# For GNUstep_Terminal, you're probably best off using "linux" or
+# writing your own terminfo.
+
+# For MacTelnet, you're on your own. It's a different codebase, and
+# seems to be somewhere between "vt102", "ncsa" and "xterm-color".
+
+# For iTerm.app, see "iterm".
+
+#
 # The AppKit Terminal.app descriptions all have names beginning with
 # "nsterm". Note that the statusline (-s) versions use the window
 # titlebar as a phony status line, and may produce warnings during
-# compilation as a result ("tsl uses 0 parameters, expected 1".) Ignore
-# these warnings, or even ignore these entries entirely. Apps which
-# need to position the cursor or do other fancy stuff inside the status
-# line won't work with these entries. They're primarily useful for
-# programs like Pine which provide simple notifications in the status
-# line. Please note that non-ASCII characters don't work right in the
-# status line, since Terminal.app incorrectly interprets their Unicode
-# codepoints as MacRoman codepoints.
+# compilation as a result ("tsl uses 0 parameters, expected 1".)
+# Ignore these warnings, or even ignore these entries entirely. Apps
+# which need to position the cursor or do other fancy stuff inside the
+# status line won't work with these entries. They're primarily useful
+# for programs like Pine which provide simple notifications in the
+# status line. Please note that non-ASCII characters don't work right
+# in the status line, since Terminal.app incorrectly interprets their
+# Unicode codepoints as MacRoman codepoints (in earlier Mac OS X
+# versions) or only accepts status lines consisting entirely of
+# characters from the first 256 Unicode positions (including C1 but
+# not C0 or DEL.)
+#
+# The Mythology* of AppKit Terminal.app:
+#
+# In the days of NeXTSTep 0.x and 1.x there were two incompatible
+# bundled terminal emulators, Shell and Terminal. Scott Hess wrote a
+# shareware replacement for Terminal called "Stuart" which NeXT bought
+# and used as the basis for the Terminal.app in NeXTstep 2+,
+# OPENSTEP/Mach, Apple Rhapsody, Mac OS X Server 1.0, and Mac OS X. I
+# don't know the TERM_PROGRAM and TERM_PROGRAM_VERSION settings or
+# capabilities for the early versions, but I believe that the
+# TERM_PROGRAM_VERSION may have been reset at some point.
+#
+# The early versions were tailored to the NeXT character set. Sometime
+# after the Apple aquisition the encoding was swiched to MacRoman
+# (initally with serious altcharset bugs due to incomplete conversion
+# of the old NeXT code,) and then later to UTF-8. Alos sometime during
+# or just prior to the early days of Mac OS X, the Terminal grew ANSI
+# 8-color support (initially buggy when combined with attributes, but
+# that was later fixed.) More recently, around Mac OS X version 10.3
+# or so (Terminal.app v100+) xterm-like 16-color support was added. In
+# some versions (for instance 133-1 which shipped with Mac OS X
+# version 10.4) this suffered from the <bce> bug, but that seems to
+# have been fixed in Mac OS X version 10.5 (Terminal.app v240.2+).
+#
+# In the early days of Mac OS X the terminal was fairly buggy and
+# would routinely crash under load. Many of these bugs seem to have
+# been fixed around Mac OS X version 10.3 (Terminal.app v100+) but
+# some may still remain. This change seems to correspond to
+# Terminal.app reporting "xterm-color" as $TERM rather than "vt100" as
+# it did previously.
+#
+# * This may correspond with what actually happened, but I don't
+#   know. It is based on guesswork, hearsay, private correspondence,
+#   my faulty memory, and the following online sources and references:
+#
+# [1] "Three Scotts and a Duane" by Simson L. Garfinkel
+# http://www.nextcomputers.org/NeXTfiles/Articles/NeXTWORLD/93.8/93.8.Dec.Community1.html
+#
+# [2] NeXTSTEP entry from Wikipedia, the free encyclopedia
+# https://secure.wikimedia.org/wikipedia/en/wiki/Nextstep
 #
 # * Renamed the AppKit Terminal.app entry from "Apple_Terminal" to
 #   "nsterm" to comply with the name length and case conventions and
@@ -16376,7 +17356,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
 #     export TERM
 #     if [ :"$TERM_PROGRAM_VERSION" = :41 ]
 #     then
-#         TERM="nsterm"
+#         TERM="nsterm-old"
 #     else
 #         TERM="nsterm-c-7"
 #     fi
@@ -16387,7 +17367,7 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
 # if ( $?TERM && $?TERM_PROGRAM && $?TERM_PROGRAM_VERSION) then
 #     if ( :"$TERM" == :"vt100" && :"$TERM_PROGRAM" == :"Apple_Terminal" ) then
 #          if ( :"$TERM_PROGRAM_VERSION" == :41 ) then
-#              setenv TERM "nsterm"
+#              setenv TERM "nsterm-old"
 #          else
 #              setenv TERM "nsterm-c-7"
 #          endif
@@ -16404,26 +17384,27 @@ nsterm+7|AppKit Terminal.app v41+ basic capabilities w/ASCII charset,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, el1=\E[1K,
        home=\E[H, ht=^I, hts=\EH, il=\E[%p1%dL, il1=\E[L, ind=^J,
-       kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
-       kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM, rmam=\E[?7l,
-       rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
+       invis=\E[8m, kbs=\177, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC,
+       kcuu1=\EOA, kent=\EOM, rc=\E8, rev=\E[7m, ri=\EM,
+       rmam=\E[?7l, rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m,
-       sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
+       sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, use=vt100+enq, use=vt100+pfkeys,
 
 nsterm+acs|AppKit Terminal.app v41+ basic capabilities w/VT100 alternate-charset,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        enacs=\E(B\E)0, rmacs=^O,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
-       smacs=^N, use=nsterm+7,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr0=\E[m\017, smacs=^N, use=nsterm+7,
 
 nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-charset,
-       acsc=0#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245+\335-\366\,\334.\377,
+       acsc=+\335\,\334-\366.\3770#`\327a\:f\241g\261h#i\360jjkkllmmnno\370p\370q\321rrssttuuvvwwxxy\262z\263{\271|\255}\243~\245,
        enacs=\E(B\E)0, rmacs=^O,
-       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;,
-       smacs=^N, use=nsterm+7,
+       sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       sgr0=\E[m\017, smacs=^N, use=nsterm+7,
 
+# compare with xterm+sl-twm
 nsterm+s|AppKit Terminal.app v41+ status-line (window titlebar) support,
        hs,
        wsl#50,
@@ -16483,7 +17464,7 @@ nsterm-m|AppKit Terminal.app v41+ w/MacRoman charset (monochrome),
 nsterm-m-s|AppKit Terminal.app v41+ w/MacRoman charset (monochrome w/statusline),
        use=nsterm+s, use=nsterm+mac,
 
-nsterm|Apple_Terminal|AppKit Terminal.app v41+ w/MacRoman charset (color),
+nsterm-old|AppKit Terminal.app v41+ w/MacRoman charset (color),
        use=nsterm+c41, use=nsterm+mac,
 
 nsterm-c|AppKit Terminal.app v51+ w/MacRoman charset (full color),
@@ -16495,17 +17476,66 @@ nsterm-s|AppKit Terminal.app v41+ w/MacRoman charset (color w/statusline),
 nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline),
        use=nsterm+s, use=nsterm+c, use=nsterm+mac,
 
+# In Mac OS X version 10.5 the format of the preferences has changed
+# and a new, more complex technique is needed, e.g.,
+#
+#       python -c 'import sys,objc;NSUserDefaults=objc.lookUpClass(
+#       "NSUserDefaults");ud=NSUserDefaults.alloc();
+#       ud.init();prefs=ud.persistentDomainForName_(
+#       "com.apple.Terminal");prefs["Window Settings"][
+#       prefs["Default Window Settings"]]["TerminalType"
+#       ]=sys.argv[1];ud.setPersistentDomain_forName_(prefs,
+#       "com.apple.Terminal")' nsterm-16color
+#
+# and it is still not settable from the preferences dialog. This is
+# tracked under rdar://problem/7365108 and rdar://problem/7365134
+# in Apple's bug reporter.
+nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
+       bw@, mir, npc,
+       civis=\E[?25l, cnorm=\E[?25h, dch=\E[%p1%dP, dch1=\E[P,
+       flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG,
+       ich=\E[%p1%d@, ich1=\E[@, kdch1=\E[3~, kend=\E[F,
+       kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
+       kf14=\E[26~, kf15=\E[28~, kf16=\E[29~, kf17=\E[31~,
+       kf18=\E[22~, kf19=\E[33~, kf20=\E[34~, kf5=\E[15~,
+       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\E[H,
+       knp=\E[6~, kpp=\E[5~, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
+       smcup=\E7\E[?47h, smir=\E[4h, vpa=\E[%i%p1%dd,
+       use=nsterm-c-s-acs,
 
+# The versions of Terminal.app in Mac OS X version 10.3.x seem to have
+# the background color erase bug. The newer version 240.2 in Mac OS X
+# version 10.5 does not.
+#
 # This entry is based on newsgroup comments by Alain Bench, Christian Ebert,
 # and D P Schreber comparing to nsterm-c-s-acs.
 #
-# D P Schreber notes that $TERM can be set in Terminal.app, e.g.,
-#      defaults write com.apple.Terminal TermCapString nsterm-c-s-acs
+# In Mac OS X version 10.4 and earlier, D P Schreber notes that $TERM
+# can be set in Terminal.app, e.g.,
+#
+#      defaults write com.apple.Terminal TermCapString nsterm-bce
+#
 # and that it is not set in Terminal's preferences dialog.
-nsterm-16color|AppKit Terminal.app v100.1.8 with MacOS X 10.3.9,
-       kdch1=\E[3~, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~,
-       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
-       knp=\E[6~, kpp=\E[5~, use=nsterm-c-s-acs,
+nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (bce),
+       bce, bw, use=nsterm-16color,
+
+# This is an alias which should always point to the "current" version
+nsterm|Apple_Terminal|AppKit Terminal.app,
+       use=nsterm-16color,
+
+# iTerm.app from http://iterm.sourceforge.net/ is an alternative (and
+# more featureful) terminal emulator for Mac OS X. It is similar
+# enough in capabilities to nsterm-16color that I have derived this
+# description from that one, but as far as I know they share no code.
+# Many of the features are user-configurable, but I attempt only to
+# describe the default configuration.
+#
+# NOTE: When tack tests (csr) + (nel) iTerm.app crashes, so (csr) is
+# disabled.
+iTerm.app|iTerm.app terminal emulator for Mac OS X,
+       bce, bw@, ccc@,
+       csr@, initc@, kend=\EOF, khome=\EOH, use=xterm+256color,
+       use=nsterm-16color,
 
 # xnuppc - Darwin PowerPC Console (a.k.a. "darwin")
 #
@@ -16615,7 +17645,7 @@ xnuppc+basic|Darwin PowerPC Console basic capabilities,
        rmul=\E[m, rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h,
        sc=\E7,
        sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m,
-       sgr0=\E[m\017, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
+       sgr0=\E[m, smam=\E[?7h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, use=vt100+keypad,
 
 xnuppc+c|Darwin PowerPC Console ANSI color support,
@@ -16816,42 +17846,6 @@ trs16|trs-80 model 16 console,
        lf7=f8, mc4=\E]+, mc5=\E]=, rmacs=\ERg, rmso=\ER@, sgr0=\ER@,
        smacs=\ERG, smso=\ERD,
 
-#### Atari ST
-#
-
-# From: Simson L. Garfinkel <simsong@media-lab.mit.edu>
-atari|atari st,
-       OTbs, am,
-       cols#80, it#8, lines#25,
-       clear=\EH\EJ, cub1=\ED, cud1=\EB, cuf1=\EC,
-       cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dl1=\EM,
-       ed=\EJ, el=\EK, ht=^I, il1=\EL, kcub1=\ED, kcud1=\EB,
-       kcuf1=\EC, kcuu1=\EA, ri=\EI, rmso=\Eq, sgr0=\Eq, smso=\Ep,
-# UniTerm terminal program for the Atari ST:  49-line VT220 emulation mode
-# From: Paul M. Aoki <aoki@ucbvax.berkeley.edu>
-uniterm|uniterm49|UniTerm VT220 emulator with 49 lines,
-       lines#49,
-       is2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;49r\E[49;1H,
-       use=vt220,
-# MiNT VT52 emulation. 80 columns, 25 rows.
-# MiNT is Now TOS, the operating system which comes with all Ataris now
-# (mainly Atari Falcon). This termcap is for the VT52 emulation you get
-# under tcsh/zsh/bash/sh/ksh/ash/csh when you run MiNT in `console' mode
-# From: Per Persson <pp@gnu.ai.mit.edu>, 27 Feb 1996
-st52|Atari ST with VT52 emulation,
-       am, km,
-       cols#80, lines#25,
-       bel=^G, civis=\Ef, clear=\EH\EJ, cnorm=\Ee, cr=^M, cub1=\ED,
-       cud1=\EB, cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c,
-       cuu1=\EA, dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL,
-       ind=^J, ka1=\E#7, ka3=\E#5, kb2=\E#9, kbs=^H, kc1=\E#1,
-       kc3=\E#3, kclr=\E#7, kcub1=\E#K, kcud1=\E#P, kcuf1=\E#M,
-       kcuu1=\E#H, kf0=\E#D, kf1=\E#;, kf2=\E#<, kf3=\E#=, kf4=\E#>,
-       kf5=\E#?, kf6=\E#@, kf7=\E#A, kf8=\E#B, kf9=\E#C, khome=\E#G,
-       kil1=\E#R, kind=\E#2, kri=\E#8, lf0=f10, nel=^M^J, rc=\Ek,
-       ri=\EI, rmcup=, rmso=\Eq, rs1=\Ez_\Eb@\EcA, sc=\Ej, sgr0=\Eq,
-       smcup=\Ee, smso=\Ep,
-
 #### Commodore Business Machines
 #
 # Formerly located in West Chester, PA; went spectacularly bust in 1994
@@ -17059,23 +18053,48 @@ osexec|Osborne executive,
 # even as single processes under SunOS and the Macintosh OS.
 #
 
+# See
+#      http://www.minix3.org/manpages/man4/console.4.html
+minix|minix console (v3),
+       acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
+       kdch1=\177, kend=\E[Y, kf0=\E[21~, kf1=\E[11~, kf10=\E[21~,
+       kf11=\E[11;2~, kf12=\E[12;2~, kf13=\E[13;2~,
+       kf14=\E[14;2~, kf15=\E[15;2~, kf16=\E[17;2~,
+       kf17=\E[18;2~, kf18=\E[19;2~, kf19=\E[20;2~, kf2=\E[12~,
+       kf20=\E[21;2~, kf21=\E[11;5~, kf22=\E[12;5~,
+       kf23=\E[13;5~, kf24=\E[14;5~, kf25=\E[15;5~,
+       kf26=\E[17;5~, kf27=\E[18;5~, kf28=\E[19;5~,
+       kf29=\E[20;5~, kf3=\E[13~, kf30=\E[21;5~, kf31=\E[11;6~,
+       kf32=\E[12;6~, kf33=\E[13;6~, kf34=\E[14;6~,
+       kf35=\E[15;6~, kf36=\E[17;6~, kf37=\E[18;6~,
+       kf38=\E[19;6~, kf39=\E[20;6~, kf4=\E[14~, kf40=\E[21;6~,
+       kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
+       kich1=\E[@, knp=\E[U, kpp=\E[V, lf0@, lf1@, lf2@, lf3@, lf4@, lf5@,
+       use=minix-3.0,
+
+minix-3.0|minix console (v3.0),
+       use=ecma+color, use=minix-1.7,
+
+# See
+#      http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html
 # This is the entry provided with minix 1.7.4, with bogus :ri: removed.
-minix|minix console (v1.7),
+minix-1.7|minix console (v1.7),
        am, xenl,
        cols#80, it#8, lines#25,
        bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M,
        cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
        cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
        cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
-       dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I,
-       ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J,
-       is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
-       kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U, kf3=\E[T, kf4=\E[S,
-       kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp, lf2=PgDn, lf3=Num +,
-       lf4=Num -, lf5=Num 5, nel=^M^J, rev=\E[7m, ri=\EM,
-       rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m,
+       dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, el1=\E[2K,
+       home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
+       il1=\E[L, ind=^J, is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B,
+       kcuf1=\E[C, kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U,
+       kf3=\E[T, kf4=\E[S, kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp,
+       lf2=PgDn, lf3=Num +, lf4=Num -, lf5=Num 5, nel=^M^J,
+       rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m,
+       smso=\E[7m, smul=\E[4m,
 # Corrected Jan 14, 1997 by Vincent Broman <broman@nosc.mil>
-minix-old|minix console (v1.5),
+minix-old|minix-1.5|minix console (v1.5),
        xon,
        cols#80, it#8, lines#25,
        bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M,
@@ -17094,7 +18113,7 @@ minix-old-am|minix console with linewrap,
        am, use=minix-old,
 
 pc-minix|minix console on an Intel box,
-       use=klone+acs, use=minix,
+       use=klone+acs, use=minix-3.0,
 
 # According to the Coherent 2.3 manual, the PC console is similar
 # to a z19. The differences seem to be (1) 25 lines, (2) no status
@@ -17481,7 +18500,7 @@ tws-generic|dku7102|Bull Questar tws terminals,
        rmul=\E[m, rs2=\E[?=h\Ec, s0ds=^O, s1ds=^N,
        sgr=\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, smacs=^N, smcup=\E[?>h\EPY99\:98\E\\,
-       smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[2g,
+       smir=\E[4h, smso=\E[0;7m, smul=\E[0;4m, tbc=\E[3g,
        tsl=\EPY99\:98\E\\\E[0;98v\E[2;7m,
 tws2102-sna|dku7102-sna|BULL Questar tws2102 for SNA,
        dsl=\E[0;98v\E[2J\E[v, fsl=\E[v, is3=\Eb, tsl=\E[0;98v,
@@ -17497,6 +18516,7 @@ dku7102-old|BULL Questar 200 DKU7102 (microcode version < 6),
        use=tws-generic,
 dku7202|BULL Questar 200 DKU7202 (colour/character attributes),
        blink=\E[0;2;4m, dim=\E[0;5m, ht=^I, is3=\E[?3h\Eb,
+       sgr=\E[0%?%p1%t;2;4;5;7%;%?%p3%t;7%;%?%p2%t;2%;%?%p4%t;2;4%;%?%p5%t;5%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        smso=\E[0;4;5;7m, smul=\E[0;2m, use=tws-generic,
 
 #=========================================================#
@@ -17576,7 +18596,7 @@ dku7202|BULL Questar 200 DKU7202 (colour/character attributes),
 
 # This entry covers BQ303, BQ306, BQ310, Q303, Q306, Q310
 bq300|Bull vt320 ISO Latin 1 80 columns terminal,
-       am, eo, eslok, hs, km, mc5i, mir, msgr, xenl, xon,
+       am, eo, eslok, hs, km, mir, msgr, xenl, xon,
        cols#80, it#8, lines#24, vt#3, wsl#80,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
@@ -17600,14 +18620,14 @@ bq300|Bull vt320 ISO Latin 1 80 columns terminal,
        kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~,
        khlp=\E[28~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
        krdo=\E[29~, kslt=\E[4~, lf1=pf1, lf2=pf2, lf3=pf3, lf4=pf4,
-       mc0=\E[i, mc4=\E[4i, mc5=\E[5i, nel=\EE, rc=\E8, rev=\E[7m,
-       ri=\EM, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?7h, rmir=\E[4l,
-       rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\E[!p,
-       rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0, sc=\E7,
+       nel=\EE, rc=\E8, rev=\E[7m, ri=\EM, rmacs=\E(B, rmam=\E[?7l,
+       rmcup=\E[?7h, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m,
+       rmul=\E[24m, rs1=\E[!p, rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0,
+       sc=\E7,
        sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;,
        sgr0=\E[0m\E(B, smacs=\E(0, smam=\E[?7h,
        smcup=\E[?7l\E[?1l\E(B, smir=\E[4h, smso=\E[7m,
-       smul=\E[4m, tbc=\E[3g, tsl=\E[1$}\E[2$~,
+       smul=\E[4m, tbc=\E[3g, tsl=\E[1$}\E[2$~, use=ansi+pp,
 bq300-rv|Bull vt320 reverse 80 columns,
        flash=\E[?5l$<50>\E[?5h,
        is2=\E[?2h\E[?3l\E[?5h\E[?7h\E[?8h\E>\E[?1l\E F\E[?42l\E[?4l,
@@ -17682,8 +18702,9 @@ bq300-8|Bull vt320 full 8 bits 80 columns,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\2335m, bold=\2331m, civis=\233?25l,
        clear=\233H\233J, cnorm=\233?25h, cr=^M,
-       csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cud=\233%p1%dB,
-       cuf=\233%p1%dC, cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA,
+       csr=\233%i%p1%d;%p2%dr, cub=\233%p1%dD, cub1=\2331D,
+       cud=\233%p1%dB, cud1=\2331B, cuf=\233%p1%dC, cuf1=\2331C,
+       cup=\233%i%p1%d;%p2%dH, cuu=\233%p1%dA, cuu1=\2331A,
        dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM,
        dsl=\2331$}\2332$~\n\2330$}, ech=\233%p1%dX, ed=\233J,
        el=\233K, el1=\2331K, enacs=\E(B\E)0,
@@ -17702,11 +18723,12 @@ bq300-8|Bull vt320 full 8 bits 80 columns,
        khlp=\23328~, kich1=\2332~, knp=\2336~, kpp=\2335~,
        krdo=\23329~, kslt=\2334~, lf1=pf1, lf2=pf2, lf3=pf3,
        lf4=pf4, mc0=\233i, mc4=\2334i, mc5=\2335i, nel=\EE, rc=\E8,
-       rev=\2337m, ri=\EM, rmacs=^O, rmam=\233?7l, rmcup=\233?7h,
-       rmir=\2334l, rmkx=\233?1l\E>, rmso=\23327m, rmul=\23324m,
-       rs1=\E[!p, rs2=\E[?3l, s0ds=\E(B, s1ds=\E(0, sc=\E7,
+       rev=\2337m, ri=\EM, rmacs=\E(B, rmam=\233?7l,
+       rmcup=\233?7h, rmir=\2334l, rmkx=\233?1l\E>,
+       rmso=\23327m, rmul=\23324m, rs1=\E[!p, rs2=\E[?3l,
+       s0ds=\E(B, s1ds=\E(0, sc=\E7,
        sgr=\233%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;,
-       sgr0=\2330m\E(B, smacs=^N, smam=\233?7h,
+       sgr0=\2330m\E(B, smacs=\E(0, smam=\233?7h,
        smcup=\233?7l\233?1l\E(B, smir=\2334h, smso=\2337m,
        smul=\2334m, tbc=\2333g, tsl=\2331$}\2332$~,
 bq300-8rv|Bull vt320 8-bit reverse mode 80 columns,
@@ -18224,19 +19246,19 @@ h19-us|h19us|h19-smul|heathkit w/keypad shifted/underscore cursor,
 h19|heath|h19-b|heathkit|heath-19|z19|zenith|heathkit h19,
        OTbs, am, eslok, hs, mir, msgr,
        cols#80, it#8, lines#24,
-       acsc=, bel=^G, clear=\EE, cnorm=\Ey4, cr=^M, cub1=^H, cud1=\EB,
-       cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA,
-       cvvis=\Ex4, dch1=\EN, ed=\EJ, el=\EK, fsl=\Ek\Ey5, home=\EH,
-       ht=^I, ind=^J, ip=<1.5/>, kbs=^H, kcub1=\ED, kcud1=\EB,
-       kcuf1=\EC, kcuu1=\EA, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV,
-       kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, khome=\EH, lf6=blue,
-       lf7=red, lf8=white, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq,
-       smacs=\EF, smir=\E@, smso=\Ep,
-       tsl=\Ej\Ex5\EY8%p1%{32}%+%c\Eo\Eo,
+       acsc=+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\^, bel=^G,
+       clear=\EE, cnorm=\Ey4, cr=^M, cub1=^H, cud1=\EB, cuf1=\EC,
+       cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, cvvis=\Ex4,
+       dch1=\EN, ed=\EJ, el=\EK, fsl=\Ek\Ey5, home=\EH, ht=^I, ind=^J,
+       ip=<1.5/>, kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC,
+       kcuu1=\EA, kf1=\ES, kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW,
+       kf6=\EP, kf7=\EQ, kf8=\ER, khome=\EH, lf6=blue, lf7=red,
+       lf8=white, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq, smacs=\EF,
+       smir=\E@, smso=\Ep, tsl=\Ej\Ex5\EY8%p1%{32}%+%c\Eo\Eo,
 h19-u|heathkit with underscore cursor,
        cnorm@, cvvis@, use=h19-b,
 h19-g|h19g|heathkit w/block cursor,
-       cnorm=\Ex4, use=h19-b,
+       cnorm=\Ex4, cvvis@, use=h19-b,
 alto-h19|altoh19|altoheath|alto-heath|alto emulating heathkit h19,
        lines#60,
        dl1=\EM, il1=\EL, use=h19,
@@ -18362,14 +19384,15 @@ z100|h100|z110|z-100|h-100|heath/zenith z-100 pc with color monitor,
 z100bw|h100bw|z110bw|z-100bw|h-100bw|heath/zenith z-100 pc,
        OTbs, OTpt, mir, msgr,
        OTkn#10, cols#80, it#8, lines#24,
-       acsc=, clear=\EE$<5*/>, cnorm=\Ey4, cub1=^H, cud1=\EB,
-       cuf1=\EC, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<1*/>,
-       cuu1=\EA, cvvis=\Ex4, dch1=\EN$<1*/>, dl1=\EM$<5*/>,
-       ed=\EJ, el=\EK, home=\EH, ht=^I, il1=\EL$<5*/>, kbs=^H,
-       kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA, kf0=\EJ, kf1=\ES,
-       kf2=\ET, kf3=\EU, kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER,
-       kf9=\EOI, khome=\EH, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq,
-       smacs=\EF, smir=\E@, smso=\Ep,
+       acsc=+h.kaiggjdkclfmenbozqas{tvutvuwsx`~\^,
+       clear=\EE$<5*/>, cnorm=\Ey4, cub1=^H, cud1=\EB, cuf1=\EC,
+       cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<1*/>, cuu1=\EA,
+       cvvis=\Ex4, dch1=\EN$<1*/>, dl1=\EM$<5*/>, ed=\EJ, el=\EK,
+       home=\EH, ht=^I, il1=\EL$<5*/>, kbs=^H, kcub1=\ED, kcud1=\EB,
+       kcuf1=\EC, kcuu1=\EA, kf0=\EJ, kf1=\ES, kf2=\ET, kf3=\EU,
+       kf4=\EV, kf5=\EW, kf6=\EP, kf7=\EQ, kf8=\ER, kf9=\EOI,
+       khome=\EH, ri=\EI, rmacs=\EG, rmir=\EO, rmso=\Eq, smacs=\EF,
+       smir=\E@, smso=\Ep,
 p19|h19-b with il1/dl1,
        dl1=\EM$<2*/>, il1=\EL$<2*/>, use=h19-b,
 # From: <ucscc!B.fiatlux@ucbvax.berkeley.edu>
@@ -18409,7 +19432,7 @@ ims950-rv|ims tvi950 rev video,
 ims-ansi|ultima2|ultimaII|IMS Ultima II,
        OTbs, am,
        cols#80, it#8, lines#24,
-       clear=\E[H\E[2J, cub1=^H, cud1=\ED,
+       clear=\E[H\E[2J, cub1=^H, cud1=\ED, cuf1=\EC,
        cup=\E[%i%p1%2d;%p2%2dH, cuu1=\EM, ed=\E[0J, el=\E[0K,
        ht=^I, if=/usr/share/tabset/vt100,
        is2=\E[m\E[>14l\E[?1;?5;20l\E>\E[1m\r, kcub1=\E[D,
@@ -18520,9 +19543,9 @@ modgraph|mod24|modgraph terminal emulating vt100,
 modgraph2|modgraph gx-1000 80x24 with keypad not enabled,
        am, da, db,
        cols#80, it#8, lines#24,
-       clear=\EH\EJ$<50/>, cub1=^H, cuf1=\EC$<2/>,
-       cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5/>, cuu1=\EA$<2/>,
-       ed=\EJ$<50/>, el=\EK$<3/>, ht=^I,
+       clear=\EH\EJ$<50/>, cub1=^H, cud1=\EB$<2/>,
+       cuf1=\EC$<2/>, cup=\EY%p1%{32}%+%c%p2%{32}%+%c$<5/>,
+       cuu1=\EA$<2/>, ed=\EJ$<50/>, el=\EK$<3/>, ht=^I,
        is2=\E<\E\^5;2s\E\^7;1s\E[3g\E\^11;9s\E\^11;17s\E\^11;25s\E\^11;33s\E\^11;41s\E\^11;49s\E\^11;57s\E\^11;65s\E\^11;73s\E\^11;81s\E\^11;89s\E\^12;0s\E\^14;2s\E\^15;9s\E\^25;1s\E\^9;1s\E\^27;1,
        ri=\EI$<5/>,
 #
@@ -18593,9 +19616,9 @@ mt70|mt-70|Morrow MD-70; native Morrow mode,
 ex155|Motorola Exorterm 155,
        OTbs, am, bw,
        OTkn#5, OTug#1, cols#80, lines#24,
-       cbt=\E[, clear=\EX, cud1=\EB, cuf1=\ED,
-       cup=\EE%p1%{32}%+%c%p2%{32}%+%c, ed=\ET, el=\EU,
-       home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H,
+       cbt=\E[, clear=\EX, cub1=\ED, cud1=\EB, cuf1=\EC,
+       cup=\EE%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, ed=\ET,
+       el=\EU, home=\E@, ht=\EZ, kbs=^H, kcbt=\E[, kclr=\EX, kcub1=^H,
        kcud1=^J, kcuf1=^L, kcuu1=^K, ked=\ET, kel=\EU, khome=\E@,
        rmso=\Ec\ED, rmul=\Eg\ED, smso=\Eb\ED, smul=\Ef\ED,
 
@@ -18891,7 +19914,7 @@ t1061f|teleray 1061 with fast PROMs,
 t10|teleray 10 special,
        OTbs, km, xhp, xt,
        cols#80, it#8, lines#24, xmc#2,
-       clear=\Ej$<30/>, cub1=^H, cuf1=\EC,
+       clear=\Ej$<30/>, cub1=^H, cud1=\EB, cuf1=\EC,
        cup=\EY%p1%{32}%+%c%p2%{32}%+%c, cuu1=\EA, dch1=\EQ,
        dl1=\EM, ed=\EJ, el=\EK, home=\EH, ht=^I, ich1=\EP, il1=\EL,
        ind=\Eq, pad=\0, ri=\Ep, rmso=\ER@, rmul=\ER@, smso=\ERD,
@@ -19517,9 +20540,9 @@ dwk|dwk-vt|dwk terminal,
        sgr0=\EX, smacs=\EF, smso=\ET,
 env230|envision230|envision 230 graphics terminal,
        xenl@,
-       mc0=\E[0i, mc4=\E[4i, mc5=\E[5i,
-       sgr=\E[%?%p1%t;1%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m$<2>,
-       use=vt100,
+       enacs@, mc0=\E[0i, mc4=\E[4i, mc5=\E[5i, rmacs@,
+       sgr=\E[0%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m$<2>,
+       sgr0=\E[0m$<2>, smacs@, use=vt100,
 # These execuports were impact-printer ttys with a 30- or maybe 15-cps acoustic
 # coupler attached, the whole rig fitting in a suitcase and more or less
 # portable.  Hot stuff for c.1977 :-) -- esr
@@ -19574,7 +20597,7 @@ opus3n1+|Esprit Opus3n1+ in wy60 mode with ANSI arrow keys,
        rmacs=\EH^C, rmam=\Ed., rmcup=, rmir=\Er, rmln=\EA11,
        rmxon=\Ec20, rs1=\E~!\E~4$<150>, rs2=\EeF$<150>,
        rs3=\EwG\Ee($<150>,
-       sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EH\002%e\EH\003%;\EG%{48}%?%p2%p6%|%t%{8}%|%;%?%p1%p3%|%p6%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c,
+       sgr=%?%p8%t\E)%e\E(%;%?%p9%t\EH\002%e\EH\003%;\EG%{48}%?%p2%t%{8}%|%;%?%p1%p3%|%t%{4}%|%;%?%p4%t%{2}%|%;%?%p1%p5%|%t%{64}%|%;%?%p7%t%{1}%|%;%c,
        sgr0=\E(\EH\003\EG0\EcD, smacs=\EH^B, smam=\Ed/,
        smcup=\Ezz&\E[A\177\Ezz'\E[B\177\Ezz(\E[D\177\Ezz)\E[C\177\Ezz<\E[Q\177,
        smir=\Eq, smln=\EA10, smxon=\Ec21, tbc=\E0, tsl=\Ez(,
@@ -19613,7 +20636,7 @@ teletec|Teletec Datascreen,
 v3220|LANPAR Vision II model 3220/3221/3222,
        OTbs, am, mir, xenl,
        cols#80, it#8, lines#24,
-       clear=\E[H\E[J, cub1=^H, cuf1=\E[C,
+       clear=\E[H\E[J, cub1=^H, cud1=\E[B, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu1=\E[A, dch1=\E[P, dl1=\E[M,
        ed=\E[J, el=\E[K, ht=^I, il1=\E[L,
        is2=\E>\E[?3l\E[?7h\E[?8h\E[p, kcub1=\E[D, kcud1=\E[B,
@@ -20311,11 +21334,107 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # CF for civis and CO for cvvis.  Finally, they define a boolean :ct:
 # that flags color terminals.
 #
+# Extensions added after ncurses 5.0 generally use the "-x" option of tic and
+# infocmp to manipulate user-definable capabilities.  Those that are intended
+# for use in either terminfo or termcap use 2-character names.  Extended
+# function keys do not use 2-character names, and are available only with
+# terminfo.
+#
+# As of mid-2012, no other terminfo/termcap implementation than ncurses
+# supports this extension; termcap libraries can as noted above make limited
+# use of the feature.
+#
+# ncurses makes explicit checks for a few user-definable capabilities:  AX, U8,
+# XM.
+#
+# SCREEN Extensions:
+#
+# The screen program uses the termcap interface.  It recognizes a few useful
+# nonstandard capabilities.  Those are used in this file.
+#
+#       AX   (bool)  Does  understand  ANSI  set  default fg/bg color (\E[39m /
+#                    \E[49m).
+#       G0   (bool)  Terminal can deal with ISO 2022  font  selection sequences.
+#       E0   (str)   Switch charset 'G0' back to standard charset.
+#       S0   (str)   Switch charset 'G0' to the specified charset.
+#       XT   (bool)  Terminal understands special xterm sequences  (OSC,  mouse
+#                    tracking).
+#
+# AX is relatively straightforward; it is interpreted by ncurses to say that
+# SGR 39/49 reset the terminal's foreground and background colors to their
+# "default".
+#
+# XT is harder, since screen's manpage does not give more details.  For that,
+# we must read screen's source-code.  When XT is set, screen assumes
+#
+# a) OSC 1 sets the title string, e.g., for the icon.  Recent versions of
+#    screen may also set the terminal's name, which is (for xterm) distinct
+#    from the icon name.
+# b) OSC 20 sets the background pixmap.  This is an rxvt feature.
+# c) OSC 39 and OSC 49 set the default foreground/background colors.  Again
+#    this is an rxvt feature.
+# d) certain mode settings enable the mouse: 9, 1000, 1001, 1002, 1003.
+#    These are from xterm, although xterm accepts mouse codes that may not be
+#    recognized by screen, e.g., 1005, 1006.
+# e) colors beyond 0..7 are implemented by xterm's aixterm-like 16-color
+#    sequence.  However, because screen uses only termcap, the values returned
+#    by Af/Ab are not usable because they rely on expressions that termcap
+#    does not support.  Therefore, screen uses a hardcoded string to work
+#    around the limitation.
+# f) all entries named "*xterm*" or "*rxvt*" have the bce flag set.
+#
+# The other ISO-2022 features are rarely used, but provided here to make
+# screen's termcap features available.
+#
+# XTERM Extensions:
+#
+# Most of the xterm extensions are for function-keys.  Since patch #94 (in
+# 1999), xterm has supported shift/control/alt/meta modifiers which produce
+# additional function-key strings.  Some other developers copied the feature,
+# though they did not follow xterm's lead in patch #167 (in 2002), to make
+# these key definitions less ambiguous.
+#
+# A few terminals provide similar functionality (sending distinct keys when
+# a modifier is used), including rxvt.
+#
+# These are the extended keys defined in this file:
+#
+# kDC3 kDC4 kDC5 kDC6 kDC7 kDN kDN3 kDN4 kDN5 kDN6 kDN7 kEND3 kEND4 kEND5 kEND6
+# kEND7 kHOM3 kHOM4 kHOM5 kHOM6 kHOM7 kIC3 kIC4 kIC5 kIC6 kIC7 kLFT3 kLFT4
+# kLFT5 kLFT6 kLFT7 kNXT3 kNXT4 kNXT5 kNXT6 kNXT7 kPRV3 kPRV4 kPRV5 kPRV6 kPRV7
+# kRIT3 kRIT4 kRIT5 kRIT6 kRIT7 kUP kUP3 kUP4 kUP5 kUP6 kUP7 ka2 kb1 kb3 kc2
+#
+# Here are the other xterm-related extensions which are used in this file:
+#
+# Cr is a string capability which resets the cursor color
+# Cs is a string capability which sets the cursor color to a given value.
+#    The single string parameter is the color name/number, according to the
+#    implementation.
+# Ms modifies the selection/clipboard.  Its parameters are
+#      p1 = the storage unit (clipboard, selection or cut buffer)
+#      p2 = the base64-encoded clipboard content.
+# Se resets the cursor style to the terminal power-on default.
+# Ss is a string capability with one numeric parameter.  It is used to set the
+#    cursor style as described by the DECSCUSR function to a block or
+#    underline.
+# XM is a string capability which overrides ncurses's built-in string which
+#    enables xterm mouse mode.
+#
+# Miscellaneous extensions:
+#
+# gsbom/grbom are used to enable/disable real bold (not intensity bright) mode.
+#    This was implemented for the Hurd.
+# E3 clears the terminal's scrollback buffer.  This was implemented in the
+#    Linux 3.0 kernel as a security feature.
+# U8 is a numeric capability which denotes a terminal emulator which does not
+#    support VT100 SI/SO when processing UTF-8 encoding.  Set this to a nonzero
+#    value to enable it.
+#
 ######## CHANGE HISTORY
 #
 # The last /etc/termcap version maintained by John Kunze was 8.3, dated 8/5/94.
-# Releases 9 and up are maintained by Eric S. Raymond as part of the ncurses
-# project.
+# Releases 9 and 10 (up until the release of ncurses 4.2 in 1998) were
+# maintained by Eric S. Raymond as part of the ncurses project.
 #
 # This file contains all the capability information present in John Kunze's
 # last version of the termcap master file, except as noted in the change
@@ -20415,7 +21534,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      * Replaced HP entries up to hpsub with purpose-built ones.
 #      * Blank rmir/smir/rmdc/smdc capabilities removed.
 #      * Small fixes merged in from SCO entries for lpr, fos, tvi910+, tvi924.
-# 9.4.8 (Fri Apr  7 09:36:34 EDT 199):
+# 9.4.8 (Fri Apr  7 09:36:34 EDT 1995):
 #      * Replaced the Ann Arbor entries with SCO's, the init strings are
 #        more efficient (but the entries otherwise identical).
 #      * Added dg211 from Shuford archive.
@@ -20773,6 +21892,99 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      * Back off the xterm entry to use r6 as a base.
 # 9.13.22 (Sat Nov 30 11:51:31 EST 1996):
 #      * Added dec-vt220 at Adrian Garside's request.
+#
+#-(original-changelog-1996/12/29-to-1998/02/28-by-TD)---------------------------
+#
+# 10.1.0 (Sun Dec 29 02:36:31 EST 1996): withdrawn
+#      * Minor corrections to xterm entries.
+#      * Replaced EWAN telnet entry.
+#      * Dropped the reorder script generator.  It was a fossil.
+# 9.13.23 (Fri Feb 21 16:36:06 EST 1997):
+#      * Replaced minitel-2 entry.
+#      * Added MGR, ansi-nt.
+# 9.13.24 (Sun Feb 23 20:55:23 EST 1997):
+#      * Thorsten Lockert added termcap `bs' to a lot of types, working from
+#        the 4.4BSD Lite2 file.
+#
+# 10.1.1 (Sat May  3 21:41:27 EDT 1997):
+#      * Use setaf/setab consistently with SVr4.
+#      * Remove ech, el1 from cons25w, they do not work in FreeBSD 2.1.5
+# 10.1.2 (Sat May 24 21:10:57 EDT 1997)
+#      * update xterm-xf86-v32 to match XFree86 3.2A (changes F1-F4)
+#      * add xterm-16color, for XFree86 3.3
+# 10.1.3 (Sat May 31 12:21:05 EDT 1997)
+#      * correct typo in emu
+#      * correct typo in vt102-w (Robert Wuest)
+#      * make new entry xterm-xf86-v33, restored xterm-xf86-v32.
+# 10.1.4 (Sun Jun 15 08:29:05 EDT 1997)
+#      * remove ech capability from rxvt (it does the wrong thing)
+# 10.1.5 (Sat Jun 28 21:34:36 EDT 1997)
+#      * remove spurious newlines from several entries (hp+color, wy50,
+#        wy350, wy370-nk, wy99gt-tek, wy370-tek, ibm3161, tek4205, ctrm,
+#        gs6300)
+# 10.1.6 (Sat Jul  5 15:08:16 EDT 1997)
+#      * correct rmso capability of wy50-mc
+# 10.1.7 (Sat Jul 12 20:05:55 EDT 1997)
+#      * add cbt to xterm-xf86-v32
+#      * disentangle some entries from 'xterm', preferring xterm-r6 in case
+#        'xterm' is derived from xterm-xf86-v32, which implements ech and
+#        other capabilities not in xterm-r6.
+#      * remove alternate character set from kterm entry.
+# 10.1.8 (Sat Aug  2 18:43:18 EDT 1997)
+#      * correct acsc entries for ACS_LANTERN, which is 'i', not 'I'.
+# 10.1.9 (Sat Aug 23 17:54:38 EDT 1997)
+#      * add xterm-8bit entry.
+# 10.1.10 (Sat Oct  4 18:17:13 EDT 1997)
+#      * repair several places where early version of tic replaced \, with \\\,
+#      * make acsc entries canonical form (sorted, uniq).
+#      * modify acsc entries for linux, linux-koi8
+#      * new rxvt entry, from corrected copy of distribution in rxvt 2.21b
+#      * add color, mouse support to kterm.
+# 10.1.11 (Sat Oct 11 14:57:10 EDT 1997)
+#      * correct wy120 smxon/tbc capabilities which were stuck together.
+# 10.1.12 (Sat Oct 18 17:38:41 EDT 1997)
+#      * add entry for xterm-xf86-v39t
+# 10.1.13 (Sat Nov  8 13:43:33 EST 1997)
+#      * add u8,u9 to sun-il description
+# 10.1.14 (Sat Nov 22 19:59:03 EST 1997)
+#      * add vt220-js, pilot, rbcomm, datapoint entries from esr's 27-jun-97
+#        version.
+#      * add hds200 description (Walter Skorski)
+#      * add EMX 0.9b descriptions
+#      * correct rmso/smso capabilities in wy30-mc and wy50-mc (Daniel Weaver)
+#      * rename xhpterm back to hpterm.
+# 10.1.15 (Sat Nov 29 19:21:59 EST 1997)
+#      * change initc in linux-c-nc to use 0..1000 range.
+# 10.1.16 (Sat Dec 13 19:41:59 EST 1997)
+#      * remove hpa/vpa from rxvt, which implements them incorrectly.
+#      * add sgr0 for rxvt.
+#      * remove bogus smacs/rmacs from EMX descriptions.
+# 10.1.17 (Sat Dec 20 17:54:10 EST 1997)
+#      * revised entry for att7300
+# 10.1.18 (Sat Jan  3 17:58:49 EST 1998)
+#      * use \0 rather than \200.
+#      * rename rxvt-color to rxvt to match rxvt 2.4.5 distribution.
+# 10.1.19 (Sat Jan 17 14:24:57 EST 1998)
+#      * change xterm (xterm-xf86-v40), xterm-8bit rs1 to use hard reset.
+#      * rename xterm-xf86-v39t to xterm-xf86-v40
+#      * remove bold/underline from sun console entries since they're not
+#        implemented.
+# 10.1.20 (Sat Jan 24 11:02:51 EST 1998)
+#      * add beterm entry (Fred Fish)
+#      * add irix-color/xwsh entry.
+#      * turn ncv off for linux.
+# 10.1.21 (Sat Jan 31 17:39:16 EST 1998)
+#      * set ncv for FreeBSD console (treat colors with reverse specially).
+#      * remove sgr string from qnx based on report by Xiaodan Tang
+# 10.1.22 (Wed Feb 11 18:40:12 EST 1998)
+#      * remove spurious commas from descriptions
+#      * correct xterm-8bit to match XFree86 3.9Ad F1-F4.
+# 10.1.23 (Sat Feb 28 17:48:38 EST 1998)
+#      * add linux-koi8r to replace linux-koi8 (which uses a corrupt acsc,
+#        apparently based on cp-866).
+#
+#-(replaced-changelog-1998/02/28-by-ESR)----------------------------------------
+#
 # 9.13.23 (Fri Feb 21 16:36:06 EST 1997):
 #      * Replaced minitel-2 entry.
 #      * Added MGR, ansi-nt.
@@ -20825,6 +22037,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #      * Incorporated att700 from the Boundless Technology FTP site.
 #      * Miscellaneous contact-address and Web-page updates.
 #
+#-(changelog-beginning-ncurses-4.2)---------------------------------------------
+#
 # 1998/5/9
 #      * add nxterm and xterm-color terminfo description (request by Cristian
 #        Gafton <gafton@redhat.com>).
@@ -21392,13 +22606,281 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # 2007-06-10
 #      * corrected xterm+pcf2 modifiers for F1-F4, match xterm #226 -TD
 #
-# The following sets edit modes for GNU EMACS.
-# Local Variables:
-# fill-prefix:"\t"
-# fill-column:75
-# comment-column:0
-# comment-start-skip:"^#+"
-# comment-start:"# "
-# compile-command:"tic -c terminfo.master"
-# End:
+# 2007-07-14
+#      * restore section of pre-ncurses-4.2 changelog to fix attribution -TD
+#      * add konsole-256color entry -TD
+#
+# 2007-08-18
+#      * add 9term entry (request by Juhapekka Tolvanen) -TD
+#
+# 2007-10-13
+#      * correct kIC in rxvt+pcfkeys (prompted by Debian #446444) -TD
+#      * add shift-control- and control-modified keys for rxvt editing
+#        keypad -TD
+#      * update mlterm entry to 2.9.3 -TD
+#      * add mlterm+pcfkeys -TD
+#
+# 2007-10-20
+#      * move kLFT, kRIT, kind and kri capabilities from xterm-new to
+#        xterm+pcc0, etc., to make the corresponding building blocks reflect
+#        xterm's capabilities -TD
+#      * add mrxvt entry -TD
+#      * add xterm+r6f2, use in mlterm and mrxvt entries -TD
+#
+# 2007-11-03
+#      * correct acsc strings for h19 and z100 (Benjamin Sittler)
+#
+# 2007-11-11
+#      * use xterm-xf86-v44 for "xterm-xfree86", reflecting changes to
+#        xterm starting with patch #216 -TD
+#      * make legacy xterm entries such as xterm-24 inherit from xterm-old,
+#        to match xterm #230 -TD
+#      * extend xterm+pccX entries to match xterm #230 -TD
+#      * add xterm+app, xterm+noapp, from xterm #230 -TD
+#      * add/use xterm+pce2 from xterm #230, in xterm+pcfkeys -TD
+#
+# 2008-04-19
+#      * add screen.rxvt -TD
+#
+# 2008-04-28
+#      * add screen+fkeys (prompted by Debian #478094) -TD
+#
+# 2008-06-28
+#      * add screen.mlterm -TD
+#      * improve mlterm and mlterm+pcfkeys -TD
+#
+# 2008-08-23
+#      * add Eterm-256color, Eterm-88color -TD
+#      * add rxvt-88color -TD
+#
+# 2008-10-12
+#      * add teraterm4.59 entry, use that as primary teraterm entry, rename
+#        original to teraterm2.3 -TD
+#      * update "gnome" to 2.22.3 -TD
+#      * update "konsole" to 1.6.6 -TD
+#      * add "aterm" -TD
+#      * add "linux2.6.26" -TD
+#
+# 2008-11-15
+#      * change several \E[2g (clear tab at current column) to \E[3g
+#        (clear all tabs) to match definition for tbc capability -TD
+#
+# 2008-11-29
+#      * add eterm-color -TD
+#
+# 2009-01-10
+#      * add screen.Eterm -TD
+#
+# 2009-03-28
+#      * correct typo in pfkey of ansi.sys-old
+#        (report by Kalle Olavi Niemitalo)
+#      * move function- and cursor-keys from emx-base to ansi.sys, and create
+#        a pfkey capability which handles F1-F48 -TD
+#
+# 2009-05-02
+#      * add vwmterm entry (Bryan Christ)
+#
+# 2009-09-19
+#      * change ncv and op capabilities in sun-color to match Sun's entry for
+#        this (report by Laszlo Peter)
+#      * improve interix smso by using reverse rather than bold (report by
+#        Kristof Zelechovski).
+#
+# 2009-10-03
+#      * remove unnecessary kcan assignment to ^C from putty (Sven Joachim)
+#      * add linux-16color (Benjamin Sittler)
+#      * correct initc capability of linux-c-nc end-of-range (Benjamin Sittler)
+#      * similar change for dg+ccc and dgunix+ccc (Benjamin Sittler)
+#      * add ccc and initc capabilities to xterm-16color -TD
+#
+# 2009-10-31
+#      * updated nsterm* entries (Benjamin Sittler, prompted by GenToo #206201)
+#
+# 2009-12-12
+#      * updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta)
+#
+# 2009-12-12
+#      * add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
+#      * rename minix to minix-1.7, add minix entry for Minux3 -TD
+#
+# 2009-12-26
+#      * add bterm (bogl 0.1.18) -TD
+#      * minor fix to rxvt+pcfkeys -TD
+#
+# 2010-02-06
+#      * update mrxvt to 0.5.4, add mrxvt-256color -TD
+#
+# 2010-02-13
+#      * add several screen-bce.XXX entries -TD
+#
+# 2010-02-23
+#      * modify screen-bce.XXX entries to exclude ech, since screen's color
+#        model does not clear with color for that feature -TD
+#
+# 2010-03-20
+#      * rename atari and st52 to atari-old, st52-old, use newer entries from
+#        FreeMiNT by Guido Flohr (from patch/report by Alan Hourihane).
+#
+# 2010-06-12
+#      * add mlterm+256color entry -TD
+#
+# 2010-07-17
+#      * add hard-reset for rs2 to wsvt25 to help ensure that reset ends
+#        the alternate character set (patch by Nicholas Marriott)
+#
+# 2010-08-28
+#      * improve acsc for vt52 (Benjamin Sittler)
+#      * modify nsterm entries for consistent sgr/sgr0 -TD
+#      * modify xnuppc entries for consistent sgr/sgr0 -TD
+#      * add invis to tek4115 sgr -TD
+#
+# 2010-09-11
+#      * reformat acsc strings to canonical format -TD
+#
+# 2010-09-25
+#      * add "XT" capability to entries for terminals that support both
+#        xterm-style mouse- and title-controls, for "screen" which
+#        special-cases TERM beginning with "xterm" or "rxvt" -TD
+#
+# 2010-10-02
+#      * fill in no-parameter forms of cursor-movement where a parameterized
+#        form is available -TD
+#      * fill in missing cursor controls where the form of the controls is
+#        ANSI -TD
+#      * add parameterized cursor-controls to linux-basic (report by Dae) -TD
+#
+# 2010-10-09
+#      * correct comparison used for setting 16-colors in linux-16color
+#        entry (Novell #644831) -TD
+#      * improve linux-16color entry, using "dim" for color-8 which makes it
+#        gray rather than black like color-0 -TD
+#
+# 2010-11-20
+#      * make "vte" the principal entry defining "gnome", since GNOME terminal
+#        is merely one of several terminals whose behavior is provided by this
+#        library -TD
+#
+# 2010-11-27
+#      * fix typo in rmso for tek4106 -Goran Weinholt
+#
+# 2010-12-11
+#      * suppress ncv in screen entry, allowing underline -Alejandro R. Sedeno
+#      * also suppress ncv in konsole-base -TD
+#
+# 2011-02-05
+#      * add U8 feature to denote entries for terminal emulators which do not
+#        support VT100 SI/SO when processing UTF-8 encoding -TD
+#      * add xterm-utf8 as a demo of the U8 feature -TD
+#
+# 2011-02-20
+#      * add cons25-debian entry (Brian M Carlson, Debian #607662).
+#
+# 2011-06-11
+#      * update minix entry to minix 3.2 (Thomas Cort).
+#
+# 2011-07-09
+#      * fix inconsistent tabset path in pcmw (Todd C. Miller).
+#      * remove a backslash which continued comment, obscuring altos3
+#        definition with OpenBSD toolset (Nicholas Marriott).
+#
+# 2011-07-16
+#      * add/use xterm+tmux chunk from xterm #271 -TD
+#      * resync xterm-new entry from xterm #271 -TD
+#      * add E3 extended capability to linux-basic (Miroslav Lichvar)
+#      * add linux2.2, linux2.6, linux3.0 entries to give context for E3 -TD
+#      * add SI/SO change to linux2.6 entry (Debian #515609) -TD
+#
+# 2011-07-21
+#      * add kich1 to sun (Yuri Pankov)
+#      * use bold rather than reverse for smso in sun-color (Yuri Pankov).
+#
+# 2011-08-06
+#      * corrected k9 in dg460-ansi, add other features based on manuals -TD
+#
+# 2011-08-20
+#      * minor cleanup of X-terminal emulator section -TD
+#      * add terminator entry -TD
+#      * add simpleterm entry -TD
+#
+# 2011-09-10
+#      * add xterm+kbs fragment from xterm #272 -TD
+#
+# 2011-11-12
+#      * add pccon entries for OpenBSD console (Alexei Malinin)
+#
+# 2011-12-17
+#      * corrected old changelog comments -TD
+#
+# 2011-11-24
+#      * add putty-sco -TD
+#
+# 2012-01-28
+#      * add mach-gnu (Samuel Thibault)
+#      * add mach-gnu-color, tweaks to mach-gnu -TD
+#      * make sgr for sun-color agree with smso -TD
+#      * make sgr for prism9 agree with other caps -TD
+#      * make sgr for icl6404 agree with other caps -TD
+#      * make sgr for ofcons agree with other caps -TD
+#      * make sgr for att5410v1, att4415, att620 agree with other caps -TD
+#      * make sgr for aaa-unk, aaa-rv agree with other caps -TD
+#      * make sgr for avt-ns agree with other caps -TD
+#
+# 2012-02-11
+#      * make sgr for xterm-pcolor agree with other caps -TD
+#      * make sgr for att5425 agree with other caps -TD
+#      * make sgr for att630 agree with other caps -TD
+#      * make sgr for linux entries agree with other caps -TD
+#      * make sgr for tvi9065 agree with other caps -TD
+#      * make sgr for ncr260vt200an agree with other caps -TD
+#      * make sgr for ncr160vt100pp agree with other caps -TD
+#      * make sgr for ncr260vt300an agree with other caps -TD
+#      * make sgr for aaa-60-dec-rv, aaa+dec agree with other caps -TD
+#      * make sgr for cygwin, cygwinDBG agree with other caps -TD
+#
+# 2012-03-31
+#      * correct order of use-clauses in st-256color -TD
+#
+# 2012-04-01
+#      * revert 2011-07-16 change to "linux" alias, return to "linux2.2" -TD
+#
+# 2012-04-14
+#      * document all of the user-defined capabilities in one place -TD
+#      * add XT to some places to improve usefulness for other applications
+#        than screen, which would like to pretend that xterm's title is
+#        a status-line. -TD
+#      * change use-clauses in ansi-mtabs, hp2626, and hp2622 based on review
+#        of ordering and overrides -TD
+#
+# 2012-04-21
+#      * add msgr to vt420, similar DEC vtXXX entries -TD
+#      * add several missing vt420 capabilities from vt220 -TD
+#      * factor out ansi+pp from several entries -TD
+#      * change xterm+sl and xterm+sl-twm to include only the status-line
+#        capabilities and not "use=xterm", making them more generally useful
+#        as building-blocks -TD
+#      * add dec+sl building block, as example -TD
+#
+# 2012-04-28
+#      * fix some inconsistencies between vt320/vt420, e.g., cnorm/civis -TD
+#      * add eslok flag to dec+sl -TD
+#      * dec+sl applies to vt320 and up -TD
+#      * drop wsl width from xterm+sl -TD
+#      * reuse xterm+sl in putty and nsca-m -TD
+#      * add ansi+tabs to vt520 -TD
+#      * add ansi+enq to vt220-vt520 -TD
+#
+# 2012-05-05
+#      * remove p6 (bold) from opus3n1+ for consistency -TD
+#      * remove acs stuff from env230 per clues in Ingres termcap -TD
+#      * modify env230 sgr/sgr0 to match other capabilities -TD
+#      * modify smacs/rmacs in bq300-8 to match sgr/sgr0 -TD
+#      * make sgr for dku7202 agree with other caps -TD
+#      * make sgr for ibmpc agree with other caps -TD
+#      * make sgr for tek4107 agree with other caps -TD
+#      * make sgr for ndr9500 agree with other caps -TD
+#      * make sgr for sco-ansi agree with other caps -TD
+#      * make sgr for d410 agree with other caps -TD
+#      * make sgr for d210 agree with other caps -TD
+#      * make sgr for d470c, d470c-7b agree with other caps -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!