]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - misc/terminfo.src
ncurses 5.9 - patch 20130316
[ncurses.git] / misc / terminfo.src
index 76880bc335ccc93156c1c977a677bfd81f80c2d3..8acd6844261d29765fb5d0245c0545598ee09227 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.406 $
-#      $Date: 2011/12/24 22:16:12 $
+#      $Revision: 1.472 $
+#      $Date: 2013/03/16 22:39:31 $
 #
 # 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
@@ -321,7 +321,7 @@ vanilla|dumb tty,
 # 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 
+#      \033];xxx\007
 # for compatibility with xterm -TD
 9term|Plan9 terminal emulator for X,
        am,
@@ -376,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.
@@ -456,9 +464,10 @@ ibcs2|Intel Binary Compatibility Standard prescriptions,
        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,
-       smam=\E[?7h, tbc=\E[g, vpa=\E[%i%p1%dd,
+       hpa=\E[%i%p1%dG, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
+       il=\E[%p1%dL, indn=\E[%p1%dS, rc=\E7, rin=\E[%p1%dT,
+       rmam=\E[?7l, sc=\E7, smam=\E[?7h, tbc=\E[g,
+       vpa=\E[%i%p1%dd,
 
 #### ANSI/ECMA-48 terminals and terminal emulators
 #
@@ -488,7 +497,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
 #
@@ -907,7 +916,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,
@@ -942,18 +951,21 @@ linux2.2|linux 2.2.x console,
 #      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%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
+       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).
+# It is the same as xterm's erase-saved-lines feature.
 linux3.0|linux 3.0 kernels,
        E3=\E[3;J, use=linux2.6,
 
 # This is Linux console for ncurses.
 linux|linux console,
-       use=linux3.0,
+       use=linux2.2,
 
 # Subject: linux 2.6.26 vt back_color_erase
 # Changes to the Linux console driver broke bce model as reported in
@@ -1013,7 +1025,7 @@ kon|kon2|jfbterm|Kanji ON Linux console,
 # 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,
+       colors#16, ncv#62, 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,
@@ -1039,7 +1051,7 @@ bterm|bogl virtual terminal,
        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,
+       op=\E[49m\E[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,
 
@@ -1068,6 +1080,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/
 #
@@ -1198,7 +1228,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,
@@ -1851,7 +1881,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,
@@ -1863,8 +1893,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.
@@ -1881,7 +1911,8 @@ ofcons|DNARD OpenFirmware console,
 wsvt25|NetBSD wscons in 25 line DEC VT220 mode,
        bce, msgr,
        colors#8, cols#80, it#8, lines#25, ncv#2, pairs#64,
-       is2=\E[r\E[25;1H, kend=\E[8~, kf1=\E[11~, kf10=\E[21~,
+       civis=\E[?25l, cnorm=\E[?25h, is2=\E[r\E[25;1H,
+       kdch1=\E[3~, 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, rs1=\Ec,
@@ -2442,8 +2473,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{{||}}~~,
@@ -2469,8 +2501,15 @@ vt220-old|vt200-old|DEC VT220 in vt100 emulation mode,
 # A much better description of the VT200/220; used to be vt220-8
 # changed rmacs/smacs from shift-in/shift-out to vt200-old's explicit G0/G1
 # designation to accommodate bug in pcvt -TD
+#
+# Here's a picture of the VT220 editing keypad:
+#      +--------+--------+--------+
+#      | Find   | Insert | Remove |
+#      +--------+--------+--------+
+#      | Select | Prev   | Next   |
+#      +--------+--------+--------+
 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,
@@ -2483,19 +2522,20 @@ vt220|vt200|dec vt220,
        ich=\E[%p1%d@, if=/usr/share/tabset/vt100,
        il=\E[%p1%dL, il1=\E[L, ind=\ED,
        is2=\E[?7h\E[>\E[?1h\E F\E[?4l, kbs=^H, kcub1=\E[D,
-       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf1=\EOP, kf10=\E[21~,
-       kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
-       kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf2=\EOQ,
-       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,
+       kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[3~, kf1=\EOP,
+       kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[25~,
+       kf14=\E[26~, kf17=\E[31~, kf18=\E[32~, kf19=\E[33~,
+       kf2=\EOQ, 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,
+       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,
@@ -2514,16 +2554,16 @@ vt220-8bit|vt220-8|vt200-8bit|vt200-8|dec vt220/200 in 8-bit mode,
        il=\233%p1%dL, il1=\233L, ind=\ED,
        is2=\233?7h\233>\233?1h\E F\233?4l, kbs=^H,
        kcub1=\233D, kcud1=\233B, kcuf1=\233C, kcuu1=\233A,
-       kf1=\EOP, kf10=\23321~, kf11=\23323~, kf12=\23324~,
-       kf13=\23325~, kf14=\23326~, kf17=\23331~, kf18=\23332~,
-       kf19=\23333~, kf2=\EOQ, kf20=\23334~, kf3=\EOR, kf4=\EOS,
-       kf6=\23317~, kf7=\23318~, kf8=\23319~, kf9=\23320~,
-       kfnd=\2331~, khlp=\23328~, khome=\233H, 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=\E(B,
-       rmam=\233?7l, rmir=\2334l, rmso=\23327m, rmul=\23324m,
-       rs1=\233?3l, sc=\E7,
+       kdch1=\2333~, kf1=\EOP, kf10=\23321~, kf11=\23323~,
+       kf12=\23324~, kf13=\23325~, kf14=\23326~, kf17=\23331~,
+       kf18=\23332~, kf19=\23333~, kf2=\EOQ, kf20=\23334~,
+       kf3=\EOR, kf4=\EOS, kf6=\23317~, kf7=\23318~, kf8=\23319~,
+       kf9=\23320~, kfnd=\2331~, khlp=\23328~, khome=\233H,
+       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=\E(B, rmam=\233?7l, rmir=\2334l, rmso=\23327m,
+       rmul=\23324m, rs1=\233?3l, sc=\E7,
        sgr=\2330%?%p6%t;1%;%?%p2%t;4%;%?%p4%t;5%;%?%p1%p3%|%t;7%;m%?%p9%t\E(0%e\E(B%;$<2>,
        sgr0=\2330m\E(B, smacs=\E(0, smam=\233?7h, smir=\2334h,
        smso=\2337m, smul=\2334m, tbc=\2333g,
@@ -2560,8 +2600,9 @@ 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, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
@@ -2599,7 +2640,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,
@@ -2608,9 +2649,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~,
@@ -2618,8 +2658,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,
@@ -2628,7 +2667,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,
@@ -2738,33 +2777,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
@@ -2837,58 +2881,11 @@ vt510pcdos|DEC VT510 w/PC for DOS Merge,
 # terminal mode is being used.  If Set-Up has been disabled or
 # 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)
 vt520|DEC VT520,
-       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=ansi+rca, use=vt420, use=ansi+tabs,
 
-# (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
 #
@@ -2952,7 +2949,7 @@ 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, XT,
+       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,
@@ -2962,11 +2959,10 @@ 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, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
@@ -2987,7 +2983,8 @@ 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, E3=\E[3;J, 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,
@@ -3242,7 +3239,7 @@ xterm-r5|xterm R5 version,
 # added khome/kend, hts based on the R6 xterm code - TD
 # (khome/kend do not actually work in X11R5 or X11R6, but many people use this
 # for compatibility with other emulators).
-xterm-r6|xterm-old|xterm X11R6 version,
+xterm-r6|xterm X11R6 version,
        OTbs, am, km, mir, msgr, xenl,
        cols#80, it#8, lines#24,
        acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
@@ -3268,10 +3265,12 @@ xterm-r6|xterm-old|xterm X11R6 version,
        sgr0=\E[m, smacs=^N, smcup=\E7\E[?47h, smir=\E[4h,
        smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
        use=vt100+enq,
+xterm-old|antique xterm version,
+       use=xterm-r6,
 # 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,
@@ -3315,13 +3314,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),
@@ -3535,7 +3534,7 @@ xterm+r6f2|xterm with oldFunctionKeys and modifyFunctionKeys:2,
 #
 # 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,
@@ -3548,19 +3547,19 @@ xterm-basic|modern xterm terminal emulator - common,
        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>,
-       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,
+       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=xterm+kbs,
-       use=vt100+enq,
+       smul=\E[4m, tbc=\E[3g, vpa=\E[%i%p1%dd, E3=\E[3;J,
+       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
@@ -3630,12 +3629,12 @@ xterm-1003|testing xterm-mouse,
 # 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 Ce set and reset the cursor colour.
+#
+# 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,
@@ -3755,24 +3754,58 @@ xterm|xterm terminal emulator (X Window System),
 xterm-utf8|xterm with no VT100 line-drawing in UTF-8 mode,
        U8#1, use=xterm,
 
-# 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.
+# 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\016%e\017%;B\E[0%?%p6%t;1%;%?%p2%t;1%;%?%p1%p3%|%t;7%;m,
        smso=\E[7m, smul=\E[1m, use=xterm-old,
 
 # See the note on ICH/ICH1 VERSUS RMIR/SMIR near the end of file
@@ -3841,8 +3874,10 @@ xtermc|xterm terminal emulator (color),
 # 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,
+       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.
@@ -3969,7 +4004,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,
@@ -4007,6 +4042,19 @@ vte-2008|VTE in GNOME Terminal snapshot 2.22.3,
 gnome-2008|GNOME Terminal snapshot 2.22.3,
        use=vte-2008,
 
+# GNOME Terminal 3.6.0 (2012)
+# VTE 0.34.1 was marked in git 2012-10-15 (three days after patch was applied
+# in ncurses).  It inherited from gnome-fc5, which broke the modified forms
+# of f1-f4 -TD
+#
+# Testing with tack shows that flash does not/has not worked -TD
+vte-2012|VTE 0.34.1,
+       flash@, ritm=\E[23m, sitm=\E[3m, use=vte-2008,
+# Version 3.6.1 sets TERM to xterm-256color (still hardcoded), which has
+# 61 differences from a correct entry for gnome terminal.
+gnome-2012|GNOME Terminal 3.6.0,
+       use=vte-2012,
+
 # 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
@@ -4035,13 +4083,13 @@ gnome+pcfkeys|VTE's variation on xterm+pcfkeys,
        use=vte+pcfkeys,
 
 vte|VTE aka GNOME Terminal,
-       use=vte-2008,
+       use=vte-2012,
 gnome|GNOME Terminal,
        use=vte,
 
 # palette is hardcoded...
 vte-256color|VTE with xterm 256-colors,
-       initc@, use=xterm+256color, use=vte,
+       use=xterm+256color, use=vte,
 gnome-256color|GNOME Terminal with xterm 256-colors,
        use=vte-256color,
 
@@ -4052,7 +4100,7 @@ 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=vte,
+       use=vte-2008,
 
 #### Other GNOME
 # Multi-Gnome-Terminal 1.6.2
@@ -4111,7 +4159,7 @@ konsole-base|KDE console window,
        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@,
+       hpa=\E[%i%p1%dG, indn=\E[%p1%dS, kbs=\177, kdch1=\E[3~,
        kend=\E[4~, kf1@, kf10@, kf11@, kf12@, kf13@, kf14@, kf15@, kf16@,
        kf17@, kf18@, kf19@, kf2@, kf20@, kf3@, kf4@, kf5@, kf6@, kf7@, kf8@,
        kf9@, kfnd@, khome=\E[1~, kslt@, rin=\E[%p1%dT, rmam=\E[?7l,
@@ -4121,11 +4169,10 @@ konsole-base|KDE console window,
        sgr0=\E[0m\017, smam=\E[?7h, vpa=\E[%i%p1%dd,
        use=ecma+color, use=xterm-r6,
 konsole-linux|KDE console window with linux keyboard,
-       kdch1=\E[3~, kf1=\E[[A, kf10=\E[21~, kf11=\E[23~,
-       kf12=\E[24~, kf13@, kf14@, kf15@, kf16@, kf17@, kf18@, kf19@,
-       kf2=\E[[B, kf20@, kf3=\E[[C, kf4=\E[[D, kf5=\E[[E,
-       kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
-       use=konsole-base,
+       kf1=\E[[A, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13@,
+       kf14@, kf15@, kf16@, kf17@, kf18@, kf19@, kf2=\E[[B, kf20@,
+       kf3=\E[[C, kf4=\E[[D, kf5=\E[[E, kf6=\E[17~, kf7=\E[18~,
+       kf8=\E[19~, kf9=\E[20~, use=konsole-base,
 konsole-solaris|KDE console window with Solaris keyboard,
        kbs=^H, kend=\E[4~, khome=\E[1~, use=konsole-vt100,
 # KDE's "XFree86 3.x.x" keyboard is based on reading the xterm terminfo rather
@@ -4759,13 +4806,13 @@ simpleterm|st| simpleterm,
        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~,
+       dch1=\E[P, dl=\E[%p1%dM, 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,
@@ -4777,9 +4824,9 @@ st-16color|simpleterm with 16-colors,
 # shown in the titlebar.
 st-256color|simpleterm with 256 colors,
        ccc@,
-       initc@, use=simpleterm, use=xterm+256color,
+       initc@, use=xterm+256color, use=simpleterm,
 
-### TERMINATOR
+#### 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)
@@ -4843,7 +4890,7 @@ terminator|Terminator no line wrap,
        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%;,
+       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,
@@ -5030,7 +5077,7 @@ screen.xterm-xfree86|screen.xterm-new|screen customized for modern xterm,
        bce@, bw,
        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=screen+fkeys, use=xterm-new,
+       E3@, 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,
@@ -5170,18 +5217,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~,
@@ -5195,8 +5242,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,
@@ -5327,6 +5374,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,
@@ -5380,12 +5431,13 @@ sun-type4|Sun Workstation console with type 4 keyboard,
 # It supports bold, but not underline -TD (2009-09-19)
 sun-color|Sun Microsystems Workstation console with color support (IA systems),
        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[0m, setab=\E[4%p1%dm,
-       setaf=\E[3%p1%dm,
+       bold=\E[1m, cub=\E[%p1%dD, cud=\E[%p1%dB, cuf=\E[%p1%dC,
+       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,
-       smso=\E[1m, use=sun,
+       sgr=\E[0%?%p6%t;1%;%?%p1%p3%|%t;7%;m, sgr0=\E[m,
+       smso=\E[7m, use=sun,
 
 #### Iris consoles
 #
@@ -5794,7 +5846,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,
@@ -5829,7 +5881,7 @@ 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[3g, vpa=\E[%i%p1%dd, use=vt102+enq,
 
@@ -6433,7 +6485,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
@@ -6634,7 +6686,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,
@@ -7338,6 +7390,9 @@ qvt101|qvt108|qume qvt 101 and QVT 108,
 # What seems to be going on here is that this entry was designed so that
 # the normal highlight is bold and standout is dim plus something else
 # (reverse-video maybe?  But then, are there two <rev> sequences?)
+#
+# Added kdch1, kil1, kdl1 based on screenshot -TD:
+#      http://www.vintagecomputer.net/qume/qvt-108/qume_qvt-108_keyboard.jpg
 qvt101+|qvt101p|qume qvt 101 PLUS product,
        am, bw, hs, ul,
        cols#80, lines#24, xmc#0,
@@ -7346,11 +7401,11 @@ qvt101+|qvt101p|qume qvt 101 PLUS product,
        dch1=\EW, dl1=\ER, dsl=\Eg\Ef\r, ed=\EY, el=\ET,
        flash=\Eb$<200>\Ed, fsl=^M, home=^^, ht=^I, hts=\E1,
        ich1=\EQ, il1=\EE, ind=^J, invis@, kbs=^H, kcbt=\EI, kcub1=^H,
-       kcud1=^J, kcuf1=^L, kcuu1=^K, kdl1=\ER, ked=\EY, kel=\ET,
-       kf1=^A@\r, kf10=^AI\r, kf2=^AA\r, kf3=^AB\r, kf4=^AC\r,
-       kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r, kf9=^AH\r,
-       khome=^^, kich1=\EQ, kil1=\EE, mc4=\EA, mc5=\E@, rmso=\E(,
-       smso=\E0P\E), tbc=\E3, tsl=\Eg\Ef, use=adm+sgr,
+       kcud1=^J, kcuf1=^L, kcuu1=^K, kdch1=\EW, kdl1=\ER, ked=\EY,
+       kel=\ET, kf1=^A@\r, kf10=^AI\r, kf2=^AA\r, kf3=^AB\r,
+       kf4=^AC\r, kf5=^AD\r, kf6=^AE\r, kf7=^AF\r, kf8=^AG\r,
+       kf9=^AH\r, khome=^^, kich1=\EQ, kil1=\EE, mc4=\EA, mc5=\E@,
+       rmso=\E(, smso=\E0P\E), tbc=\E3, tsl=\Eg\Ef, use=adm+sgr,
 qvt102|qume qvt 102,
        cnorm=\E., use=qvt101,
 # (qvt103: added <rmam>/<smam> based on init string -- esr)
@@ -8462,8 +8517,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,
 
@@ -10230,7 +10285,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,
 
@@ -10328,7 +10383,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,
@@ -10534,7 +10589,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,
@@ -10931,7 +10986,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,
@@ -10991,7 +11046,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,
@@ -11641,7 +11696,7 @@ 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[3g,
@@ -11651,13 +11706,13 @@ 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,
@@ -11824,7 +11879,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)
@@ -12666,7 +12721,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+{,
@@ -12695,13 +12750,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)
@@ -12728,10 +12782,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[3g, 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,
@@ -13075,7 +13130,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.
@@ -13277,7 +13332,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:
@@ -13447,12 +13502,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:
@@ -14475,6 +14530,8 @@ lft|lft-pc850|LFT-PC850|IBM LFT PC850 Device,
        sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;%?%p7%t;8%;m%?%p9%t\E(0%e\E(B%;,
        sgr0=\E[0m, smacs=\E(0, smir=\E[4h, smso=\E[7m, smul=\E[4m,
        tbc=\E[3g,
+# "Megapel" refers to the display adapter, which was used with the IBM RT
+# aka IBM 6150.
 ibm5081|hft|IBM Megapel Color display,
        acsc=jjkkllmmnnqqttuuvvwwxx, blink@, bold@, s0ds=\E(B,
        s1ds=\E(0, sgr0=\E[0m\E(B, use=ibm5154,
@@ -14829,7 +14886,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,
@@ -15146,7 +15203,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,
@@ -15162,14 +15219,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[3g, tsl=\E[%i%p1%d%%}, vpa=\E[%i%p1%dd,
+       use=ansi+pp,
 
 # p9-w: Prism-9 in 132 column mode
 # --------------------------------
@@ -15533,7 +15591,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,
@@ -15590,7 +15648,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>,
@@ -15646,7 +15704,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>,
@@ -16036,7 +16094,7 @@ ncr7901|ncr 7901 model,
 # Manufactured in the early/mid eighties, behaves almost the same as a
 # Televideo 950.  Take a 950, change its cabinet for a more 80s-ish one (but
 # keep the same keyboard layout), add an optional 25-line mode, replace the DIP
-# switches with a menu and remove the "lock line" feature (ESC !  1 and ESC ! 
+# switches with a menu and remove the "lock line" feature (ESC !  1 and ESC !
 # 2), here is the NDR 9500.  Even the line-lock, albeit disabled, is
 # recognized:  if you type in "ESC !", the next (third) character is not
 # echoed, showing that the terminal was actually waiting for a parameter!
@@ -16060,7 +16118,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,
 
@@ -16530,7 +16588,7 @@ tek4107|tek4109|tektronix terminals 4107 4109,
        kbs=^H, kcub1=\ED, kcud1=\EB, kcuf1=\EC, kcuu1=\EA,
        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;
@@ -16717,9 +16775,10 @@ tek4205|tektronix 4205,
        clear=\E[2J\E[H, 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=\E[A,
-       dch1=\E[1P, dim=\E[=1;<6m, dl1=\E[1M, ech=\E%p1%dX,
-       ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0, home=\E[H, ht=^I,
-       ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[1L, ind=\ED,
+       dch1=\E[1P, dim=\E[=1;<6m, dl=\E[%p1%dM, dl1=\E[1M,
+       ech=\E%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, enacs=\E)0,
+       home=\E[H, ht=^I, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[1L,
+       ind=\ED,
        initc=\E%%!0\ETF4%?%p1%{0}%=%t0%e%p1%{1}%=%t4%e%p1%{2}%=%t3%e%p1%{3}%=%t5%e%p1%{4}%=%t2%e%p1%{5}%=%t6%e%p1%{6}%=%t7%e1%;%?%p2%{125}%<%t0%e%p2%{250}%<%tA2%e%p2%{375}%<%tA?%e%p2%{500}%<%tC8%e%p2%{625}%<%tD4%e%p2%{750}%<%tE1%e%p2%{875}%<%tE\:%eF4%;%?%p3%{125}%<%t0%e%p3%{250}%<%tA2%e%p3%{375}%<%tA?%e%p3%{500}%<%tC8%e%p3%{625}%<%tD4%e%p3%{750}%<%tE1%e%p3%{875}%<%tE\:%eF4%;%?%p4%{125}%<%t0%e%p4%{250}%<%tA2%e%p4%{375}%<%tA?%e%p4%{500}%<%tC8%e%p4%{625}%<%tD4%e%p4%{750}%<%tE1%e%p4%{875}%<%tE\:%eF4%;\E%%!1,
        invis=\E[=6;<5, is1=\E%!0\ETM1\E%!1\E[m, kbs=^H,
        kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, kf0=\EOA,
@@ -16890,7 +16949,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
@@ -17136,6 +17195,8 @@ mac-w|macterminal-w|Apple Macintosh with Macterminal in 132 column mode,
 #
 #     echo "$TERM_PROGRAM" "$TERM_PROGRAM_VERSION"
 #
+# For Apple_Terminal v309+, use "nsterm-256color" (or "nsterm-bce")
+#
 # For Apple_Terminal v200+, use "nsterm-16color" (a.k.a. "nsterm")
 #
 # For Apple_Terminal v71+/v100+, use "nsterm-bce".
@@ -17352,6 +17413,7 @@ nsterm+mac|AppKit Terminal.app v41+ basic capabilities w/MacRoman alternate-char
        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,
@@ -17437,6 +17499,10 @@ nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline)
 # 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.
+#
+# In OS X 10.7 (Leopard) the TERM which can be set in the preferences dialog
+# defaults to xterm-color.  Alternative selections are ansi, dtterm, rxvt,
+# vt52, vt100, vt102 and xterm.
 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,
@@ -17448,10 +17514,10 @@ nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
        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,
+       kLFT5=\E[5D, kRIT5=\E[5C, 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
+# the background color erase feature. 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,
@@ -17463,12 +17529,40 @@ nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
 #      defaults write com.apple.Terminal TermCapString nsterm-bce
 #
 # and that it is not set in Terminal's preferences dialog.
+#
+# Modified for OS X 10.8, omitting bw based on testing with tack -TD
+#
+# Notes:
+# * The terminal description matches the default settings.
+# * The keyboard is configurable via a dialog.
+# * By default khome, kend, knext and kprev are honored only with a
+#   shift-modifier.
+# * There are bindings for control left/right arrow (but not up/down).
+#   Added those to nsterm-16color, which is the version used for OS X 10.6
+# * "Allow VT100 application keypage mode" is by default disabled.
+#   There is no way to press keypad-comma unless application mode is enabled
+#   and used.
+# * 132-column mode stopped working during vttest's tests.  Consider it broken.
+# * CHT, REP, SU, SD are buggy.
+# * ECH works (also in Leopard), but is not used here for compatibility.
+# * The terminal preferences dialog replaces xterm-color by xterm-16color and
+#   xterm-256color.  However, it adds "nsterm", so it is possible to use the
+#   nsterm entry from this file to override the MacPorts (20110404) or
+#   system (20081102) copy of this file.
 nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (bce),
-       bce, bw, use=nsterm-16color,
+       bce, use=nsterm-16color,
+
+# This is tested with OS X 10.8 (Mountain Lion), 2012/08/11
+#      TERM_PROGRAM_VERSION=309
+# Earlier reports state that these differences also apply to OS X 10.7 (Lion),
+#      TERM_PROGRAM_VERSION=303
+nsterm-256color|Terminal.app in OS X 10.8,
+       ccc@,
+       initc@, use=xterm+256color, use=nsterm-bce,
 
 # This is an alias which should always point to the "current" version
 nsterm|Apple_Terminal|AppKit Terminal.app,
-       use=nsterm-16color,
+       use=nsterm-256color,
 
 # iTerm.app from http://iterm.sourceforge.net/ is an alternative (and
 # more featureful) terminal emulator for Mac OS X. It is similar
@@ -18463,6 +18557,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,
 
 #=========================================================#
@@ -18542,7 +18637,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,
@@ -18566,14 +18661,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,
@@ -18651,12 +18746,12 @@ bq300-8|Bull vt320 full 8 bits 80 columns,
        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,
+       dch=\233%p1%dP, dch1=\233P, dl=\233%p1%dM, dl1=\233M,
        dsl=\2331$}\2332$~\n\2330$}, ech=\233%p1%dX, ed=\233J,
        el=\233K, el1=\2331K, enacs=\E(B\E)0,
        flash=\233?5h$<50>\233?5l, fsl=\2330$}, home=\233H,
-       ht=^I, hts=\EH, ich=\233%p1%d@, il=\233%p1%dL, ind=\ED,
-       is1=\E[63;2"p\E[2h,
+       ht=^I, hts=\EH, ich=\233%p1%d@, il=\233%p1%dL, il1=\233L,
+       ind=\ED, is1=\E[63;2"p\E[2h,
        is2=\E[?2h\E[?3l\E[?5l\E[?7h\E[?8h\E>\E[?1l\E G\E[?42l\E[?4l,
        is3=\2330$}\233?25h\2332l\233H\233J, ka1=\217w,
        ka3=\217y, kb2=\217u, kbs=^H, kc1=\217q, kc3=\217s,
@@ -18669,11 +18764,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,
@@ -19278,14 +19374,14 @@ z29a|z29a-kc-bc|h29a-kc-bc|heath/zenith 29 in ansi mode,
        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[1P, dim=\E[2m, dl=\E[%p1%dM,
-       dsl=\E[>1l, ed=\E[J, el=\E[K, fsl=\E[u\E[>5l, home=\E[H,
-       ht=^I, hts=\EH, if=/usr/share/tabset/vt100, il=\E[%p1%dL,
-       ind=\ED, kbs=^H, kclr=\E[J, kcub1=\EOD, kcud1=\EOB,
-       kcuf1=\EOC, kcuu1=\EOA, ked=\E[J, kf0=\E[~, kf1=\EOS,
-       kf2=\EOT, kf3=\EOU, kf4=\EOV, kf5=\EOW, kf6=\EOP, kf7=\EOQ,
-       kf8=\EOR, kf9=\EOX, khome=\E[H, lf0=help, mc0=\E#7,
-       nel=^M\ED, rc=\E[r, rev=\E[7m, ri=\EM, rmcup=\E[?7h,
-       rmso=\E[m, rmul=\E[m,
+       dl1=\E[M, dsl=\E[>1l, ed=\E[J, el=\E[K, fsl=\E[u\E[>5l,
+       home=\E[H, ht=^I, hts=\EH, if=/usr/share/tabset/vt100,
+       il=\E[%p1%dL, il1=\E[L, ind=\ED, kbs=^H, kclr=\E[J,
+       kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, ked=\E[J,
+       kf0=\E[~, kf1=\EOS, kf2=\EOT, kf3=\EOU, kf4=\EOV, kf5=\EOW,
+       kf6=\EOP, kf7=\EOQ, kf8=\EOR, kf9=\EOX, khome=\E[H, lf0=help,
+       mc0=\E#7, nel=^M\ED, rc=\E[r, rev=\E[7m, ri=\EM,
+       rmcup=\E[?7h, rmso=\E[m, rmul=\E[m,
        rs1=\E<\E[1;24r\E[24;1H\E[?7h\E[>4h\E[>1;2;3;5;6;7;8;9l\E[m\E[11m,
        sc=\E[s, sgr0=\E[m, smcup=\E[?7l, smso=\E[7;2m, smul=\E[4m,
        tbc=\E[3g, tsl=\E[s\E[>5;1h\E[25;%i%dH\E[1K,
@@ -20485,9 +20581,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
@@ -20542,7 +20638,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(,
@@ -21279,6 +21375,103 @@ 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.  It matches a feature which was
+#    added in xterm patch #107.
+# 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.
@@ -22548,7 +22741,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # 2009-12-12
 #      * updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta)
 #
-# 2009-12-12
+# 2009-12-19
 #      * add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
 #      * rename minix to minix-1.7, add minix entry for Minux3 -TD
 #
@@ -22663,4 +22856,116 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # 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
+#
+# 2012-05-12
+#      * rewrite vt520 entry based on vt420 -TD
+#      * corrected 'op' for bterm (report by Samuel Thibault) -TD
+#
+# 2012-06-02
+#      * add kdch1 to wsvt25 entry from NetBSD CVS (reported by David Lord,
+#        analysis by Martin Husemann).
+#      * add cnorm/civis to wsvt25 entry from NetBSD CVS (report/analysis by
+#        Onno van der Linden).
+#      * add kdch1 aka "Remove" to vt220 and vt220-8 entries -TD
+#      * add kdch1, etc., to qvt108 -TD
+#      * add dl1/il1 to some entries based on dl/il values -TD
+#      * add dl to simpleterm -TD
+#
+# 2012-06-10
+#      * modify some older xterm entries to align with xterm source -TD
+#      * separate "xterm-old" alias from "xterm-r6" -TD
+#
+# 2012-07-28
+#      * add E3 to xterm-basic and putty -TD
+#
+# 2012-08-11
+#      * add nsterm-256color, make this the default nsterm -TD
+#      * remove bw from nsterm-bce, per testing with tack -TD
+#
+# 2012-10-12
+#       * add vte-2012, gnome-2012, making these the defaults for vte/gnome
+#        (patch by Christian Persch).
+#
+# 2012-11-02
+#      * reviewed vte-2012, reverted most of the change since it was incorrect
+#        based on testing with tack -TD
+#      * un-cancel the initc in vte-256color, since this was implemented
+#        starting with version 0.20 in 2009 -TD
+#
+# 2013-03-16
+#      * correct typo in sgr string for sun-color,
+#        add bold for consistency with sgr,
+#        change smso for consistency with sgr -TD
+#      * correct typo in sgr string for terminator -TD
+#      * add blink to the attributes masked by ncv in linux-16color (report
+#        by Benjamin Sittler)
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!