From 9b4c4abadc0a29999c5ddad5aa8d769fee28d687 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 28 Jun 2020 01:38:12 +0000 Subject: [PATCH] ncurses 6.2 - patch 20200627 + build-fixes for gnat 10.1.1, whose gnatmake drops integration with gprbuild. + correct buffer-length in test/color_name.h --- Ada95/src/Makefile.in | 63 +++++++++++++++++-- Ada95/src/library.gpr.in | 16 ++++- Ada95/src/terminal_interface-curses-mouse.adb | 5 +- NEWS | 7 ++- VERSION | 2 +- dist.mk | 4 +- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- test/color_name.h | 4 +- 14 files changed, 98 insertions(+), 25 deletions(-) diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in index e0751da9..db7100de 100644 --- a/Ada95/src/Makefile.in +++ b/Ada95/src/Makefile.in @@ -29,7 +29,7 @@ # # Author: Juergen Pfeifer, 1996 # -# $Id: Makefile.in,v 1.90 2020/03/28 18:05:56 Adam.Van.Ymeren Exp $ +# $Id: Makefile.in,v 1.91 2020/06/27 21:17:54 tom Exp $ # .SUFFIXES: @@ -195,6 +195,7 @@ install.libs :: \ $(BUILD_DIR_LIB)/$(STATIC_LIBNAME) @echo made $(STATIC_LIBNAME) +#OLD:BEGIN install \ install.libs :: \ $(BUILD_DIR_LIB)/$(STATIC_LIBNAME) \ @@ -206,6 +207,7 @@ install.libs :: \ uninstall \ uninstall.libs :: @rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME) +#OLD:END mostlyclean :: rm -f *.o *.ali b_t*.* *.s $(PROGS) a.out core b_*_test.c *.xr[bs] *.a @@ -276,20 +278,66 @@ STATIC_DIRS = \ @USE_GNAT_PROJECTS@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT) @USE_GNAT_PROJECTS@ @echo "Using GNAT Project:" @USE_GNAT_PROJECTS@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0" -@USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static -@USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS) -@USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT) @USE_GNAT_PROJECTS@ +@USE_GNAT_PROJECTS@ gprbuild -p $(ADAMAKEFLAGS) -XLIB_KIND=static +@USE_GNAT_PROJECTS@ +@USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT) + +#OLD:BEGIN @USE_GNAT_LIBRARIES@install \ @USE_GNAT_LIBRARIES@install.libs :: \ @USE_GNAT_LIBRARIES@ $(ADA_OBJECTS) @USE_GNAT_LIBRARIES@ $(INSTALL_LIB) \ @USE_GNAT_LIBRARIES@ $(BUILD_DIR)/static-ali/*.ali \ @USE_GNAT_LIBRARIES@ $(ADA_OBJECTS) - +#OLD:END +# While gprinstall is the "recommended" tool, it is rather brittle, with +# hardcoded assumptions about the use of the install-name which prevent using +# that tool to make the directory layout of older versions of the AdaCurses +# package. +# +# In principle, one might just do +# --install-name="" +# and in dry-run mode, gprinstall pretends to handle it properly (trimming the +# empty directory level), but without the dry-run option, it fails (tested +# with gnat 10.1.1). +#NEW:BEGIN +#@USE_GNAT_LIBRARIES@install \ +#@USE_GNAT_LIBRARIES@install.libs :: +#@USE_GNAT_LIBRARIES@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@ +#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT) +#@USE_GNAT_LIBRARIES@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT) +#@USE_GNAT_LIBRARIES@ @echo "Using GNAT Project:" +#@USE_GNAT_LIBRARIES@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0" +#@USE_GNAT_LIBRARIES@ +#@USE_GNAT_LIBRARIES@ gprinstall -m -v -f -p \ +#@USE_GNAT_LIBRARIES@ --prefix="$(DESTDIR)$(prefix)" \ +#@USE_GNAT_LIBRARIES@ $(ADAMAKEFLAGS) -XLIB_KIND=static \ +#@USE_GNAT_LIBRARIES@ --lib-subdir="$(DESTDIR)$(prefix)"/lib \ +#@USE_GNAT_LIBRARIES@ --ali-subdir="$(DESTDIR)$(prefix)"/lib/ada/adalib \ +#@USE_GNAT_LIBRARIES@ --sources-subdir="$(DESTDIR)$(prefix)"/share/ada/adainclude +#@USE_GNAT_LIBRARIES@ +#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT) +#NEW:END + +#OLD:BEGIN uninstall \ uninstall.libs :: @rm -f $(ADA_OBJECTS)/$(STATIC_LIBNAME) +#OLD:END +#NEW:BEGIN +#@USE_GNAT_LIBRARIES@uninstall \ +#@USE_GNAT_LIBRARIES@uninstall.libs :: +#@USE_GNAT_LIBRARIES@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@ +#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT) +#@USE_GNAT_LIBRARIES@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT) +#@USE_GNAT_LIBRARIES@ @echo "Using GNAT Project:" +#@USE_GNAT_LIBRARIES@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0" +#@USE_GNAT_LIBRARIES@ +#@USE_GNAT_LIBRARIES@ gprinstall -v -f --prefix="$(DESTDIR)$(prefix)" --uninstall $(ADAMAKEFLAGS) -XLIB_KIND=static +#@USE_GNAT_LIBRARIES@ +#@USE_GNAT_LIBRARIES@ -rm -f $(GNAT_PROJECT) +#NEW:END @USE_GNAT_LIBRARIES@uninstall \ @USE_GNAT_LIBRARIES@uninstall.libs :: @@ -352,8 +400,13 @@ uninstall.libs :: @MAKE_ADA_SHAREDLIB@ rm -f $(LIBDIR)/$(SHARED_SYMLINK) @MAKE_ADA_SHAREDLIB@ rm -f $(LIBDIR)/$(SHARED_LIBNAME) +#rm-docs : +# gnatdoc --enable-build $(ADAMAKEFLAGS) -XLIB_KIND=static + clean :: -rm -f default.cgpr -rm -rf $(BUILD_DIR)/*-ali -rm -rf $(BUILD_DIR)/*-obj -rm -rf $(BUILD_DIR_LIB) +#@USE_GNAT_PROJECTS@ gprclean $(ADAMAKEFLAGS) -XLIB_KIND=static +#@MAKE_ADA_SHAREDLIB@ gprclean $(ADAMAKEFLAGS) -XLIB_KIND=dynamic diff --git a/Ada95/src/library.gpr.in b/Ada95/src/library.gpr.in index b0f0646d..37cbb9d9 100644 --- a/Ada95/src/library.gpr.in +++ b/Ada95/src/library.gpr.in @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------ --- $Id: library.gpr.in,v 1.2 2020/02/02 23:34:34 tom Exp $ +-- $Id: library.gpr.in,v 1.3 2020/06/27 20:47:40 tom Exp $ -- http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Library-Projects.html -- http://www.adaworld.com/debian/debian-ada-policy.html project AdaCurses is @@ -48,10 +48,24 @@ project AdaCurses is for Default_Switches ("Ada") use ("-g", "-O2", + "-Wall", "-gnatafno", "-gnatVa", -- All validity checks "-gnatwa"); -- Activate all optional errors -- for Default_Switches ("C") use (CFLAGS) end Compiler; for Languages use ("C", "Ada"); + package Install is + for Install_Name use "adacurses"; + -- for Artifacts ("share/doc/adacurses") use ("../doc/Ada95.html", "../doc/ada"); + -- for Artifacts ("share/doc/adacurses/adacurses_rm") use ("../" & Kind & "-obj" & "/gnatdoc/*"); + for Artifacts ("lib/ada/adalib") use + ("../src/*.ali"); + for Artifacts ("share/ada/adainclude") use + ("../src/*.ad?"); + -- for Artifacts ("share/examples/adacurses") use + -- ("../samples/*.ad?", "../samples/explain.txt", "../samples/Makefile", "../samples/README"); + -- for Artifacts ("share/man/man1") use ("../doc/adacurses-config.1"); + for Artifacts ("bin") use ("../gen/adacurses-config"); + end Install; end AdaCurses; diff --git a/Ada95/src/terminal_interface-curses-mouse.adb b/Ada95/src/terminal_interface-curses-mouse.adb index ed66249c..a8efd345 100644 --- a/Ada95/src/terminal_interface-curses-mouse.adb +++ b/Ada95/src/terminal_interface-curses-mouse.adb @@ -36,8 +36,8 @@ ------------------------------------------------------------------------------ -- Author: Juergen Pfeifer, 1996 -- Version Control: --- $Revision: 1.27 $ --- $Date: 2020/02/02 23:34:34 $ +-- $Revision: 1.28 $ +-- $Date: 2020/06/27 18:50:44 $ -- Binding Version 01.00 ------------------------------------------------------------------------------ with Terminal_Interface.Curses.Aux; use Terminal_Interface.Curses.Aux; @@ -147,6 +147,7 @@ package body Terminal_Interface.Curses.Mouse is Button := Button4; end if; if Button in Real_Buttons then + State := Released; -- preset to non real button; L := 2 ** (6 * Mouse_Button'Pos (Button)); for I in Button_State'Range loop if (Mask and L) /= 0 then diff --git a/NEWS b/NEWS index 7e79fc57..c2ad772f 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3507 2020/06/13 23:29:57 tom Exp $ +-- $Id: NEWS,v 1.3511 2020/06/27 21:48:14 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,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. +20200627 + + build-fixes for gnat 10.1.1, whose gnatmake drops integration with + gprbuild. + + correct buffer-length in test/color_name.h + 20200613 + update list of functions in ncurses.3x + move dlclose() call from lib_mouse.c to delscreen() to avoid a case diff --git a/VERSION b/VERSION index a090fb89..17e8fdcf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20200613 +5:0:10 6.2 20200627 diff --git a/dist.mk b/dist.mk index dd0b5a8b..5b40be7c 100644 --- 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.1356 2020/06/13 09:46:27 tom Exp $ +# $Id: dist.mk,v 1.1358 2020/06/27 11:12:35 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 = 20200613 +NCURSES_PATCH = 20200627 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index f7868f7a..e123a54d 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200613) unstable; urgency=low +ncurses6 (6.2+20200627) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 13 Jun 2020 05:46:27 -0400 + -- Thomas E. Dickey Sat, 27 Jun 2020 07:12:35 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index f7868f7a..e123a54d 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200613) unstable; urgency=low +ncurses6 (6.2+20200627) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 13 Jun 2020 05:46:27 -0400 + -- Thomas E. Dickey Sat, 27 Jun 2020 07:12:35 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 18b5b43d..17af906e 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200613) unstable; urgency=low +ncurses6 (6.2+20200627) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 13 Jun 2020 05:46:27 -0400 + -- Thomas E. Dickey Sat, 27 Jun 2020 07:12:35 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 91fe0436..e792caf6 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.400 2020/06/13 09:46:27 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.402 2020/06/27 11:12:35 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "2" !define VERSION_YYYY "2020" -!define VERSION_MMDD "0613" +!define VERSION_MMDD "0627" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index e201b8df..0888c4e1 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -3,7 +3,7 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 Version: 6.2 -Release: 20200613 +Release: 20200627 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index 094993a2..aef78fc6 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.2 -Release: 20200613 +Release: 20200627 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index 799e37ad..03deff38 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.2 -Release: 20200613 +Release: 20200627 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/test/color_name.h b/test/color_name.h index 0dadd2a1..d27804e8 100644 --- a/test/color_name.h +++ b/test/color_name.h @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: color_name.h,v 1.7 2020/02/02 23:34:34 tom Exp $ + * $Id: color_name.h,v 1.8 2020/06/20 18:58:20 tom Exp $ */ #ifndef __COLORNAME_H @@ -90,7 +90,7 @@ color_name(int color) const char *result = 0; if (color >= (int) SIZEOF(the_color_names)) { - _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(result)) "%d", color); + _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "%d", color); result = temp; } else if (color < 0) { result = "default"; -- 2.44.0