-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3102 2018/03/17 19:47:51 tom Exp $
+-- $Id: NEWS,v 1.3105 2018/03/24 22:56:36 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.
+20180324
+ + amend Scaled256() macro in test/picsmap.c to cover the full range
+ 0..1000 (report by Roger Pau Monne).
+ + add some checks in tracemunch for undefined variables.
+
20180317
+ fix a check in infotocap which may not have detected a problem when
it should have.
-5:0:10 6.1 20180317
+5:0:10 6.1 20180324
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1215 2018/03/17 16:49:57 tom Exp $
+# $Id: dist.mk,v 1.1216 2018/03/22 08:41:45 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 = 20180317
+NCURSES_PATCH = 20180324
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-ncurses6 (6.1+20180317) unstable; urgency=low
+ncurses6 (6.1+20180324) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Mar 2018 12:49:57 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 22 Mar 2018 04:41:45 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20180317) unstable; urgency=low
+ncurses6 (6.1+20180324) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Mar 2018 12:49:57 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 22 Mar 2018 04:41:45 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20180317) unstable; urgency=low
+ncurses6 (6.1+20180324) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 17 Mar 2018 12:49:57 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 22 Mar 2018 04:41:45 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.262 2018/03/17 16:49:57 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.263 2018/03/22 08:41:45 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 "0317"\r
+!define VERSION_MMDD "0324"\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: 20180317
+Release: 20180324
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
-Release: 20180317
+Release: 20180324
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
* authorization. *
****************************************************************************/
/*
- * $Id: picsmap.c,v 1.117 2018/02/12 09:57:31 tom Exp $
+ * $Id: picsmap.c,v 1.118 2018/03/24 22:37:42 tom Exp $
*
* Author: Thomas E. Dickey
*
#define L_CURLY '{'
#define R_CURLY '}'
+#define MaxSCALE 1000 /* input curses ranges 0..1000 */
+#define MaxRGB 255 /* output color ranges 0..255 */
#define okCOLOR(n) ((n) >= 0 && (n) < COLORS)
-#define okRGB(n) ((n) >= 0 && (n) <= 1000)
-#define Scaled256(n) (NCURSES_COLOR_T) (int)(((n) * 1000.0) / 256)
-#define ScaledColor(n) (NCURSES_COLOR_T) (int)(((n) * 1000.0) / scale)
+#define okSCALE(n) ((n) >= 0 && (n) <= MaxSCALE)
+#define Scaled256(n) (NCURSES_COLOR_T) (int)(((double)(n) * MaxSCALE) / 255)
+#define ScaledColor(n) (NCURSES_COLOR_T) (int)(((double)(n) * MaxSCALE) / scale)
#ifndef RGB_PATH
#define RGB_PATH "/etc/X11/rgb.txt"
if (data != 0) {
int n;
int red, green, blue;
- int scale = 1000;
+ int scale = MaxSCALE;
int c;
for (n = 0; data[n] != 0; ++n) {
if (sscanf(data[n], "scale:%d", &c) == 1) {
&green,
&blue) == 4
&& okCOLOR(c)
- && okRGB(red)
- && okRGB(green)
- && okRGB(blue)) {
+ && okSCALE(red)
+ && okSCALE(green)
+ && okSCALE(blue)) {
/* *INDENT-EQLS* */
all_colors[c].red = ScaledColor(red);
all_colors[c].green = ScaledColor(green);
if (isdigit(UChar(*s))) {
long value = strtol(s, &t, 0);
int b;
- if (t != s || value > 255 || value < 0) {
+ if (t != s || value > MaxRGB || value < 0) {
s = t;
} else {
state = -1;
&check)) {
if ((s - t) > 8) /* 6 hex digits vs 8 */
check /= 256;
- if (r > 255 ||
- g > 255 ||
- b > 255 ||
+ if (r > MaxRGB ||
+ g > MaxRGB ||
+ b > MaxRGB ||
check != (unsigned) ((r << 16) | (g << 8) | b)) {
okay = FALSE;
break;
#!/usr/bin/env perl
-# $Id: tracemunch,v 1.17 2017/12/23 17:51:31 tom Exp $
+# $Id: tracemunch,v 1.18 2018/03/22 08:50:15 tom Exp $
##############################################################################
# Copyright (c) 1998-2005,2017 Free Software Foundation, Inc. #
# #
$arg =~ s/\b$stdscr\b/stdscr/g if ($stdscr);
foreach my $addr ( keys %scr_addr ) {
$n = $scr_addr{$addr};
- $arg =~ s/\b$addr\b/screen$n/g;
+ $arg =~ s/\b$addr\b/screen$n/g if ( defined $n );
}
foreach my $addr ( keys %thr_addr ) {
$n = $thr_addr{$addr};
- $arg =~ s/\b$addr\b/thread$n/g;
+ $arg =~ s/\b$addr\b/thread$n/g if ( defined $n );
}
foreach my $addr ( keys %try_addr ) {
$n = $try_addr{$addr};
- $arg =~ s/\b$addr\b/tries_$n/g;
+ $arg =~ s/\b$addr\b/tries_$n/g if ( defined $n );
}
foreach my $addr ( keys %win_addr ) {
$n = $win_addr{$addr};
- $arg =~ s/\b$addr\b/window$n/g;
+ $arg =~ s/\b$addr\b/window$n/g if ( defined $n );
}
if ( $arg =~ /add_wch\((window\d+,)?0x[[:xdigit:]]+\)/i ) {
$arg =~ s/(0x[[:xdigit:]]+)[)]/\&wch)/i;