# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.675 $
-# $Date: 2018/01/27 15:14:08 $
+# $Revision: 1.682 $
+# $Date: 2018/02/24 14:23:54 $
#
# 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
sgr0=\E[0m,
ansi+sgrso|ANSI standout only,
rmso=\E[m, smso=\E[7m,
-ansi+sgrul|ansi underline only,
+ansi+sgrul|ANSI underline only,
rmul=\E[m, smul=\E[4m,
ansi+sgrbold|ANSI graphic renditions; assuming terminal has bold; not dim,
bold=\E[1m,
# 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,
+ansi+pp|ANSI printer port,
mc5i,
mc0=\E[i, mc4=\E[4i, mc5=\E[5i,
dec+pp|DEC autoprinter mode,
# USENET {akgua,msdc,sb1,sb6,gatech}!emory!mlhhh.
#
# (Added vt100 <rc>,<sc> to quiet a tic warning --esr)
-ansi77|ansi 3.64 standard 1977 version,
+ansi77|ANSI 3.64 standard 1977 version,
OTbs, am, mir,
cols#80, it#8, lines#24,
bel=^G, clear=\E[;H\E[2J, cr=\r, csr=\E[%i%p1%d;%p2%dr,
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$~\r\E[1$}\E[K\E[$},
- ed=\E[J, el=\E[K, flash=\E[?5h\E[?5l$<200/>, fsl=\E[$},
+ ed=\E[J, el=\E[K, flash=\E[?5h$<200/>\E[?5l, fsl=\E[$},
home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL,
il1=\E[L, ind=\ED,
is2=\E<\E\sF\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r
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$~\r\E[1$}\E[K\E[$}, ed=\E[J$<10/>,
- el=\E[K$<4/>, flash=\E[?5h\E[?5l$<200/>, fsl=\E[$},
+ el=\E[K$<4/>, flash=\E[?5h$<200/>\E[?5l, fsl=\E[$},
home=\E[H, ht=^I, hts=\EH, ich=\E[%p1%d@, ich1=\E[@,
il=\E[%p1%dL, il1=\E[L, ind=\ED,
is2=\E<\E\sF\E>\E[?1h\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h\E[1;24r
ht=^I, hts=\EH, ind=\n, indn=\E[%p1%dS, invis=\E[8m,
is2=\E[!p\E[?3;4l\E[4l\E>, kb2=\EOE, kbs=^?, kcbt=\E[Z,
kent=\EOM, kmous=\E[M, rc=\E8, rev=\E[7m, ri=\EM,
- rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B, rmam=\E[?7l,
- rmcup=\E[?1049l, rmkx=\E[?1l\E>, rmso=\E[27m,
- rmul=\E[24m, rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
+ rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l,
+ rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec,
+ rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|
%t;7%;%?%p7%t;8%;m,
- sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
- smcup=\E[?1049h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m,
- tbc=\E[3g, vpa=\E[%i%p1%dd, use=ansi+idc, use=ansi+idl,
- use=ansi+enq, use=xterm+256color, use=ecma+color,
- use=xterm+pcfkeys, use=xterm+sl-twm,
+ sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h,
+ smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
+ vpa=\E[%i%p1%dd, use=ansi+idc, use=ansi+idl,
+ use=ansi+enq, use=ecma+italics, use=xterm+256color,
+ use=ecma+color, use=xterm+pcfkeys, use=xterm+sl-twm,
#### Other GNOME
# Multi-Gnome-Terminal 1.6.2
kPRV6=\E[5@, kRIT5=\EOc, kUP=\E[a, kUP5=\EOa,
# rxvt was originally "xvt", first announced in April 1993:
-# http://www.informatica.co.cr/linux-desktops/research/1993/0416.html
+# http://www.krsaborio.net/linux-desktops/research/1993/0416.html
+#------------------------------------------------------------------------------
+# Article: 567 of comp.os.linux.announce
+# Path: pavo.csi.cam.ac.uk!warwick!uknet!pipex!uunet!zaphod.mps.ohio-state.edu!
+# caen!batcomputer!theory.TC.Cornell.EDU!mdw
+# From: nation@rocket.sanders.com (Robert Nation)
+# Newsgroups: comp.os.linux.announce
+# Subject: xvt upload
+# Date: 16 Apr 1993 18:13:07 GMT
+# Organization: Cornell Theory Center
+# Lines: 13
+# Approved: linux-announce@tc.cornell.edu (Matt Welsh)
+# Message-ID: <1qmsvj$pvj@fitz.TC.Cornell.EDU>
+# NNTP-Posting-Host: theory.tc.cornell.edu
+# Keywords: xvt, xterm, Xwindows
+# Originator: mdw@theory.TC.Cornell.EDU
+#
+# Rxvt has been uploaded to /pub/Linux/Incoming/rxvt.tar.z and
+# rxvt.README on sunsite.unc.edu.
+#
+# Xvt is an xterm replacement which uses a little less memory, and is
+# suitable for use on machines with small memories. Tek4010 support
+# is removed.
+#
+# Modifications were made by Rob Nation (nation@rocket.sanders.lockheed.com)
+# to make it a little more compact, and to add and remove certain features.
+#
+#
+# --
+# Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu
+#------------------------------------------------------------------------------
#
# Though its change-log does not mention this, John Davis has stated that he
# was the author of the changes to use the bce ("new color model") which was
# rxvt had usable color support with 2.16 (April 2, 1996), with some help by my
# work on vttest, as well as bug reports to Mark Olesen. For instance, the fix
# mentioned here
-# http://web.archiveorange.com/archive/v/6ETvLb5wHtbbzCaS4S9J
+# https://web.archive.org/web/20141016124430/http://web.archiveorange.com/archive/v/6ETvLb5wHtbbzCaS4S9J
# was from one of my bug-reports -TD
#
# While the color model both for xterm and rxvt was based on Linux console,
# italics may show up with yellow color
# has control cursor-keys, alt cursor-keys, still no combinations
# has control pageup/down
+# tmux extensions, see TERMINFO EXTENSIONS in tmux(1)
+# Se and Ss are implemented in the source-code, but the terminfo
+# provided with the source is incorrect, since Se/Ss are mis-coded
+# as booleans rather than strings.
st-0.7|simpleterm 0.7,
ccc,
dim=\E[2m,
%=%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%;%?%p5%t;2%;%?%p7%t;8%;m,
- Ss=\E]52;%p1%s;%p2%s\007, kDN3=\E[1;3B, kDN5=\E[1;5B,
- kLFT3=\E[1;3D, kLFT5=\E[1;5D, kNXT3=\E[6;3~,
- kNXT5=\E[6;5~, kPRV3=\E[5;3~, kPRV5=\E[5;5~,
- kRIT3=\E[1;3C, kRIT5=\E[1;5C, kUP3=\E[1;3A, kUP5=\E[1;5A,
- use=ecma+strikeout, use=st-0.6,
+ Ms=\E]52;%p1%s;%p2%s\007, Se=\E[2 q, Ss=\E[%p1%d q,
+ kDN3=\E[1;3B, kDN5=\E[1;5B, kLFT3=\E[1;3D, kLFT5=\E[1;5D,
+ kNXT3=\E[6;3~, kNXT5=\E[6;5~, kPRV3=\E[5;3~,
+ kPRV5=\E[5;5~, kRIT3=\E[1;3C, kRIT5=\E[1;5C,
+ kUP3=\E[1;3A, kUP5=\E[1;5A, use=ecma+strikeout,
+ use=st-0.6,
# st-0.4.1
#
initc@, oc@, use=xterm+256color, use=st,
#### TERMINATOR
-# https://code.google.com/p/jessies/
+# https://github.com/software-jessies-org/jessies/wiki/Terminator
+#
# Tested using their Debian package org.jessies.terminator 6.104.3256 on 64-bit
# Debian/current -TD (2011/8/20)
#
use=xterm+sl-twm,
#### TERMINOLOGY
-# http://enlightenment.org
+# https://www.enlightenment.org/about-terminology
#
# Tested terminology-0.3.0, 0.6.1, using tack and vttest. This is not a vt100
# emulator, nor is it compatible with xterm, but it uses a few features from
# Use this for cygwin32 (tested with beta 19.1)
# underline is colored bright magenta
# shifted kf1-kf12 are kf11-kf22
-cygwinB19|ansi emulation for cygwin32,
+cygwinB19|ANSI emulation for cygwin32,
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~,
# 2005/11/12 -TD
# Remove cbt since it does not work in current cygwin
# Add 'mir' and 'in' flags based on tack
-cygwin|ansi emulation for Cygwin,
+cygwin|ANSI emulation for Cygwin,
am, hs, mir, msgr, xon,
colors#8, it#8, pairs#64,
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j
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, ed=\E[J, el=\E[K, el1=\E[1K,
- flash=\E[?5h\E[?5l$<200/>, home=\E[H, hpa=\E[%i%p1%dG,
+ flash=\E[?5h$<200/>\E[?5l, 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=\n, invis=\E[8m, kNXT=\E[6$, kPRV=\E[5$,
kb2=\E[G, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
# Alt-X \E[104~
# Alt-Y \E[105~
# Alt-Z \E[106~
-djgpp|ansi emulation for DJGPP alpha,
+djgpp|ANSI emulation for DJGPP alpha,
am, bce, msgr, xhp, xon, xt,
colors#8, it#8, pairs#64,
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j
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[3;5v, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM,
- dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5l\E[?5h$<200/>,
+ dl1=\E[M, ed=\E[J, el=\E[K, flash=\E[?5l$<200/>\E[?5h,
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=\n, indn=\E[%p1%dS,
is2=\E<\E>\E[?1l\E[?3l\E[?4l\E[?5h\E[?7h\E[?8h\E[3g\E[>5g\E(
use=ecma+color, use=minix-1.7,
# See
-# http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html
+# https://web.archive.org/web/20030914201935/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-1.7|minix console (v1.7),
am, xenl,
# + add mlterm-direct -TD
# + add descriptions for ANSI building-blocks -TD
#
+# 2018-02-24
+# + correct Ss/Ms interchange in st-0.7 entry (tmux #1264) -TD
+# + fix remaining flash capabilities with trailing mandatory delays -TD
+#
######## SHANTIH! SHANTIH! SHANTIH!
/****************************************************************************
- * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <tic.h>
-MODULE_ID("$Id: comp_parse.c,v 1.100 2017/09/20 00:37:08 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.101 2018/02/24 22:33:40 tom Exp $")
static void sanity_check2(TERMTYPE2 *, bool);
NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
_nc_suppress_warnings = oldsuppress;
}
+#if NCURSES_XNAMES
+static unsigned
+find_capname(TERMTYPE2 *p, const char *name)
+{
+ unsigned num_names = NUM_EXT_NAMES(p);
+ unsigned n;
+ for (n = 0; n < num_names; ++n) {
+ if (!strcmp(p->ext_Names[n], name))
+ break;
+ }
+ return n;
+}
+
+static int
+extended_captype(TERMTYPE2 *p, unsigned which)
+{
+ int result = UNDEF;
+ unsigned limit = 0;
+ limit += p->ext_Booleans;
+ if (limit != 0 && which < limit) {
+ result = BOOLEAN;
+ } else {
+ limit += p->ext_Numbers;
+ if (limit != 0 && which < limit) {
+ result = NUMBER;
+ } else {
+ limit += p->ext_Strings;
+ if (limit != 0 && which < limit) {
+ result = STRING;
+ } else if (which >= limit) {
+ result = CANCEL;
+ }
+ }
+ }
+ return result;
+}
+
+static const char *
+name_of_captype(int which)
+{
+ const char *result = "?";
+ switch (which) {
+ case BOOLEAN:
+ result = "boolean";
+ break;
+ case NUMBER:
+ result = "number";
+ break;
+ case STRING:
+ result = "string";
+ break;
+ }
+ return result;
+}
+
+/*
+ * Disallow changing the type of an extended capability when doing a "use"
+ * if one or the other is a string.
+ */
+static int
+invalid_merge(TERMTYPE2 *to, TERMTYPE2 *from)
+{
+ int rc = FALSE;
+ char *to_name = _nc_first_name(to->term_names);
+ char *from_name = strdup(_nc_first_name(from->term_names));
+ unsigned num_names = NUM_EXT_NAMES(from);
+ unsigned n;
+
+ for (n = 0; n < num_names; ++n) {
+ const char *capname = from->ext_Names[n];
+ int tt = extended_captype(to, find_capname(to, capname));
+ int tf = extended_captype(from, n);
+
+ if (tt <= STRING
+ && tf <= STRING
+ && (tt == STRING) != (tf == STRING)) {
+ if (from_name != 0 && strcmp(to_name, from_name)) {
+ DEBUG(2,
+ ("merge of %s to %s changes type of %s from %s to %s",
+ from_name,
+ to_name,
+ from->ext_Names[n],
+ name_of_captype(tf),
+ name_of_captype(tt)));
+ } else {
+ DEBUG(2, ("merge of %s changes type of %s from %s to %s",
+ to_name,
+ from->ext_Names[n],
+ name_of_captype(tf),
+ name_of_captype(tt)));
+ }
+ _nc_warning("merge changes type of %s from %s to %s",
+ from->ext_Names[n],
+ name_of_captype(tf),
+ name_of_captype(tt));
+ rc = TRUE;
+ }
+ }
+ free(from_name);
+ return rc;
+}
+#define validate_merge(p, q) \
+ if (invalid_merge(&((p)->tterm), &((q)->tterm))) \
+ return FALSE
+#else
+#define validate_merge(p, q) /* nothing */
+#endif
+
NCURSES_EXPORT(int)
_nc_resolve_uses2(bool fullresolve, bool literal)
/* try to resolve all use capabilities */
* Now merge in each use entry in the proper
* (reverse) order.
*/
- for (; qp->nuses; qp->nuses--)
+ for (; qp->nuses; qp->nuses--) {
+ validate_merge(&merged,
+ qp->uses[qp->nuses - 1].link);
_nc_merge_entry(&merged,
qp->uses[qp->nuses - 1].link);
+ }
/*
* Now merge in the original entry.
*/
+ validate_merge(&merged, qp);
_nc_merge_entry(&merged, qp);
/*