-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3275 2019/02/16 23:45:57 tom Exp $
+-- $Id: NEWS,v 1.3278 2019/02/23 22:52:48 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20190223
+ + fix typo in adds200 -TD
+ + add tic check for consistent alternate character set capabilities.
+ + improve check in mvcur() to decide whether to use hard-tabs, using
+ xt, tbc and hts as clues.
+ + replace check in reset command for obsolete "pt" capability using
+ tbc and hts capabilities as clues (report by Nicolas Marriott).
+
20190216
+ improve manual page description of TABSIZE.
+ add test/demo_tabs program.
-5:0:10 6.1 20190216
+5:0:10 6.1 20190223
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1267 2019/02/13 22:19:33 tom Exp $
+# $Id: dist.mk,v 1.1268 2019/02/23 16:29:00 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 1
-NCURSES_PATCH = 20190216
+NCURSES_PATCH = 20190223
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
-# $Revision: 1.726 $
-# $Date: 2019/01/12 22:33:55 $
+# $Revision: 1.727 $
+# $Date: 2019/02/23 22:45:23 $
#
# 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
acsc=jLkDl@mHnhq`tXuTv\\wPxd, dch1=\EE, is2=\EV\EB,
kbs=^H, kcbt=\EO, kdch1=\EE, kich1=\EF, krmir=\EF, rmacs=\E2,
rmir=\EF, rmso=\ER\E0@\EV, smacs=\E1, smir=\EF,
- smso=\ER\E0P\EV, cd=\Ek, kF1=^B!\r, kF2=^B"\r, kF3=^B#\r,
+ smso=\ER\E0P\EV, ed=\Ek, kF1=^B!\r, kF2=^B"\r, kF3=^B#\r,
kF4=^B$\r, kF5=^B%\r, kF6=^B&\r, kF7=^B'\r, kF8=^B(\r,
use=regent40+,
# From: <edward@onyx.berkeley.edu> Thu Jul 9 09:27:33 1981
# + use SGR 1006 mouse for putty -TD
# + add ti703/ti707, ti703-w/ti707-w (Robert Clausecker)
#
+# 2019-02-23
+# + fix typo in adds200 -TD
+#
######## SHANTIH! SHANTIH! SHANTIH!
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.615 2019/01/21 14:50:27 tom Exp $
+ * $Id: curses.priv.h,v 1.616 2019/02/23 17:54:39 tom Exp $
*
* curses.priv.h
*
#endif
+#define HasHardTabs() (NonEmpty(clear_all_tabs) && NonEmpty(set_tab))
+
#define TR_MUTEX(data) _tracef("%s@%d: me:%08lX COUNT:%2u/%2d/%6d/%2d/%s%9u: " #data, \
__FILE__, __LINE__, \
(unsigned long) (pthread_self()), \
/****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2018,2019 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 *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mvcur.c,v 1.146 2018/03/03 22:40:47 tom Exp $")
+MODULE_ID("$Id: lib_mvcur.c,v 1.148 2019/02/24 00:31:57 tom Exp $")
#define WANT_CHAR(sp, y, x) NewScreen(sp)->_line[y].text[x] /* desired state */
SP_PARM->_home_cost = CostOf(cursor_home, 0);
SP_PARM->_ll_cost = CostOf(cursor_to_ll, 0);
#if USE_HARD_TABS
- if (getenv("NCURSES_NO_HARD_TABS") == 0) {
+ if (getenv("NCURSES_NO_HARD_TABS") == 0
+ && dest_tabs_magic_smso == 0
+ && HasHardTabs()) {
SP_PARM->_ht_cost = CostOf(tab, 0);
SP_PARM->_cbt_cost = CostOf(back_tab, 0);
} else {
if (fgets(buf, sizeof(buf), stdin) == 0)
break;
+#define PUTS(s) (void) puts(s)
+#define PUTF(s,t) (void) printf(s,t)
if (buf[0] == '?') {
- (void) puts("? -- display this help message");
- (void)
- puts("fy fx ty tx -- (4 numbers) display (fy,fx)->(ty,tx) move");
- (void) puts("s[croll] n t b m -- display scrolling sequence");
- (void)
- printf("r[eload] -- reload terminal info for %s\n",
- termname());
- (void)
- puts("l[oad] <term> -- load terminal info for type <term>");
- (void) puts("d[elete] <cap> -- delete named capability");
- (void) puts("i[nspect] -- display terminal capabilities");
- (void)
- puts("c[ost] -- dump cursor-optimization cost table");
- (void) puts("o[optimize] -- toggle movement optimization");
- (void)
- puts("t[orture] <num> -- torture-test with <num> random moves");
- (void) puts("q[uit] -- quit the program");
+ PUTS("? -- display this help message");
+ PUTS("fy fx ty tx -- (4 numbers) display (fy,fx)->(ty,tx) move");
+ PUTS("s[croll] n t b m -- display scrolling sequence");
+ PUTF("r[eload] -- reload terminal info for %s\n",
+ termname());
+ PUTS("l[oad] <term> -- load terminal info for type <term>");
+ PUTS("d[elete] <cap> -- delete named capability");
+ PUTS("i[nspect] -- display terminal capabilities");
+ PUTS("c[ost] -- dump cursor-optimization cost table");
+ PUTS("o[optimize] -- toggle movement optimization");
+ PUTS("t[orture] <num> -- torture-test with <num> random moves");
+ PUTS("q[uit] -- quit the program");
} else if (sscanf(buf, "%d %d %d %d", &fy, &fx, &ty, &tx) == 4) {
struct timeval before, after;
-ncurses6 (6.1+20190216) unstable; urgency=low
+ncurses6 (6.1+20190223) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 13 Feb 2019 17:19:33 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 23 Feb 2019 11:29:00 -0500
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20190216) unstable; urgency=low
+ncurses6 (6.1+20190223) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 13 Feb 2019 17:19:33 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 23 Feb 2019 11:29:00 -0500
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20190216) unstable; urgency=low
+ncurses6 (6.1+20190223) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 13 Feb 2019 17:19:33 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 23 Feb 2019 11:29:00 -0500
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.314 2019/02/13 22:19:33 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.315 2019/02/23 16:29:00 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "1"\r
!define VERSION_YYYY "2019"\r
-!define VERSION_MMDD "0216"\r
+!define VERSION_MMDD "0223"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.1
-Release: 20190216
+Release: 20190223
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
-Release: 20190216
+Release: 20190223
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.1
-Release: 20190216
+Release: 20190223
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
/****************************************************************************
- * Copyright (c) 2016,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 2016-2017,2019 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 <sys/ptem.h>
#endif
-MODULE_ID("$Id: reset_cmd.c,v 1.13 2017/10/07 20:56:03 tom Exp $")
+MODULE_ID("$Id: reset_cmd.c,v 1.14 2019/02/23 18:33:19 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
int result;
if (over_strike
- && key_backspace != 0
+ && VALID_STRING(key_backspace)
&& strlen(key_backspace) == 1) {
result = key_backspace[0];
} else {
#endif /* OXTABS */
/* test used to be tgetflag("NL") */
- if (newline != (char *) 0 && newline[0] == '\n' && !newline[1]) {
+ if (VALID_STRING(newline) && newline[0] == '\n' && !newline[1]) {
/* Newline, not linefeed. */
#ifdef ONLCR
tty_settings->c_oflag &= ~((unsigned) ONLCR);
}
#ifdef OXTABS
/* test used to be tgetflag("pt") */
- if (has_hardware_tabs) /* Print tabs. */
+ if (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs))
tty_settings->c_oflag &= ~OXTABS;
#endif /* OXTABS */
tty_settings->c_lflag |= (ECHOE | ECHOK);
static bool
reset_tabstops(int wide)
{
- if ((init_tabs != 8) && (set_tab && clear_all_tabs)) {
+ if ((init_tabs != 8) && (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs))) {
int c;
(void) putc('\r', my_file); /* Force to left margin. */
sent_string(const char *s)
{
bool sent = FALSE;
- if (s != 0) {
+ if (VALID_STRING(s)) {
tputs(s, 0, out_char);
sent = TRUE;
}
}
#endif
if (use_reset || use_init) {
- if (init_prog != 0) {
+ if (VALID_STRING(init_prog)) {
IGNORE_RC(system(init_prog));
}
: init_2string);
#if defined(set_lr_margin)
- if (set_lr_margin != 0) {
+ if (VALID_STRING(set_lr_margin)) {
need_flush |= sent_string(TPARM_2(set_lr_margin, 0,
columns - 1));
} else
#endif
#if defined(set_left_margin_parm) && defined(set_right_margin_parm)
- if (set_left_margin_parm != 0
- && set_right_margin_parm != 0) {
+ if (VALID_STRING(set_left_margin_parm)
+ && VALID_STRING(set_right_margin_parm)) {
need_flush |= sent_string(TPARM_1(set_left_margin_parm, 0));
need_flush |= sent_string(TPARM_1(set_right_margin_parm,
columns - 1));
} else
#endif
- if (clear_margins != 0
- && set_left_margin != 0
- && set_right_margin != 0) {
+ if (VALID_STRING(clear_margins)
+ && VALID_STRING(set_left_margin)
+ && VALID_STRING(set_right_margin)) {
need_flush |= sent_string(clear_margins);
if (carriage_return != 0) {
need_flush |= sent_string(carriage_return);
PUTCHAR('\r');
}
need_flush |= sent_string(set_left_margin);
- if (parm_right_cursor) {
+ if (VALID_STRING(parm_right_cursor)) {
need_flush |= sent_string(TPARM_1(parm_right_cursor,
columns - 1));
} else {
}
}
need_flush |= sent_string(set_right_margin);
- if (carriage_return != 0) {
+ if (VALID_STRING(carriage_return)) {
need_flush |= sent_string(carriage_return);
} else {
PUTCHAR('\r');
#include <parametrized.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.266 2019/02/10 02:25:46 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.268 2019/02/23 21:49:28 tom Exp $")
#define STDIN_NAME "<stdin>"
static void
check_acs(TERMTYPE2 *tp)
{
+ int vt100_smacs = 0;
+ int vt100_rmacs = 0;
+ int vt100_enacs = 0;
+
+ /*
+ * ena_acs is not always necessary, but if it is present, the enter/exit
+ * capabilities should be.
+ */
+ ANDMISSING(ena_acs, enter_alt_charset_mode);
+ ANDMISSING(ena_acs, exit_alt_charset_mode);
+ PAIRED(exit_alt_charset_mode, exit_alt_charset_mode);
+
+ /*
+ * vt100-like is frequently used, but perhaps ena_acs is missing, etc.
+ */
+ if (VALID_STRING(enter_alt_charset_mode)) {
+ vt100_smacs = (!strcmp("\033(0", enter_alt_charset_mode)
+ ? 2
+ : (!strcmp("\016", enter_alt_charset_mode)
+ ? 1
+ : 0));
+ }
+ if (VALID_STRING(exit_alt_charset_mode)) {
+ vt100_rmacs = (!strcmp("\033(B", exit_alt_charset_mode)
+ ? 2
+ : (!strcmp("\017", exit_alt_charset_mode)
+ ? 1
+ : 0));
+ }
+ if (VALID_STRING(ena_acs)) {
+ vt100_enacs = (!strcmp("\033(B\033)0", ena_acs)
+ ? 2
+ : 0);
+ }
+ if (vt100_rmacs && vt100_smacs && (vt100_rmacs != vt100_smacs)) {
+ _nc_warning("rmacs/smacs are inconsistent");
+ }
+ if ((vt100_rmacs == 2) && (vt100_smacs == 2) && vt100_enacs) {
+ _nc_warning("rmacs/smacs make enacs redundant");
+ }
+ if ((vt100_rmacs == 1) && (vt100_smacs == 1) && !vt100_enacs) {
+ _nc_warning("VT100-style rmacs/smacs require enacs");
+ }
+
if (VALID_STRING(acs_chars)) {
const char *boxes = "lmkjtuvwqxn";
char mapped[256];
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_tabs.c,v 1.2 2019/02/17 01:01:11 tom Exp $
+ * $Id: demo_tabs.c,v 1.4 2019/02/24 00:38:13 tom Exp $
*
* A simple demo of tabs in curses.
*/
+#define USE_TINFO
#include "test.priv.h"
static void
cbreak();
if (curses_stops > 0)
set_tabsize(curses_stops);
+#if HAVE_TIGETNUM
tabstop = tigetnum("it");
if (tabstop <= 0)
+#endif
tabstop = 8;
for (row = 0; row < LINES; ++row) {
move(row, 0);