]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.2 - patch 20210424
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 25 Apr 2021 01:07:00 +0000 (01:07 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 25 Apr 2021 01:07:00 +0000 (01:07 +0000)
+ avoid using broken system macros for snprintf which interfere with
  _nc_SLIMIT's conditionally adding a parameter when the string-hacks
  configure option is enabled.
+ add a "all::" rule before the new "check" rule in test/Makefile.in

20 files changed:
NEWS
VERSION
dist.mk
include/nc_string.h
ncurses/tinfo/doalloc.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.spec
test/Makefile.in
test/color_name.h
test/knight.c
test/mk-test.awk
test/picsmap.h
test/test.priv.h
test/test_vid_puts.c
test/test_vidputs.c

diff --git a/NEWS b/NEWS
index 42fadc11bbd6fb77895147b9d1b56bda840ae7db..2312f94ba7040a6d32671c617438e2730850e69d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3656 2021/04/18 18:13:32 tom Exp $
+-- $Id: NEWS,v 1.3658 2021/04/25 00:04:11 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,12 @@ 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.
 
+20210424
+       + avoid using broken system macros for snprintf which interfere with
+         _nc_SLIMIT's conditionally adding a parameter when the string-hacks
+         configure option is enabled.
+       + add a "all::" rule before the new "check" rule in test/Makefile.in
+
 20210418
        + improve CF_LINK_FUNCS by ensuring that the source-file is closed
          before linking to the target.
diff --git a/VERSION b/VERSION
index 5f83cc00a119f3781c6eef1c229d9af8a0604c2f..21c2b086b9967049eb04f3f4589151aafe47d6ea 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20210418
+5:0:10 6.2     20210424
diff --git a/dist.mk b/dist.mk
index 0a7b40bc56097df8603c693e6dcb9f695f1048ca..30058a6cd73b24410f9e4aade9d38b526ff083f8 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1411 2021/04/18 10:23:11 tom Exp $
+# $Id: dist.mk,v 1.1412 2021/04/24 10:46:30 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
@@ -38,7 +38,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 2
-NCURSES_PATCH = 20210418
+NCURSES_PATCH = 20210424
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 93cf201507c781a4f395cc4147f11a5cefc51dde..546aa0695ba0279c80dc57270a0905389cfa8526 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 2012-2013,2016 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -41,7 +41,7 @@
 #endif
 
 /*
- * $Id: nc_string.h,v 1.8 2020/02/02 23:34:34 tom Exp $
+ * $Id: nc_string.h,v 1.9 2021/04/25 00:10:43 tom Exp $
  *
  * String-hacks.  Use these macros to stifle warnings on (presumably) correct
  * uses of strcat, strcpy and sprintf.
 #endif
 
 #if USE_STRING_HACKS && HAVE_SNPRINTF
+#ifdef __cplusplus
 #define _nc_SPRINTF             NCURSES_VOID snprintf
+#else
+#define _nc_SPRINTF             NCURSES_VOID (snprintf)
+#endif
 #define _nc_SLIMIT(n)           NCURSES_CAST(size_t,n),
 #else
 #define _nc_SPRINTF             NCURSES_VOID sprintf
index 0bda12cae8be07c4fce3661a583e5e557d1994b9..e3b1a2e96c1bf378f2c0f70c8110762187ecfbb5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2002,2012 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: doalloc.c,v 1.13 2020/08/30 00:27:15 tom Exp $")
+MODULE_ID("$Id: doalloc.c,v 1.14 2021/04/24 23:43:39 tom Exp $")
 
 void *
 _nc_doalloc(void *oldp, size_t amount)
 {
     void *newp;
 
-    if (oldp != 0) {
-       if ((newp = realloc(oldp, amount)) == 0) {
+    if (oldp != NULL) {
+       if (amount == 0) {
+           free(oldp);
+           newp = NULL;
+       } else if ((newp = realloc(oldp, amount)) == 0) {
            free(oldp);
            errno = ENOMEM;     /* just in case 'free' reset */
        }
index 82e09ba9a51ff8ed93b8cfeb3bcb07961a359cfd..91ef62c2cf0a2951c3e7dc9eb8ee02a7fb96408b 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210418) unstable; urgency=low
+ncurses6 (6.2+20210424) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 18 Apr 2021 06:23:11 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 24 Apr 2021 06:46:29 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 82e09ba9a51ff8ed93b8cfeb3bcb07961a359cfd..91ef62c2cf0a2951c3e7dc9eb8ee02a7fb96408b 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210418) unstable; urgency=low
+ncurses6 (6.2+20210424) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 18 Apr 2021 06:23:11 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 24 Apr 2021 06:46:29 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 047a2564e94280f5a07845764de73226544315ee..4f24291c5eddbcc33684970ce4e8038291fbe500 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210418) unstable; urgency=low
+ncurses6 (6.2+20210424) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 18 Apr 2021 06:23:11 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 24 Apr 2021 06:46:29 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 023ace7b2e852d5c002fabed55bc8be2322c10f0..bbb9d8c3071e753d2d92a6fa9a57d212ff77cc5f 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.454 2021/04/18 10:23:11 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.455 2021/04/24 10:46:30 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 "2"\r
 !define VERSION_YYYY  "2021"\r
-!define VERSION_MMDD  "0418"\r
+!define VERSION_MMDD  "0424"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 0b311c718e0b9a206589093e25a2fcda2fa19a15..803a64580c23bd86b039e40f09f111c8f3564be0 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20210418
+Release: 20210424
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 8ded1c5784ec4a7ebba9ec4eee22e375fbf11b2b..6c116708944f6683f4b295165787271100bfc59f 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20210418
+Release: 20210424
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index e8c19006db0a889e8ae2900297cd09e8fecbf9f3..84c327680435c88c9811d9d9deebc23ff26fd2c6 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20210418
+Release: 20210424
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index e6edb9a691e33500c00fea7b122b795ee7e4fddb..39806522257dc88f2a846bc94b8319df6c7f011f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.127 2021/04/18 11:48:06 tom Exp $
+# $Id: Makefile.in,v 1.128 2021/04/24 23:10:15 tom Exp $
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2017,2018 Free Software Foundation, Inc.                    #
@@ -153,6 +153,8 @@ HEADER_DEPS = \
        $(incdir)/unctrl.h \
        $(INCDIR)/nc_alloc.h
 
+all::
+
 # Verify that each header-file can be compiled without including another.
 check::
        @$(SHELL) -c "for header in *.h;\
index d27804e87266dac9b5bafbe7f39c12a2bef076c0..867396ca5f7059efd90ab3f04702715bc22dbffb 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 2011-2012,2016 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: color_name.h,v 1.8 2020/06/20 18:58:20 tom Exp $
+ * $Id: color_name.h,v 1.9 2021/04/24 23:25:29 tom Exp $
  */
 
 #ifndef __COLORNAME_H
@@ -37,7 +37,7 @@
 #include <test.priv.h>
 #endif
 
-static NCURSES_CONST char *the_color_names[] =
+static NCURSES_CONST char *const the_color_names[] =
 {
     "black",
     "red",
index bda7da38fc43967170162a98c59d816db2d52f9b..f9f725b0fc6c96ae9270aac9ac6c19d4478f0559 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2013,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -34,7 +34,7 @@
  * Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995.  Mouse support
  * added September 20th 1995.
  *
- * $Id: knight.c,v 1.47 2020/02/02 23:34:34 tom Exp $
+ * $Id: knight.c,v 1.48 2021/04/25 00:10:43 tom Exp $
  */
 
 #include <test.priv.h>
@@ -595,8 +595,8 @@ play(void)
 {
     bool keyhelp;              /* TRUE if keystroke help is up */
     int i, j, count;
-    int lastcol = 0;           /* last location visited */
-    int lastrow = 0;
+    int lastcol;               /* last location visited */
+    int lastrow;
     int ny = 0, nx = 0;
     int review = 0;            /* review history */
     int test_size;
index 25b3738111c30cbaa4a45f045c69eb804e5c0bfd..cf3066fa625ac65ef9aadfb93a1b6d884a8aaddb 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: mk-test.awk,v 1.24 2021/04/18 11:49:55 tom Exp $
+# $Id: mk-test.awk,v 1.25 2021/04/24 23:10:40 tom Exp $
 ##############################################################################
 # Copyright 2019-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2006-2017,2018 Free Software Foundation, Inc.                    #
@@ -77,7 +77,7 @@ END   {
        print   "       $(srcdir)/*.x* \\"
        print   "       $(srcdir)/*.dat"
        print   ""
-       print   "all: $(TESTS)"
+       print   "all:: $(TESTS)"
        print   ""
        print   "sources:"
        print   ""
index bdeb3c31471fdeadb64383011600b8da1f4f87b6..fc790a941c0a4aee7a6c3d10f9f098cffc29089d 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -30,7 +30,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                                                *
  ****************************************************************************/
-/* $Id: picsmap.h,v 1.4 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: picsmap.h,v 1.5 2021/04/24 23:25:17 tom Exp $ */
 
 #ifndef PICSMAP_H_INCL
 #define PICSMAP_H_INCL 1
@@ -68,8 +68,4 @@ typedef struct {
     short blue;
 } RGB_DATA;
 
-static void init_display(const char *, int);
-
-static void show_picture(PICS_HEAD * pics);
-
 #endif /* PICSMAP_H_INCL */
index 924b297d88756a825822cd90b9686b1b3f1a7654..58f79e00125cb778df48eecf099b4f847c783bb1 100644 (file)
@@ -30,7 +30,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.196 2021/03/20 19:02:18 tom Exp $ */
+/* $Id: test.priv.h,v 1.197 2021/04/25 00:00:24 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
@@ -748,10 +748,10 @@ extern "C" {
 #endif
 
 #if USE_STRING_HACKS && HAVE_SNPRINTF
-#define _nc_SPRINTF             NCURSES_VOID snprintf
+#define _nc_SPRINTF             NCURSES_VOID (snprintf)
 #define _nc_SLIMIT(n)           NCURSES_CAST(size_t,n),
 #else
-#define _nc_SPRINTF             NCURSES_VOID sprintf
+#define _nc_SPRINTF             NCURSES_VOID (sprintf)
 #define _nc_SLIMIT(n)          /* nothing */
 #endif
 
index 85a7f4ed7696da33742d52d82cedb49826b0d64a..1259ebf239ab8b4fabb7c30110900628533e992c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 2013-2014,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_vid_puts.c,v 1.11 2020/02/02 23:34:34 tom Exp $
+ * $Id: test_vid_puts.c,v 1.12 2021/04/25 00:10:43 tom Exp $
  *
  * Demonstrate the vid_puts and vid_attr functions.
  * Thomas Dickey - 2013/01/12
@@ -44,7 +44,7 @@ static bool p_opt = FALSE;
 static
 TPUTS_PROTO(outc, c)
 {
-    int rc = c;
+    int rc;
 
     rc = putc(c, my_fp);
     TPUTS_RETURN(rc);
index 355f100989bd3a9d288277d40b3dc4a2aa88dd91..25b7714dcf7b803c1d28a236d39c09925d4c1b46 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 2013-2014,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_vidputs.c,v 1.10 2020/02/02 23:34:34 tom Exp $
+ * $Id: test_vidputs.c,v 1.11 2021/04/25 00:10:43 tom Exp $
  *
  * Demonstrate the vidputs and vidattr functions.
  * Thomas Dickey - 2013/01/12
@@ -44,7 +44,7 @@ static bool p_opt = FALSE;
 static
 TPUTS_PROTO(outc, c)
 {
-    int rc = c;
+    int rc;
 
     rc = putc(c, my_fp);
     TPUTS_RETURN(rc);