-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3096 2018/03/03 22:07:39 tom Exp $
+-- $Id: NEWS,v 1.3102 2018/03/17 19:47:51 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.
+20180317
+ + fix a check in infotocap which may not have detected a problem when
+ it should have.
+ + add a check in tic for the case where setf/setb are given using
+ different strings, but provide identical results to setaf/setab.
+ + further improve fix for terminfo.5 (patch by Kir Kolyshkin).
+ + reorder loop-limit checks in winsnstr() in case the string has no
+ terminating null and only the number of characters is used (patch
+ by Gyorgy Jeney).
+
20180303
+ modify TurnOn/TurnOff macros in lib_vidattr.c and lib_vid_attr.c to
avoid expansion of "CUR" in trace.
-5:0:10 6.1 20180303
+5:0:10 6.1 20180317
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1213 2018/02/26 23:33:42 tom Exp $
+# $Id: dist.mk,v 1.1215 2018/03/17 16:49:57 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 = 20180303
+NCURSES_PATCH = 20180317
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 2006-2012,2017 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-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 *
* Author: Thomas E. Dickey 2006 *
****************************************************************************/
-/* $Id: nc_tparm.h,v 1.8 2017/07/22 17:09:46 tom Exp $ */
+/* $Id: nc_tparm.h,v 1.9 2018/03/17 19:19:58 tom Exp $ */
#ifndef NC_TPARM_included
#define NC_TPARM_included 1
#define TPARM_3(a,b,c,d) TPARM_4(a,b,c,d,0)
#define TPARM_2(a,b,c) TPARM_3(a,b,c,0)
#define TPARM_1(a,b) TPARM_2(a,b,0)
-#define TPARM_1(a,b) TPARM_2(a,b,0)
#define TPARM_0(a) TPARM_1(a,0)
#endif
#!/bin/sh
-# $Id: MKterminfo.sh,v 1.15 2018/03/03 19:25:58 tom Exp $
+# $Id: MKterminfo.sh,v 1.16 2018/03/17 18:03:51 Kir.Kolyshkin Exp $
#
# MKterminfo.sh -- generate terminfo.5 from Caps tabular data
#
sed -n <$caps "\
/%%-STOP-HERE-%%/q
/^#%center/s, expand,,
-/^#%lw[1-9]/s, lw[1-9][0-9]*\., l.,
+/^#%lw25/s, lw6 , lw7 ,
/^#%/s/#%//p
/^#/d
s/[ ][ ]*/ /g
/****************************************************************************
- * Copyright (c) 2004-2009,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 2004-2016,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 <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_insnstr.c,v 1.5 2016/05/28 21:03:33 tom Exp $")
+MODULE_ID("$Id: lib_insnstr.c,v 1.6 2018/03/10 20:13:59 Gyorgy.Jeney Exp $")
NCURSES_EXPORT(int)
winsnstr(WINDOW *win, const char *s, int n)
NCURSES_SIZE_T ox = win->_curx;
const unsigned char *cp;
- for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) {
+ for (cp = str; (n <= 0 || (cp - str) < n) && *cp; cp++) {
_nc_insert_ch(sp, win, (chtype) UChar(*cp));
}
win->_curx = ox;
-ncurses6 (6.1+20180303) unstable; urgency=low
+ncurses6 (6.1+20180317) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 26 Feb 2018 18:33:42 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Mar 2018 12:49:57 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20180303) unstable; urgency=low
+ncurses6 (6.1+20180317) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 26 Feb 2018 18:33:42 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Mar 2018 12:49:57 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20180303) unstable; urgency=low
+ncurses6 (6.1+20180317) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 26 Feb 2018 18:33:42 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Mar 2018 12:49:57 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.260 2018/02/26 23:33:42 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.262 2018/03/17 16:49:57 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 "2018"\r
-!define VERSION_MMDD "0303"\r
+!define VERSION_MMDD "0317"\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: 20180303
+Release: 20180317
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
-Release: 20180303
+Release: 20180317
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
#include <parametrized.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.252 2018/01/25 19:16:50 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.256 2018/03/18 00:05:10 tom Exp $")
#define STDIN_NAME "<stdin>"
}
}
+static bool
+same_color(NCURSES_CONST char *oldcap, NCURSES_CONST char *newcap, int limit)
+{
+ bool result = FALSE;
+ if (limit > 16)
+ limit = 16;
+ if (limit >= 8) {
+ int n;
+ int same;
+ for (n = same = 0; n < limit; ++n) {
+ char *oldvalue = strdup(TPARM_1(oldcap, n));
+ char *newvalue = strdup(TPARM_1(newcap, n));
+ same += !strcmp(oldvalue, newvalue);
+ free(oldvalue);
+ free(newvalue);
+ }
+ result = (same == limit);
+ }
+ return result;
+}
+
/*
* Check if the color capabilities are consistent
*/
PAIRED(set_color_pair, initialize_pair);
if (VALID_STRING(set_foreground)
- && VALID_STRING(set_a_foreground)
- && !_nc_capcmp(set_foreground, set_a_foreground))
- _nc_warning("expected setf/setaf to be different");
+ && VALID_STRING(set_a_foreground)) {
+ if (!_nc_capcmp(set_foreground, set_a_foreground)) {
+ _nc_warning("expected setf/setaf to be different");
+ } else if (same_color(set_foreground, set_a_foreground, max_colors)) {
+ _nc_warning("setf/setaf are equivalent");
+ }
+ }
if (VALID_STRING(set_background)
- && VALID_STRING(set_a_background)
- && !_nc_capcmp(set_background, set_a_background))
- _nc_warning("expected setb/setab to be different");
+ && VALID_STRING(set_a_background)) {
+ if (!_nc_capcmp(set_background, set_a_background)) {
+ _nc_warning("expected setb/setab to be different");
+ } else if (same_color(set_background, set_a_background, max_colors)) {
+ _nc_warning("setb/setab are equivalent");
+ }
+ }
/* see: has_colors() */
if (VALID_NUMERIC(max_colors) && VALID_NUMERIC(max_pairs)
- && (((set_foreground != NULL)
- && (set_background != NULL))
- || ((set_a_foreground != NULL)
- && (set_a_background != NULL))
+ && ((VALID_STRING(set_foreground)
+ && VALID_STRING(set_background))
+ || (VALID_STRING(set_a_foreground)
+ && VALID_STRING(set_a_background))
|| set_color_pair)) {
if (!VALID_STRING(orig_pair) && !VALID_STRING(orig_colors))
_nc_warning("expected either op/oc string for resetting colors");
myParam(9));
break;
}
- return result;
+ return strdup(result);
}
#define IsDelay(ch) ((ch) == '.' || isdigit(UChar(ch)))
|| !strcmp(name, "setb")
|| !strcmp(name, "setaf")
|| !strcmp(name, "setab")) {
- limit = max_colors;
+ if ((limit = max_colors) > 16)
+ limit = 16;
}
for (count = 0; count < limit; ++count) {
char *ti_check = check_1_infotocap(name, ti_value, count);
_nc_warning("tparm-conversion of %s(%d) differs between\n\tterminfo %s\n\ttermcap %s",
name, count, ti_check, tc_check);
}
+ free(ti_check);
+ free(tc_check);
}
} else if (params == 0 && !same_ti_tc(ti_value, tc_value, &embedded)) {
if (embedded) {