# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.1059 $
-# $Date: 2023/06/05 21:40:20 $
+# $Revision: 1.1060 $
+# $Date: 2023/07/09 00:05:04 $
#
# 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
# resize.pl gets no reply, resize.sh needs fix for no reply.
scrt|securecrt|SecureCRT emulating xterm-256color,
bce@, km@, npc,
- bel@, cvvis@, kcbt=\E[Z, kent=\EOM, use=vt220+pcedit,
- use=xterm+256setaf, use=ecma+index, use=ansi+rep,
- use=xterm+keypad, use=xterm+pcfkeys, use=xterm-basic,
+ bel@, cvvis@, kcbt=\E[Z, kent=\EOM, use=linux+kbs,
+ use=vt220+pcedit, use=xterm+256setaf, use=ecma+index,
+ use=ansi+rep, use=xterm+keypad, use=xterm+pcfkeys,
+ use=xterm-basic,
# Absolute Telnet
# (eval 2021/02/20)
# supports 256-colors, including changing palette (ncurses menu d works)
# supports UTF-8, but honors VT100 line-drawing
absolute|Absolute Telnet emulating xterm,
- kcbt=\E[Z, use=ecma+index, use=ansi+rep,
+ kcbt=\E[Z, use=ecma+index, use=linux+kbs, use=ansi+rep,
use=vt220+pcedit, use=xterm+keypad, use=xterm+app,
use=xterm+pcf0, use=xterm+256color, use=xterm+x11mouse,
use=xterm-basic,
rsupm=\E[75m, smm@, smpch=\E[11m, sshm=\E[1:2m,
ssubm=\E[74m, ssupm=\E[73m, Rmol=\E[55m, Smol=\E[53m,
Smulx=\E[4:%p1%dm, blink2=\E[6m, norm=\E[22m,
- opaq=\E[28m, smul2=\E[21m, use=ansi+rep,
+ opaq=\E[28m, smul2=\E[21m, use=linux+kbs, use=ansi+rep,
use=ecma+strikeout, use=ecma+index, use=vt420+lrmm,
use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm+tmux,
use=ecma+italics, use=xterm-basic, use=bracketed+paste,
ms-terminal|Windows10 terminal,
npc,
cud1=\E[B, kcbt=\E[Z, rmkx=\E[?1l, rmm@, smkx=\E[?1h, smm@,
- Cr@, Ms@, use=xterm+256color, use=xterm+pcfkeys,
- use=ansi+rep, use=xterm+sm+1006, use=ecma+index,
- use=ecma+italics, use=ecma+strikeout, use=xterm-basic,
- use=xterm+tmux,
+ Cr@, Ms@, use=linux+kbs, use=xterm+256color,
+ use=xterm+pcfkeys, use=ansi+rep, use=xterm+sm+1006,
+ use=ecma+index, use=ecma+italics, use=ecma+strikeout,
+ use=xterm-basic, use=xterm+tmux,
#### Visual Studio
# Visual Studio Code 1.45.0 uses xterm.js 12.8.1 (see https://xtermjs.org/).
# - color-palette cannot be changed
vscode|xterm.js|Visual Studio Code terminal using xterm.js,
npc,
- kcbt=\E[Z, rmkx=\E[?1l, smkx=\E[?1h, use=xterm+256setaf,
- use=ecma+index, use=xterm+sm+1006, use=xterm+pcfkeys,
- use=ecma+italics, use=xterm-basic, use=bracketed+paste,
+ kcbt=\E[Z, rmkx=\E[?1l, smkx=\E[?1h, use=linux+kbs,
+ use=xterm+256setaf, use=ecma+index, use=xterm+sm+1006,
+ use=xterm+pcfkeys, use=ecma+italics, use=xterm-basic,
+ use=bracketed+paste,
vscode-direct|Visual Studio Code with direct-colors,
use=xterm+indirect, use=vscode,
use=xterm-p370,
# This fragment is for people who cannot agree on what the backspace key
-# should send.
+# should send. The ncurses configure script option "--with-xterm-kbs" can
+# set it to BS (standard) or DEL (Linux's notion of "vt220"). xterm provides
+# either, depending on how the pseudoterminals are configured.
xterm+kbs|fragment for backspace key,
kbs=^H,
+
+# Use this fragment for terminals that always use DEL for "backspace".
+linux+kbs|fragment for "backspace" key,
+ kbs=^?,
#
# This fragment describes as much of XFree86 xterm's "pc-style" function
# keys as will fit into terminfo's 60 function keys.
gnome-rh62|GNOME terminal,
bce,
kdch1=^?, kf1=\EOP, kf2=\EOQ, kf3=\EOR, kf4=\EOS,
- use=xterm-color,
+ use=linux+kbs, use=xterm-color,
# GNOME Terminal 1.4.0.4 (Redhat 7.2)
#
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;m%?%p9%t\016%e
\017%;,
sgr0=\E[0m\017, smam=\E[?7h, tbc@, use=vt220+cvis,
- use=xterm-color,
+ use=linux+kbs, use=xterm-color,
# GNOME Terminal 2.0.1 (Redhat 8.0)
#
hterm|Chromium hterm,
npc,
U8#1,
- kcbt=\E[Z, kent=\EOM, nel=\EE, use=xterm+osc104,
- use=ecma+index, use=ansi+rep, use=ecma+strikeout,
- use=vt420+lrmm, use=xterm+sm+1006, use=xterm+tmux,
- use=ecma+italics, use=xterm+pcfkeys, use=xterm-basic,
- use=bracketed+paste,
+ kcbt=\E[Z, kent=\EOM, nel=\EE, use=linux+kbs,
+ use=xterm+osc104, use=ecma+index, use=ansi+rep,
+ use=ecma+strikeout, use=vt420+lrmm, use=xterm+sm+1006,
+ use=xterm+tmux, use=ecma+italics, use=xterm+pcfkeys,
+ use=xterm-basic, use=bracketed+paste,
hterm-256color|Chromium hterm with xterm 256-colors,
use=xterm+256color2, use=hterm,
# or not is debatable).
kvt|KDE terminal,
bce, km@,
- kdch1=^?, kend=\E[F, khome=\E[H, use=xterm-color,
+ kdch1=^?, kend=\E[F, khome=\E[H, use=linux+kbs,
+ use=xterm-color,
# Konsole 1.0.1 (2001/11/25)
# (formerly known as kvt)
terminology-1.8.1|EFL-based terminal emulator (1.8.1),
km@,
cvvis@, flash@, initc@, kcbt=\E[Z, rmm@, smm@, Ms@,
- use=ecma+index, use=xterm+256setaf, use=ansi+rep,
- use=ecma+strikeout, use=xterm+sm+1006,
+ use=linux+kbs, use=ecma+index, use=xterm+256setaf,
+ use=ansi+rep, use=ecma+strikeout, use=xterm+sm+1006,
use=xterm+pcfkeys, use=xterm+tmux, use=vt220+cvis,
use=ecma+italics, use=xterm-basic, use=report+version,
bel@, blink@, dim@, invis@, kcbt=\E[Z, ritm@, rmkx=\E[?1l,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|
%t;7%;m,
- sitm@, smkx=\E[?1h, use=xterm+256setaf, use=ecma+index,
- use=xterm+sm+1006, use=xterm+pcfkeys, use=xterm-basic,
- use=bracketed+paste,
+ sitm@, smkx=\E[?1h, use=linux+kbs, use=xterm+256setaf,
+ use=ecma+index, use=xterm+sm+1006, use=xterm+pcfkeys,
+ use=xterm-basic, use=bracketed+paste,
######## UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS
#
# 2023-06-05
# + add xterm+focus to foot+base (patch by Daniel Ekloef).
#
+# 2023-07-08
+# + add linux+kbs for terminals which imitate xterm's behavior with
+# Linux -TD
+#
######## SHANTIH! SHANTIH! SHANTIH!
#include <tic.h>
-MODULE_ID("$Id: write_entry.c,v 1.127 2023/05/27 20:13:10 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.130 2023/07/08 14:00:24 tom Exp $")
#if 1
#define TRACE_OUT(p) DEBUG(2, p)
int myerr = ferror(fp) ? errno : 0;
if (myerr) {
_nc_syserr_abort("error writing %s/%s: %s",
- _nc_tic_dir(0),
+ _nc_tic_dir(NULL),
filename,
strerror(myerr));
} else {
_nc_syserr_abort("error writing %s/%s: %u bytes vs actual %lu",
- _nc_tic_dir(0),
+ _nc_tic_dir(NULL),
filename,
offset,
(unsigned long) actual);
} else if (!verified[s - dirnames]) {
_nc_SPRINTF(dir, _nc_SLIMIT(sizeof(dir)) LEAF_FMT, code);
if (make_db_root(dir) < 0) {
- _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(0), dir);
+ _nc_err_abort("%s/%s: permission denied", _nc_tic_dir(NULL), dir);
} else {
verified[s - dirnames] = TRUE;
}
make_db_path(char *dst, const char *src, size_t limit)
{
int rc = -1;
- const char *top = _nc_tic_dir(0);
+ const char *top = _nc_tic_dir(NULL);
if (src == top || _nc_is_abs_path(src)) {
if (strlen(src) + 1 <= limit) {
{
const char *destination;
char actual[PATH_MAX];
+ bool specific = (dir != NULL);
- if (dir == 0 && use_terminfo_vars())
+ if (!specific && use_terminfo_vars())
dir = getenv("TERMINFO");
- if (dir != 0)
+ if (dir != NULL)
(void) _nc_tic_dir(dir);
- destination = _nc_tic_dir(0);
+ destination = _nc_tic_dir(NULL);
if (make_db_root(destination) < 0) {
- char *home = _nc_home_terminfo();
+ bool success = FALSE;
- if (home != 0) {
- destination = home;
- if (make_db_root(destination) < 0)
- _nc_err_abort("%s: permission denied (errno %d)",
- destination, errno);
+ if (!specific) {
+ char *home = _nc_home_terminfo();
+
+ if (home != NULL) {
+ destination = home;
+ if (make_db_root(destination) == 0)
+ success = TRUE;
+ }
+ }
+ if (!success) {
+ _nc_err_abort("%s: permission denied (errno %d)",
+ destination, errno);
}
}
make_db_path(actual, destination, sizeof(actual));
#else
if (chdir(_nc_tic_dir(destination)) < 0
- || getcwd(actual, sizeof(actual)) == 0)
+ || getcwd(actual, sizeof(actual)) == NULL)
_nc_err_abort("%s: not a directory", destination);
#endif
_nc_keep_tic_dir(actual);
#if USE_HASHED_DB
if (_nc_write_object(tp, buffer + 1, &offset, limit - 1) != ERR) {
- DB *capdb = _nc_db_open(_nc_tic_dir(0), TRUE);
+ DB *capdb = _nc_db_open(_nc_tic_dir(NULL), TRUE);
DBT key, data;
- if (capdb != 0) {
+ if (capdb != NULL) {
buffer[0] = 0;
memset(&key, 0, sizeof(key));
if (stat(filename, &statbuf) == -1
|| (start_time = statbuf.st_mtime) == 0) {
_nc_syserr_abort("error obtaining time from %s/%s",
- _nc_tic_dir(0), filename);
+ _nc_tic_dir(NULL), filename);
}
}
while (*other_names != '\0') {
_nc_warning("terminal alias %s too long.", ptr);
continue;
}
- if (strchr(ptr, '/') != 0) {
+ if (strchr(ptr, '/') != NULL) {
_nc_warning("cannot link alias %s.", ptr);
continue;
}
#define CUR TerminalType(my_term).
-MODULE_ID("$Id: win_driver.c,v 1.70 2023/02/12 00:31:33 tom Exp $")
+#define CONTROL_PRESSED (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
+
+MODULE_ID("$Id: win_driver.c,v 1.71 2023/07/08 19:53:51 tom Exp $")
#define TypeAlloca(type,count) (type*) _alloca(sizeof(type) * (size_t) (count))
#define write_screen WriteConsoleOutput
#define read_screen ReadConsoleOutput
#endif
-
+/* *INDENT-OFF* */
static const LONG keylist[] =
{
- GenMap(VK_PRIOR, KEY_PPAGE),
- GenMap(VK_NEXT, KEY_NPAGE),
- GenMap(VK_END, KEY_END),
- GenMap(VK_HOME, KEY_HOME),
- GenMap(VK_LEFT, KEY_LEFT),
- GenMap(VK_UP, KEY_UP),
- GenMap(VK_RIGHT, KEY_RIGHT),
- GenMap(VK_DOWN, KEY_DOWN),
+ GenMap(VK_PRIOR, KEY_PPAGE),
+ GenMap(VK_NEXT, KEY_NPAGE),
+ GenMap(VK_END, KEY_END),
+ GenMap(VK_HOME, KEY_HOME),
+ GenMap(VK_LEFT, KEY_LEFT),
+ GenMap(VK_UP, KEY_UP),
+ GenMap(VK_RIGHT, KEY_RIGHT),
+ GenMap(VK_DOWN, KEY_DOWN),
GenMap(VK_DELETE, KEY_DC),
GenMap(VK_INSERT, KEY_IC)
};
static const LONG ansi_keys[] =
{
- GenMap(VK_PRIOR, 'I'),
- GenMap(VK_NEXT, 'Q'),
- GenMap(VK_END, 'O'),
- GenMap(VK_HOME, 'H'),
- GenMap(VK_LEFT, 'K'),
- GenMap(VK_UP, 'H'),
- GenMap(VK_RIGHT, 'M'),
- GenMap(VK_DOWN, 'P'),
+ GenMap(VK_PRIOR, 'I'),
+ GenMap(VK_NEXT, 'Q'),
+ GenMap(VK_END, 'O'),
+ GenMap(VK_HOME, 'H'),
+ GenMap(VK_LEFT, 'K'),
+ GenMap(VK_UP, 'H'),
+ GenMap(VK_RIGHT, 'M'),
+ GenMap(VK_DOWN, 'P'),
GenMap(VK_DELETE, 'S'),
GenMap(VK_INSERT, 'R')
};
+/* *INDENT-ON* */
#define N_INI ((int)array_length(keylist))
#define FKEYS 24
#define MAPSIZE (FKEYS + N_INI)
*buf = (int) inp_rec.Event.KeyEvent.uChar.AsciiChar;
vk = inp_rec.Event.KeyEvent.wVirtualKeyCode;
/*
- * There are 24 virtual function-keys, and typically
- * 12 function-keys on a keyboard. Use the shift-modifier
- * to provide the remaining 12 keys.
+ * There are 24 virtual function-keys (defined in winuser.h),
+ * and typically 12 function-keys on a keyboard. Use the
+ * shift-modifier to provide the remaining keys.
*/
if (vk >= VK_F1 && vk <= VK_F12) {
if (inp_rec.Event.KeyEvent.dwControlKeyState & SHIFT_PRESSED) {
ungetch('\0');
*buf = AnsiKey(vk);
}
+ } else if (vk == VK_BACK) {
+ if (!(inp_rec.Event.KeyEvent.dwControlKeyState
+ & (SHIFT_PRESSED | CONTROL_PRESSED))) {
+ *buf = KEY_BACKSPACE;
+ }
}
break;
} else if (inp_rec.EventType == MOUSE_EVENT) {