]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.1 - patch 20180324
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 25 Mar 2018 00:33:35 +0000 (00:33 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 25 Mar 2018 00:33:35 +0000 (00:33 +0000)
+ 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.

NEWS
VERSION
dist.mk
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
test/picsmap.c
test/tracemunch

diff --git a/NEWS b/NEWS
index d9a731f879dfd707c2ac9e3743b4d4146214f4d0..8445a6729e303c3a6893dfe69cad7b35068c084d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- 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
@@ -45,6 +45,11 @@ See the AUTHORS file for the corresponding full names.
 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.
diff --git a/VERSION b/VERSION
index 533a2416831cfd184ebfe794be51af4a63cb4e1f..2b9113df8edd04a12cba82c2010b8e852130cfe0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.1     20180317
+5:0:10 6.1     20180324
diff --git a/dist.mk b/dist.mk
index e084cb364548ae5e83d1b6595c7178df372c7fb8..7cb0febf5c7951b70d41b882e7376a6160045422 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # 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
@@ -37,7 +37,7 @@ SHELL = /bin/sh
 # 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)
index 500b2464158a99a7c0a7e62b34b08d8d41f1b995..4141200e6d81d3b68488f1a5f30be205cd16aecf 100644 (file)
@@ -1,8 +1,8 @@
-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
 
index 500b2464158a99a7c0a7e62b34b08d8d41f1b995..4141200e6d81d3b68488f1a5f30be205cd16aecf 100644 (file)
@@ -1,8 +1,8 @@
-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
 
index b4cdb231f51aac1f5e9c98b01a40548ecd608e19..24a4e4b17572c11581ff25e030af89721abad78e 100644 (file)
@@ -1,8 +1,8 @@
-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
 
index 7128fedc1ec3b046444b94b0def51eadb5a4ffa7..5b55bb94791eedc22d25dc311354841e0fb64831 100644 (file)
@@ -1,4 +1,4 @@
-; $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
@@ -10,7 +10,7 @@
 !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
index 397999614c321f543bc61f95c10c05b5a2bb3844..b514421019a2cb97d2709d46c69599cf62f7e276 100644 (file)
@@ -3,7 +3,7 @@
 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
index 0866fd3669b1f6558eaded6f79524f320dae7a92..f285cf0d93b7a36c7c22e6e9b0f6e086fd8c9659 100644 (file)
@@ -1,7 +1,7 @@
 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
index a18651822868ff0523275f1ef00c8384f41aab27..4e5b2634d2ca39f2f84a1a84e5941ed98b96ecfe 100644 (file)
@@ -26,7 +26,7 @@
  * 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"
@@ -650,7 +652,7 @@ init_palette(const char *palette_file)
        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) {
@@ -661,9 +663,9 @@ init_palette(const char *palette_file)
                                  &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);
@@ -1043,7 +1045,7 @@ parse_xbm(char **data)
                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;
@@ -1347,9 +1349,9 @@ parse_img(const char *filename)
                            &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;
index 1c9314321871f07aa0ef64d4d435af173a507bd9..2b7ad41a0224cb0496910012cd4ce7b87c2c5718 100755 (executable)
@@ -1,5 +1,5 @@
 #!/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.                #
 #                                                                            #
@@ -62,19 +62,19 @@ sub transaddr {
     $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;