]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.0 - patch 20160507
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 8 May 2016 00:34:20 +0000 (00:34 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 8 May 2016 00:34:20 +0000 (00:34 +0000)
+ amend change to _nc_do_color to restore the early return for the
  special case used in _nc_screen_wrap (report by Dick Streefland,
  cf: 20151017).
+ modify test/ncurses.c:
  + check return-value of putwin
  + correct ifdef which made the 'g' test's legend not reflect changes
    to keypad- and scroll-modes.
+ correct return-value of extended putwin (report by Mike Gran).

12 files changed:
NEWS
VERSION
dist.mk
ncurses/base/lib_color.c
ncurses/base/lib_screen.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
test/ncurses.c

diff --git a/NEWS b/NEWS
index e344c7041aecd55b2f5ca78136b7e88c306d298a..f2c8b786b6a88dfbde05fb1f30f6fd68598257ea 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2597 2016/04/24 01:01:58 tom Exp $
+-- $Id: NEWS,v 1.2600 2016/05/07 23:49:50 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,16 @@ 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.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20160507
+       + amend change to _nc_do_color to restore the early return for the
+         special case used in _nc_screen_wrap (report by Dick Streefland,
+         cf: 20151017).
+       + modify test/ncurses.c:
+         + check return-value of putwin
+         + correct ifdef which made the 'g' test's legend not reflect changes
+           to keypad- and scroll-modes.
+       + correct return-value of extended putwin (report by Mike Gran).
+
 20160423
        + modify test/ncurses.c 'd' edit-color menu to optionally read xterm
          color palette directly from terminal, as well as handling KEY_RESIZE
 20160423
        + modify test/ncurses.c 'd' edit-color menu to optionally read xterm
          color palette directly from terminal, as well as handling KEY_RESIZE
diff --git a/VERSION b/VERSION
index c5086459bd83bd9e0bc0ed2de925f9ff604fbecf..88b60d61c282f557cbbbb23fb7f6af5fab270f45 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20160423
+5:0:9  6.0     20160507
diff --git a/dist.mk b/dist.mk
index ed620dd64cc69470aa2fb3c7c8a99fb2a852bd1d..35dde3f0c51174a6fbe0bd7a0bcb0311fbbdbdda 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1103 2016/04/23 10:14:21 tom Exp $
+# $Id: dist.mk,v 1.1104 2016/05/07 17:04:36 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # 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 = 0
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 0
-NCURSES_PATCH = 20160423
+NCURSES_PATCH = 20160507
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 8ae26a0a4c28d14782e302d8112a009badaa42d8..9b4d2b8f8d85c80b6be7f0301e64a2b3223d4967 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2015,2016 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -45,7 +45,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_color.c,v 1.112 2015/10/17 20:39:18 Denis.Tikhomirov Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.113 2016/05/07 23:50:54 tom Exp $")
 
 #ifdef USE_TERM_DRIVER
 #define CanChange      InfoOf(SP_PARM).canchange
 
 #ifdef USE_TERM_DRIVER
 #define CanChange      InfoOf(SP_PARM).canchange
@@ -858,6 +858,8 @@ NCURSES_SP_NAME(_nc_do_color) (NCURSES_SP_DCLx
        }
     } else {
        reset_color_pair(NCURSES_SP_ARG);
        }
     } else {
        reset_color_pair(NCURSES_SP_ARG);
+       if (old_pair < 0 && pair <= 0)
+           return;
     }
 
 #if NCURSES_EXT_FUNCS
     }
 
 #if NCURSES_EXT_FUNCS
index a35ad175b8a2248ee16c78a536768cda7bae32a8..71d2173d3224ef70d620b786beeb7274ed3939cf 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2011,2015 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2015,2016 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +41,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_screen.c,v 1.79 2015/12/20 01:22:59 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.80 2016/05/04 00:46:06 tom Exp $")
 
 #define MAX_SIZE 0x3fff                /* 16k is big enough for a window or pad */
 
 
 #define MAX_SIZE 0x3fff                /* 16k is big enough for a window or pad */
 
@@ -858,6 +858,7 @@ putwin(WINDOW *win, FILE *filep)
            }
            PUTS("\n");
        }
            }
            PUTS("\n");
        }
+       code = OK;
     }
 #else
     /*
     }
 #else
     /*
index 16b3e4d7e6aba10e6e7ee4c30b22a44899e41499..fdf73ef3583976e4247eeb71b08d610233879b8d 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160423) unstable; urgency=low
+ncurses6 (6.0+20160507) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 23 Apr 2016 06:14:21 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 07 May 2016 13:04:36 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 16b3e4d7e6aba10e6e7ee4c30b22a44899e41499..fdf73ef3583976e4247eeb71b08d610233879b8d 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160423) unstable; urgency=low
+ncurses6 (6.0+20160507) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 23 Apr 2016 06:14:21 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 07 May 2016 13:04:36 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 22ec7221a19c98012f10e5f85aec4f2a117cfa69..27b3ebb0eddc1cdbac08f7324a91a11042f0faf6 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160423) unstable; urgency=low
+ncurses6 (6.0+20160507) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 23 Apr 2016 06:14:21 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 07 May 2016 13:04:36 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 1ff1089f2fb1fa38f2ebb639621f334c6235c136..4217db727919556b8939fae2109d4f2b3463e397 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.155 2016/04/23 10:14:21 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.156 2016/05/07 17:04:36 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2016"\r
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2016"\r
-!define VERSION_MMDD  "0423"\r
+!define VERSION_MMDD  "0507"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 813e32adf21e9db9de56059a663488dbf6dc5e8d..0dca7c92b5437e363b42e7a066daac767afb574a 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20160423
+Release: 20160507
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 252375b2aed88ebee05681e4c98699260089878a..f18ff21957e88993704713e8d2db26dfbda9aee9 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20160423
+Release: 20160507
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index d04effb40b63a44ec63fee897345dcf251ed737d..664311ccfb07da3805daff3b6df4ec8686df714e 100644 (file)
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.433 2016/04/24 01:00:06 tom Exp $
+$Id: ncurses.c,v 1.437 2016/05/07 23:56:59 tom Exp $
 
 ***************************************************************************/
 
 
 ***************************************************************************/
 
@@ -2665,7 +2665,7 @@ reset_all_colors(void)
 
 #define okCOLOR(n) ((n) >= 0 && (n) < max_colors)
 #define okRGB(n)   ((n) >= 0 && (n) <= 1000)
 
 #define okCOLOR(n) ((n) >= 0 && (n) < max_colors)
 #define okRGB(n)   ((n) >= 0 && (n) <= 1000)
-#define DecodeRGB(n) ((n * 1000) / 0xffff)
+#define DecodeRGB(n) (NCURSES_COLOR_T) ((n * 1000) / 0xffff)
 
 static void
 init_all_colors(bool xterm_colors, char *palette_file)
 
 static void
 init_all_colors(bool xterm_colors, char *palette_file)
@@ -2693,7 +2693,7 @@ init_all_colors(bool xterm_colors, char *palette_file)
        noecho();
        for (n = 0; n < max_colors; ++n) {
            fprintf(stderr, "\033]4;%d;?\007", n);
        noecho();
        for (n = 0; n < max_colors; ++n) {
            fprintf(stderr, "\033]4;%d;?\007", n);
-           got = read(0, result, sizeof(result) - 1);
+           got = (int) read(0, result, sizeof(result) - 1);
            if (got < 0)
                break;
            result[got] = '\0';
            if (got < 0)
                break;
            result[got] = '\0';
@@ -4361,13 +4361,10 @@ FRAME
     WINDOW *wind;
 };
 
     WINDOW *wind;
 };
 
-#if defined(NCURSES_VERSION)
-#if (NCURSES_VERSION_PATCH < 20070331) && NCURSES_EXT_FUNCS
+#if defined(NCURSES_VERSION) && NCURSES_EXT_FUNCS
+#if (NCURSES_VERSION_PATCH < 20070331)
 #define is_keypad(win)   (win)->_use_keypad
 #define is_scrollok(win) (win)->_scroll
 #define is_keypad(win)   (win)->_use_keypad
 #define is_scrollok(win) (win)->_scroll
-#elif !defined(is_keypad)
-#define is_keypad(win)   FALSE
-#define is_scrollok(win) FALSE
 #endif
 #else
 #define is_keypad(win)   FALSE
 #endif
 #else
 #define is_keypad(win)   FALSE
@@ -4403,46 +4400,26 @@ HaveScroll(FRAME * curp)
 static void
 newwin_legend(FRAME * curp)
 {
 static void
 newwin_legend(FRAME * curp)
 {
+#define DATA(num, name) { name, num }
     static const struct {
        const char *msg;
        int code;
     } legend[] = {
     static const struct {
        const char *msg;
        int code;
     } legend[] = {
-       {
-           "^C = create window", 0
-       },
-       {
-           "^N = next window", 0
-       },
-       {
-           "^P = previous window", 0
-       },
-       {
-           "^F = scroll forward", 0
-       },
-       {
-           "^B = scroll backward", 0
-       },
-       {
-           "^K = keypad(%s)", 1
-       },
-       {
-           "^S = scrollok(%s)", 2
-       },
-       {
-           "^W = save window to file", 0
-       },
-       {
-           "^R = restore window", 0
-       },
+       DATA(0, "^C = create window"),
+           DATA(0, "^N = next window"),
+           DATA(0, "^P = previous window"),
+           DATA(0, "^F = scroll forward"),
+           DATA(0, "^B = scroll backward"),
+           DATA(1, "^K = keypad(%s)"),
+           DATA(2, "^S = scrollok(%s)"),
+           DATA(0, "^W = save window"),
+           DATA(0, "^R = restore window"),
 #if HAVE_WRESIZE
 #if HAVE_WRESIZE
-       {
-           "^X = resize", 0
-       },
+           DATA(0, "^X = resize"),
 #endif
 #endif
-       {
-           "^Q%s = exit", 3
-       }
+           DATA(3, "^Q%s = exit")
     };
     };
+#undef DATA
     size_t n;
     int x;
     bool do_keypad = HaveKeypad(curp);
     size_t n;
     int x;
     bool do_keypad = HaveKeypad(curp);
@@ -4752,10 +4729,14 @@ acs_and_scroll(void)
            } else if ((fp = fopen(DUMPFILE, "w")) == (FILE *) 0) {
                transient(current, "Can't open screen dump file");
            } else {
            } else if ((fp = fopen(DUMPFILE, "w")) == (FILE *) 0) {
                transient(current, "Can't open screen dump file");
            } else {
-               (void) putwin(frame_win(current), fp);
+               int rc = putwin(frame_win(current), fp);
                (void) fclose(fp);
 
                (void) fclose(fp);
 
-               current = delete_framed(current, TRUE);
+               if (rc == OK) {
+                   current = delete_framed(current, TRUE);
+               } else {
+                   transient(current, "Can't write screen dump file");
+               }
            }
            break;
 
            }
            break;
 
@@ -4841,12 +4822,6 @@ acs_and_scroll(void)
            break;
 #endif /* HAVE_WRESIZE */
 
            break;
 #endif /* HAVE_WRESIZE */
 
-       case KEY_F(10): /* undocumented --- use this to test area clears */
-           selectcell(0, 0, LINES - 1, COLS - 1);
-           clrtobot();
-           refresh();
-           break;
-
        case KEY_UP:
            newwin_move(current, -1, 0);
            break;
        case KEY_UP:
            newwin_move(current, -1, 0);
            break;