From a7e05fb9806cc1255b6ba4fb29e15d337f35b2ad Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Mon, 17 Aug 2020 22:29:28 +0000 Subject: [PATCH 1/1] ncurses 6.2 - patch 20200817 + reduce build-warnings by excluding ncurses-internals from deprecation warnings. + mark wgetch-events feature as deprecated. + add definition for $(LIBS) to ncurses/Makefile.in, to simplify builds using the string-hacks option. + prevent KEY_EVENT from appearing in curses.h unless the configure option --enable-wgetch-events is used (report by Werner Fink). --- MANIFEST | 1 + NEWS | 11 ++++++- VERSION | 2 +- dist.mk | 4 +-- include/MKkey_defs.sh | 3 +- include/Makefile.in | 3 +- include/curses.events | 55 ++++++++++++++++++++++++++++++++ include/curses.h.in | 53 ++---------------------------- ncurses/Makefile.in | 3 +- 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 +- 16 files changed, 87 insertions(+), 70 deletions(-) create mode 100644 include/curses.events diff --git a/MANIFEST b/MANIFEST index 69edf157..6c8e4fb8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -546,6 +546,7 @@ ./include/MKterm.h.awk.in ./include/Makefile.in ./include/capdefaults.c +./include/curses.events ./include/curses.h.in ./include/curses.tail ./include/curses.wide diff --git a/NEWS b/NEWS index 1bc806b3..460e6c68 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.3536 2020/08/16 18:03:39 tom Exp $ +-- $Id: NEWS,v 1.3540 2020/08/17 14:40:18 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,15 @@ 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. +20200817 + + reduce build-warnings by excluding ncurses-internals from deprecation + warnings. + + mark wgetch-events feature as deprecated. + + add definition for $(LIBS) to ncurses/Makefile.in, to simplify builds + using the string-hacks option. + + prevent KEY_EVENT from appearing in curses.h unless the configure + option --enable-wgetch-events is used (report by Werner Fink). + 20200816 + amend tic/infocmp check to allow for the respective tool's absence (report by Steve Wills, cf: 20200808). diff --git a/VERSION b/VERSION index cc02cee3..f81a9c79 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20200816 +5:0:10 6.2 20200817 diff --git a/dist.mk b/dist.mk index 380f5f08..1aa63b9d 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.1366 2020/08/16 15:31:41 tom Exp $ +# $Id: dist.mk,v 1.1368 2020/08/17 10:46:50 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 = 20200816 +NCURSES_PATCH = 20200817 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh index 0f54b5bc..86d6891c 100755 --- a/include/MKkey_defs.sh +++ b/include/MKkey_defs.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: MKkey_defs.sh,v 1.20 2020/08/01 18:20:15 tom Exp $ +# $Id: MKkey_defs.sh,v 1.21 2020/08/17 10:45:33 tom Exp $ ############################################################################## # Copyright 2019,2020 Thomas E. Dickey # # Copyright 2001-2013,2017 Free Software Foundation, Inc. # @@ -64,7 +64,6 @@ fi # add keys that we generate automatically: cat >>$data <$@ AWK=$(AWK) $(SHELL) $(srcdir)/MKkey_defs.sh $(CAPLIST) >>$@ + $(SHELL) -c 'if test "@NCURSES_EXT_FUNCS@" = "1" ; then cat $(srcdir)/curses.events >>$@ ; fi' $(SHELL) -c 'if test "@NCURSES_CH_T@" = "cchar_t" ; then cat $(srcdir)/curses.wide >>$@ ; fi' cat $(srcdir)/curses.tail >>$@ diff --git a/include/curses.events b/include/curses.events new file mode 100644 index 00000000..25a2583f --- /dev/null +++ b/include/curses.events @@ -0,0 +1,55 @@ +/* $Id*/ +/* + * vile:cmode: + * This file is part of ncurses, designed to be appended after curses.h.in + * (see that file for the relevant copyright). + */ + +/* + * This is an extension to support events... + */ +#ifdef NCURSES_WGETCH_EVENTS +#if !defined(__BEOS__) || defined(__HAIKU__) + /* Fix _nc_timed_wait() on BEOS... */ +# define NCURSES_EVENT_VERSION 1 +#endif /* !defined(__BEOS__) */ + +/* + * Bits to set in _nc_event.data.flags + */ +# define _NC_EVENT_TIMEOUT_MSEC 1 +# define _NC_EVENT_FILE 2 +# define _NC_EVENT_FILE_READABLE 2 +# if 0 /* Not supported yet... */ +# define _NC_EVENT_FILE_WRITABLE 4 +# define _NC_EVENT_FILE_EXCEPTION 8 +# endif + +typedef struct +{ + int type; + union + { + long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ + struct + { + unsigned int flags; + int fd; + unsigned int result; + } fev; /* _NC_EVENT_FILE */ + } data; +} _nc_event; + +typedef struct +{ + int count; + int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ + _nc_event *events[1]; +} _nc_eventlist; + +extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */ +extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) GCC_DEPRECATED(experimental option); /* experimental */ + +#define KEY_EVENT 0633 /* We were interrupted by an event */ + +#endif /* NCURSES_WGETCH_EVENTS */ diff --git a/include/curses.h.in b/include/curses.h.in index db07cb53..c516b22c 100644 --- a/include/curses.h.in +++ b/include/curses.h.in @@ -33,7 +33,7 @@ * and: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: curses.h.in,v 1.267 2020/05/30 19:23:28 tom Exp $ */ +/* $Id: curses.h.in,v 1.269 2020/08/17 14:14:12 tom Exp $ */ #ifndef __NCURSES_H #define __NCURSES_H @@ -497,55 +497,6 @@ struct _win_st }; #endif /* NCURSES_OPAQUE */ -/* - * This is an extension to support events... - */ -#if @NCURSES_EXT_FUNCS@ -#ifdef NCURSES_WGETCH_EVENTS -#if !defined(__BEOS__) || defined(__HAIKU__) - /* Fix _nc_timed_wait() on BEOS... */ -# define NCURSES_EVENT_VERSION 1 -#endif /* !defined(__BEOS__) */ - -/* - * Bits to set in _nc_event.data.flags - */ -# define _NC_EVENT_TIMEOUT_MSEC 1 -# define _NC_EVENT_FILE 2 -# define _NC_EVENT_FILE_READABLE 2 -# if 0 /* Not supported yet... */ -# define _NC_EVENT_FILE_WRITABLE 4 -# define _NC_EVENT_FILE_EXCEPTION 8 -# endif - -typedef struct -{ - int type; - union - { - long timeout_msec; /* _NC_EVENT_TIMEOUT_MSEC */ - struct - { - unsigned int flags; - int fd; - unsigned int result; - } fev; /* _NC_EVENT_FILE */ - } data; -} _nc_event; - -typedef struct -{ - int count; - int result_flags; /* _NC_EVENT_TIMEOUT_MSEC or _NC_EVENT_FILE_READABLE */ - _nc_event *events[1]; -} _nc_eventlist; - -extern NCURSES_EXPORT(int) wgetch_events (WINDOW *, _nc_eventlist *); /* experimental */ -extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *);/* experimental */ - -#endif /* NCURSES_WGETCH_EVENTS */ -#endif /* NCURSES_EXT_FUNCS */ - /* * GCC (and some other compilers) define '__attribute__'; we're using this * macro to alert the compiler to flag inconsistencies in printf/scanf-like @@ -590,7 +541,7 @@ extern NCURSES_EXPORT(int) wgetnstr_events (WINDOW *,char *,int,_nc_eventlist *) #endif #undef GCC_DEPRECATED -#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)) +#if (__GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 >= 2)) && !defined(NCURSES_INTERNALS) #define GCC_DEPRECATED(msg) __attribute__((deprecated)) #else #define GCC_DEPRECATED(msg) /* nothing */ diff --git a/ncurses/Makefile.in b/ncurses/Makefile.in index 716bd5f0..6418dc63 100644 --- a/ncurses/Makefile.in +++ b/ncurses/Makefile.in @@ -1,4 +1,4 @@ -# $Id: Makefile.in,v 1.172 2020/08/16 15:35:00 tom Exp $ +# $Id: Makefile.in,v 1.173 2020/08/17 13:38:30 tom Exp $ ############################################################################## # Copyright 2018-2019,2020 Thomas E. Dickey # # Copyright 1998-2017,2018 Free Software Foundation, Inc. # @@ -100,6 +100,7 @@ ETAGS = @ETAGS@ CC = @CC@ CPP = @CPP@ CFLAGS = @CFLAGS@ +LIBS = @LIBS@ INCDIR = $(srcdir)/../include CPPFLAGS = -DHAVE_CONFIG_H -DBUILDING_NCURSES -I../ncurses @CPPFLAGS@ diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index b8d1e7ce..862597a9 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200816) unstable; urgency=low +ncurses6 (6.2+20200817) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 16 Aug 2020 11:31:41 -0400 + -- Thomas E. Dickey Mon, 17 Aug 2020 06:46:50 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index b8d1e7ce..862597a9 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200816) unstable; urgency=low +ncurses6 (6.2+20200817) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 16 Aug 2020 11:31:41 -0400 + -- Thomas E. Dickey Mon, 17 Aug 2020 06:46:50 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 0fc1284c..06d12b85 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200816) unstable; urgency=low +ncurses6 (6.2+20200817) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 16 Aug 2020 11:31:41 -0400 + -- Thomas E. Dickey Mon, 17 Aug 2020 06:46:50 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 9d641b40..100a51e4 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.410 2020/08/16 15:31:41 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.412 2020/08/17 10:46:50 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 "0816" +!define VERSION_MMDD "0817" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 98bfc755..fab95076 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: 20200816 +Release: 20200817 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index be517b48..0463d91f 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: 20200816 +Release: 20200817 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index 73866cca..e5fb4d1a 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: 20200816 +Release: 20200817 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz -- 2.44.0