1# ncurses 6.1 - patch 20190928 - Thomas E. Dickey
2#
3# ------------------------------------------------------------------------------
4#
5# Ncurses 6.1 is at
6# 	ftp.gnu.org:/pub/gnu
7#
8# Patches for ncurses 6.1 can be found at
9# 	ftp://ftp.invisible-island.net/ncurses/6.1
10#	http://invisible-mirror.net/archives/ncurses/6.1
11#
12# ------------------------------------------------------------------------------
13# ftp://ftp.invisible-island.net/ncurses/6.1/ncurses-6.1-20190928.patch.gz
14# patch by Thomas E. Dickey <dickey@invisible-island.net>
15# created  Sat Sep 28 15:09:31 UTC 2019
16# ------------------------------------------------------------------------------
17# NEWS                             |   10 ++
18# VERSION                          |    2
19# aclocal.m4                       |   72 ++++++++++++++++++++
20# configure                        |  106 +++++++++++++++++++++++++----
21# configure.in                     |    7 +
22# dist.mk                          |    4 -
23# misc/gen-pkgconfig.in            |   39 +++++------
24# misc/ncurses-config.in           |  131 +++++++++++++++++++++++++++++--------
25# misc/terminfo.src                |   11 +--
26# package/debian-mingw/changelog   |    4 -
27# package/debian-mingw64/changelog |    4 -
28# package/debian/changelog         |    4 -
29# package/mingw-ncurses.nsi        |    4 -
30# package/mingw-ncurses.spec       |    2
31# package/ncurses.spec             |    2
32# package/ncursest.spec            |    2
33# test/ncurses.c                   |   10 +-
34# 17 files changed, 325 insertions(+), 89 deletions(-)
35# ------------------------------------------------------------------------------
36Index: NEWS
37Prereq:  1.3376
38--- ncurses-6.1-20190921+/NEWS	2019-09-21 23:47:04.000000000 +0000
39+++ ncurses-6.1-20190928/NEWS	2019-09-28 12:57:39.000000000 +0000
40@@ -25,7 +25,7 @@
41 -- sale, use or other dealings in this Software without prior written        --
42 -- authorization.                                                            --
43 -------------------------------------------------------------------------------
44--- $Id: NEWS,v 1.3376 2019/09/21 23:47:04 tom Exp $
45+-- $Id: NEWS,v 1.3380 2019/09/28 12:57:39 tom Exp $
46 -------------------------------------------------------------------------------
47
48 This is a log of changes that ncurses has gone through since Zeyd started
49@@ -45,6 +45,14 @@
50 Changes through 1.9.9e did not credit all contributions;
51 it is not possible to add this information.
52
53+20190928
54+	+ amend the ncurse*-config and pc-files to take into account the rpath
55+	  hack which differed between those files.
56+	+ improve -L option filtering in ncurses*-config
57+	+ improve recovery from error when reading command-character in
58+	  test/ncurses.c, showing the relevant error message and not exiting on
59+	  EINTR (cf: 20180922)
60+
61 20190921
62 	+ add a note in resizeterm manpage about top-level windows which touch
63 	  the screen's borders.
64Index: VERSION
65--- ncurses-6.1-20190921+/VERSION	2019-09-21 14:56:20.000000000 +0000
66+++ ncurses-6.1-20190928/VERSION	2019-09-27 18:43:59.000000000 +0000
67@@ -1 +1 @@
68-5:0:10	6.1	20190921
69+5:0:10	6.1	20190928
70Index: aclocal.m4
71Prereq:  1.883
72--- ncurses-6.1-20190921+/aclocal.m4	2019-09-21 22:11:35.000000000 +0000
73+++ ncurses-6.1-20190928/aclocal.m4	2019-09-27 21:08:36.000000000 +0000
74@@ -28,7 +28,7 @@
75 dnl
76 dnl Author: Thomas E. Dickey 1995-on
77 dnl
78-dnl $Id: aclocal.m4,v 1.883 2019/09/21 22:11:35 tom Exp $
79+dnl $Id: aclocal.m4,v 1.884 2019/09/27 21:08:36 tom Exp $
80 dnl Macros used in NCURSES auto-configuration script.
81 dnl
82 dnl These macros are maintained separately from NCURSES.  The copyright on
83@@ -3850,6 +3850,76 @@
84 fi
85 ])dnl
86 dnl ---------------------------------------------------------------------------
87+dnl CF_LD_SEARCHPATH version: 2 updated: 2019/09/26 20:34:14
88+dnl ----------------
89+dnl Try to obtain the linker's search-path, for use in scripts.
90+dnl
91+dnl Ignore LD_LIBRARY_PATH, etc.
92+AC_DEFUN([CF_LD_SEARCHPATH],[
93+AC_CACHE_CHECK(for linker search path,cf_cv_ld_searchpath,[
94+
95+if test "$cross_compiling" != yes ; then
96+
97+# GNU binutils' ld does not involve permissions which may stop ldconfig.
98+cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[[("=]][[("=]]*,,g' -e 's/"[[)]];//gp' | sort -u`
99+
100+# The -NX options tell newer versions of Linux ldconfig to not attempt to
101+# update the cache, which makes it run faster.
102+test -z "$cf_pathlist" && \
103+	cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[[ 	]]/d' -e 's/:$//' | sort -u`
104+
105+test -z "$cf_pathlist" &&
106+	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[[ 	]]/d' -e 's/:$//p' | sort -u`
107+
108+# This works with OpenBSD 6.5, which lists only filenames
109+test -z "$cf_pathlist" &&
110+	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*[$],\1,p' | sort -u`
111+
112+if test -z "$cf_pathlist"
113+then
114+	# dyld default path with MacOS
115+	if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
116+	then
117+		# do this to bypass check
118+		cf_cv_ld_searchpath='$HOME/lib'
119+		cf_pathlist="/usr/local/lib /lib /usr/lib"
120+	fi
121+fi
122+
123+if test -z "$cf_pathlist"
124+then
125+	# Solaris is hardcoded
126+	if test -d /opt/SUNWspro/lib
127+	then
128+		cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
129+	elif test -d /usr/ccs/lib
130+	then
131+		cf_pathlist="/usr/ccs/lib /usr/lib"
132+	fi
133+fi
134+
135+fi
136+
137+# If nothing else, assume it is conventional
138+test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
139+
140+# Finally, check that this is only directories
141+for cf_path in [$]0 $cf_pathlist
142+do
143+	if test -d "$cf_path"; then
144+		test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
145+		cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
146+	fi
147+done
148+
149+# Ensure that it is nonempty
150+test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
151+])
152+
153+LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
154+AC_SUBST(LD_SEARCHPATH)
155+])dnl
156+dnl ---------------------------------------------------------------------------
157 dnl CF_LIBRARY_PATH version: 10 updated: 2015/04/15 19:08:48
158 dnl ---------------
159 dnl Construct a search-list of directories for a nonstandard library-file
160Index: configure
161--- ncurses-6.1-20190921+/configure	2019-09-21 19:49:24.000000000 +0000
162+++ ncurses-6.1-20190928/configure	2019-09-27 22:50:51.000000000 +0000
163@@ -1,5 +1,5 @@
164 #! /bin/sh
165-# From configure.in Revision: 1.689 .
166+# From configure.in Revision: 1.690 .
167 # Guess values for system-dependent variables and create Makefiles.
168 # Generated by Autoconf 2.52.20190901.
169 #
170@@ -26022,6 +26022,77 @@
171 	CHECK_BUILD=
172 fi
173
174+# This is used for the *-config script and *.pc data files.
175+
176+echo "$as_me:26027: checking for linker search path" >&5
177+echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
178+if test "${cf_cv_ld_searchpath+set}" = set; then
179+  echo $ECHO_N "(cached) $ECHO_C" >&6
180+else
181+
182+if test "$cross_compiling" != yes ; then
183+
184+# GNU binutils' ld does not involve permissions which may stop ldconfig.
185+cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
186+
187+# The -NX options tell newer versions of Linux ldconfig to not attempt to
188+# update the cache, which makes it run faster.
189+test -z "$cf_pathlist" && \
190+	cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[ 	]/d' -e 's/:$//' | sort -u`
191+
192+test -z "$cf_pathlist" &&
193+	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[ 	]/d' -e 's/:$//p' | sort -u`
194+
195+# This works with OpenBSD 6.5, which lists only filenames
196+test -z "$cf_pathlist" &&
197+	cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
198+
199+if test -z "$cf_pathlist"
200+then
201+	# dyld default path with MacOS
202+	if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
203+	then
204+		# do this to bypass check
205+		cf_cv_ld_searchpath='$HOME/lib'
206+		cf_pathlist="/usr/local/lib /lib /usr/lib"
207+	fi
208+fi
209+
210+if test -z "$cf_pathlist"
211+then
212+	# Solaris is hardcoded
213+	if test -d /opt/SUNWspro/lib
214+	then
215+		cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
216+	elif test -d /usr/ccs/lib
217+	then
218+		cf_pathlist="/usr/ccs/lib /usr/lib"
219+	fi
220+fi
221+
222+fi
223+
224+# If nothing else, assume it is conventional
225+test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
226+
227+# Finally, check that this is only directories
228+for cf_path in $0 $cf_pathlist
229+do
230+	if test -d "$cf_path"; then
231+		test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
232+		cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
233+	fi
234+done
235+
236+# Ensure that it is nonempty
237+test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
238+
239+fi
240+echo "$as_me:26091: result: $cf_cv_ld_searchpath" >&5
241+echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
242+
243+LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
244+
245 cat >>confdefs.h <<\EOF
246 #define HAVE_CURSES_DATA_BOOLNAMES 1
247 EOF
248@@ -26107,7 +26178,7 @@
249 : ${CONFIG_STATUS=./config.status}
250 ac_clean_files_save=$ac_clean_files
251 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
252-{ echo "$as_me:26110: creating $CONFIG_STATUS" >&5
253+{ echo "$as_me:26181: creating $CONFIG_STATUS" >&5
254 echo "$as_me: creating $CONFIG_STATUS" >&6;}
255 cat >$CONFIG_STATUS <<_ACEOF
256 #! $SHELL
257@@ -26283,7 +26354,7 @@
258     echo "$ac_cs_version"; exit 0 ;;
259   --he | --h)
260     # Conflict between --help and --header
261-    { { echo "$as_me:26286: error: ambiguous option: $1
262+    { { echo "$as_me:26357: error: ambiguous option: $1
263 Try \`$0 --help' for more information." >&5
264 echo "$as_me: error: ambiguous option: $1
265 Try \`$0 --help' for more information." >&2;}
266@@ -26302,7 +26373,7 @@
267     ac_need_defaults=false;;
268
269   # This is an error.
270-  -*) { { echo "$as_me:26305: error: unrecognized option: $1
271+  -*) { { echo "$as_me:26376: error: unrecognized option: $1
272 Try \`$0 --help' for more information." >&5
273 echo "$as_me: error: unrecognized option: $1
274 Try \`$0 --help' for more information." >&2;}
275@@ -26421,7 +26492,7 @@
276   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
277   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
278   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
279-  *) { { echo "$as_me:26424: error: invalid argument: $ac_config_target" >&5
280+  *) { { echo "$as_me:26495: error: invalid argument: $ac_config_target" >&5
281 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
282    { (exit 1); exit 1; }; };;
283   esac
284@@ -26784,6 +26855,7 @@
285 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
286 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
287 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
288+s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
289 CEOF
290
291 EOF
292@@ -26916,7 +26988,7 @@
293   esac
294
295   if test x"$ac_file" != x-; then
296-    { echo "$as_me:26919: creating $ac_file" >&5
297+    { echo "$as_me:26991: creating $ac_file" >&5
298 echo "$as_me: creating $ac_file" >&6;}
299     rm -f "$ac_file"
300   fi
301@@ -26934,7 +27006,7 @@
302       -) echo $tmp/stdin ;;
303       [\\/$]*)
304          # Absolute (can't be DOS-style, as IFS=:)
305-         test -f "$f" || { { echo "$as_me:26937: error: cannot find input file: $f" >&5
306+         test -f "$f" || { { echo "$as_me:27009: error: cannot find input file: $f" >&5
307 echo "$as_me: error: cannot find input file: $f" >&2;}
308    { (exit 1); exit 1; }; }
309          echo $f;;
310@@ -26947,7 +27019,7 @@
311            echo $srcdir/$f
312          else
313            # /dev/null tree
314-           { { echo "$as_me:26950: error: cannot find input file: $f" >&5
315+           { { echo "$as_me:27022: error: cannot find input file: $f" >&5
316 echo "$as_me: error: cannot find input file: $f" >&2;}
317    { (exit 1); exit 1; }; }
318          fi;;
319@@ -26963,7 +27035,7 @@
320       if test -n "$ac_seen"; then
321         ac_used=`grep '@datarootdir@' $ac_item`
322         if test -z "$ac_used"; then
323-          { echo "$as_me:26966: WARNING: datarootdir was used implicitly but not set:
324+          { echo "$as_me:27038: WARNING: datarootdir was used implicitly but not set:
325 $ac_seen" >&5
326 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
327 $ac_seen" >&2;}
328@@ -26972,7 +27044,7 @@
329       fi
330       ac_seen=`grep '${datarootdir}' $ac_item`
331       if test -n "$ac_seen"; then
332-        { echo "$as_me:26975: WARNING: datarootdir was used explicitly but not set:
333+        { echo "$as_me:27047: WARNING: datarootdir was used explicitly but not set:
334 $ac_seen" >&5
335 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
336 $ac_seen" >&2;}
337@@ -27009,7 +27081,7 @@
338             ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
339             if test -z "$ac_init"; then
340               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
341-              { echo "$as_me:27012: WARNING: Variable $ac_name is used but was not set:
342+              { echo "$as_me:27084: WARNING: Variable $ac_name is used but was not set:
343 $ac_seen" >&5
344 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
345 $ac_seen" >&2;}
346@@ -27020,7 +27092,7 @@
347     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
348     if test -s $tmp/out; then
349       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
350-      { echo "$as_me:27023: WARNING: Some variables may not be substituted:
351+      { echo "$as_me:27095: WARNING: Some variables may not be substituted:
352 $ac_seen" >&5
353 echo "$as_me: WARNING: Some variables may not be substituted:
354 $ac_seen" >&2;}
355@@ -27069,7 +27141,7 @@
356   * )   ac_file_in=$ac_file.in ;;
357   esac
358
359-  test x"$ac_file" != x- && { echo "$as_me:27072: creating $ac_file" >&5
360+  test x"$ac_file" != x- && { echo "$as_me:27144: creating $ac_file" >&5
361 echo "$as_me: creating $ac_file" >&6;}
362
363   # First look for the input files in the build tree, otherwise in the
364@@ -27080,7 +27152,7 @@
365       -) echo $tmp/stdin ;;
366       [\\/$]*)
367          # Absolute (can't be DOS-style, as IFS=:)
368-         test -f "$f" || { { echo "$as_me:27083: error: cannot find input file: $f" >&5
369+         test -f "$f" || { { echo "$as_me:27155: error: cannot find input file: $f" >&5
370 echo "$as_me: error: cannot find input file: $f" >&2;}
371    { (exit 1); exit 1; }; }
372          echo $f;;
373@@ -27093,7 +27165,7 @@
374            echo $srcdir/$f
375          else
376            # /dev/null tree
377-           { { echo "$as_me:27096: error: cannot find input file: $f" >&5
378+           { { echo "$as_me:27168: error: cannot find input file: $f" >&5
379 echo "$as_me: error: cannot find input file: $f" >&2;}
380    { (exit 1); exit 1; }; }
381          fi;;
382@@ -27151,7 +27223,7 @@
383   rm -f $tmp/in
384   if test x"$ac_file" != x-; then
385     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
386-      { echo "$as_me:27154: $ac_file is unchanged" >&5
387+      { echo "$as_me:27226: $ac_file is unchanged" >&5
388 echo "$as_me: $ac_file is unchanged" >&6;}
389     else
390       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
391@@ -27496,7 +27568,7 @@
392 				(cygdll|msysdll|mingw)
393 					test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "	overriding CXX_MODEL to SHARED" 1>&6
394
395-echo "${as_me:-configure}:27499: testing overriding CXX_MODEL to SHARED ..." 1>&5
396+echo "${as_me:-configure}:27571: testing overriding CXX_MODEL to SHARED ..." 1>&5
397
398 					with_shared_cxx=yes
399 					;;
400Index: configure.in
401Prereq:  1.689
402--- ncurses-6.1-20190921+/configure.in	2019-09-07 20:06:52.000000000 +0000
403+++ ncurses-6.1-20190928/configure.in	2019-09-27 21:12:34.000000000 +0000
404@@ -28,14 +28,14 @@
405 dnl
406 dnl Author: Thomas E. Dickey 1995-on
407 dnl
408-dnl $Id: configure.in,v 1.689 2019/09/07 20:06:52 tom Exp $
409+dnl $Id: configure.in,v 1.690 2019/09/27 21:12:34 tom Exp $
410 dnl Process this file with autoconf to produce a configure script.
411 dnl
412 dnl See https://invisible-island.net/autoconf/ for additional information.
413 dnl
414 dnl ---------------------------------------------------------------------------
415 AC_PREREQ(2.52.20170501)
416-AC_REVISION($Revision: 1.689 $)
417+AC_REVISION($Revision: 1.690 $)
418 AC_INIT(ncurses/base/lib_initscr.c)
419 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
420
421@@ -2391,6 +2391,9 @@
422 AC_SUBST(CHECK_BUILD)
423 AC_SUBST(PRIVATE_LIBS)
424
425+# This is used for the *-config script and *.pc data files.
426+CF_LD_SEARCHPATH
427+
428 AC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack])
429
430 AC_OUTPUT( \
431Index: dist.mk
432Prereq:  1.1306
433--- ncurses-6.1-20190921+/dist.mk	2019-09-21 14:56:20.000000000 +0000
434+++ ncurses-6.1-20190928/dist.mk	2019-09-27 18:43:59.000000000 +0000
435@@ -25,7 +25,7 @@
436 # use or other dealings in this Software without prior written               #
437 # authorization.                                                             #
438 ##############################################################################
439-# $Id: dist.mk,v 1.1306 2019/09/21 14:56:20 tom Exp $
440+# $Id: dist.mk,v 1.1307 2019/09/27 18:43:59 tom Exp $
441 # Makefile for creating ncurses distributions.
442 #
443 # This only needs to be used directly as a makefile by developers, but
444@@ -37,7 +37,7 @@
445 # These define the major/minor/patch versions of ncurses.
446 NCURSES_MAJOR = 6
447 NCURSES_MINOR = 1
448-NCURSES_PATCH = 20190921
449+NCURSES_PATCH = 20190928
450
451 # We don't append the patch to the version, since this only applies to releases
452 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
453Index: misc/gen-pkgconfig.in
454Prereq:  1.34
455--- ncurses-6.1-20190921+/misc/gen-pkgconfig.in	2018-06-09 22:21:33.000000000 +0000
456+++ ncurses-6.1-20190928/misc/gen-pkgconfig.in	2019-09-28 12:53:53.000000000 +0000
457@@ -1,7 +1,7 @@
458 #!@SHELL@
459-# $Id: gen-pkgconfig.in,v 1.34 2018/06/09 22:21:33 tom Exp $
460+# $Id: gen-pkgconfig.in,v 1.36 2019/09/28 12:53:53 tom Exp $
461 ##############################################################################
462-# Copyright (c) 2009-2015,2018 Free Software Foundation, Inc.                #
463+# Copyright (c) 2009-2018,2019 Free Software Foundation, Inc.                #
464 #                                                                            #
465 # Permission is hereby granted, free of charge, to any person obtaining a    #
466 # copy of this software and associated documentation files (the "Software"), #
467@@ -46,6 +46,7 @@
468 DFT_DEP_SUFFIX=@DFT_DEP_SUFFIX@
469 TINFO_ARG_SUFFIX=@TINFO_ARG_SUFFIX@
470 CXX_LIB_SUFFIX=@CXX_LIB_SUFFIX@
471+RPATH_LIST=@RPATH_LIST@
472 PRIVATE_LIBS="@PRIVATE_LIBS@"
473
474 suffix=@PC_MODULE_SUFFIX@
475@@ -66,10 +67,10 @@
476 FORM_LIBRARY="${FORM_NAME}@USE_ARG_SUFFIX@"
477
478 CFLAGS="@PKG_CFLAGS@"
479-if test "$includedir" != "/usr/include" ; then
480+if [ "$includedir" != "/usr/include" ]; then
481 	includetop=`echo "$includedir" | sed -e 's,/include/[^/]*$,/include,'`
482-	test "$includetop" = "/usr/include" && includetop="$includedir"
483-	if test "x$includetop" != "x$includedir"
484+	[ "$includetop" = "/usr/include" ] && includetop="$includedir"
485+	if [ "x$includetop" != "x$includedir" ]
486 	then
487 		CFLAGS="$CFLAGS -I${includetop}"
488 	fi
489@@ -77,10 +78,10 @@
490 fi
491
492 LDFLAGS=
493-if test "$libdir" != "/usr/lib" ; then
494+if [ "$libdir" != "/usr/lib" ]; then
495 	LDFLAGS="$LDFLAGS -L\${libdir}"
496 fi
497-if test "x@EXTRA_LDFLAGS@" != "x" ; then
498+if [ "x@EXTRA_LDFLAGS@" != "x" ]; then
499 	LDFLAGS="$LDFLAGS @EXTRA_LDFLAGS@"
500 fi
501
502@@ -88,8 +89,8 @@
503 # functions or curses variables (which also reside in tinfo) can be linked
504 # using the -lncurses option.
505 NEED_TINFO=no
506-if test "x@TINFO_LIBS@" != "x" && \
507-   test "x$TINFO_ARG_SUFFIX" != "x$MAIN_LIBRARY"
508+if [ "x@TINFO_LIBS@" != "x" ] && \
509+   [ "x$TINFO_ARG_SUFFIX" != "x$MAIN_LIBRARY" ]
510 then
511 	NEED_TINFO=yes
512 fi
513@@ -102,10 +103,10 @@
514 	desc="ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@"
515 	reqs=
516
517-	if test $name = $MAIN_LIBRARY ; then
518+	if [ $name = $MAIN_LIBRARY ]; then
519 		desc="$desc library"
520-		test $NEED_TINFO = yes && LIBS="$LIBS -l$TINFO_ARG_SUFFIX"
521-	elif test $name = $SUB_LIBRARY ; then
522+		[ $NEED_TINFO = yes ] && LIBS="$LIBS -l$TINFO_ARG_SUFFIX"
523+	elif [ $name = $SUB_LIBRARY ]; then
524 		desc="$desc terminal interface library"
525 	elif expr $name : ".*${CXX_NAME}.*" >/dev/null ; then
526 		reqs="$PANEL_LIBRARY${suffix}, $MENU_LIBRARY${suffix}, $FORM_LIBRARY${suffix}, $MAIN_LIBRARY${suffix}"
527@@ -115,15 +116,15 @@
528 		desc="$desc add-on library"
529 	fi
530
531-	if test $name != $SUB_LIBRARY && \
532-	   test $SUB_LIBRARY != $MAIN_LIBRARY && \
533-	   test $name != $TINFO_NAME && \
534-	   test $NEED_TINFO != yes ; then
535-		test -n "$reqs" && reqs="$reqs, "
536+	if [ $name != $SUB_LIBRARY ] && \
537+	   [ $SUB_LIBRARY != $MAIN_LIBRARY ] && \
538+	   [ $name != $TINFO_NAME ] && \
539+	   [ $NEED_TINFO != yes ] ; then
540+		[ -n "$reqs" ] && reqs="$reqs, "
541 		reqs="${reqs}${SUB_LIBRARY}${suffix}"
542 	fi
543
544-	if test $name = $MAIN_LIBRARY
545+	if [ $name = $MAIN_LIBRARY ]
546 	then
547 		main_libs="$PRIVATE_LIBS"
548 	else
549@@ -154,4 +155,4 @@
550 EOF
551
552 done
553-# vile:shmode
554+# vile:shmode ts=4 sw=4
555Index: misc/ncurses-config.in
556Prereq:  1.37
557--- ncurses-6.1-20190921+/misc/ncurses-config.in	2018-06-09 22:29:01.000000000 +0000
558+++ ncurses-6.1-20190928/misc/ncurses-config.in	2019-09-28 12:54:17.000000000 +0000
559@@ -1,7 +1,7 @@
560 #!@SHELL@
561-# $Id: ncurses-config.in,v 1.37 2018/06/09 22:29:01 tom Exp $
562+# $Id: ncurses-config.in,v 1.39 2019/09/28 12:54:17 tom Exp $
563 ##############################################################################
564-# Copyright (c) 2006-2017,2018 Free Software Foundation, Inc.                #
565+# Copyright (c) 2006-2018,2019 Free Software Foundation, Inc.                #
566 #                                                                            #
567 # Permission is hereby granted, free of charge, to any person obtaining a    #
568 # copy of this software and associated documentation files (the "Software"), #
569@@ -54,7 +54,7 @@
570 # Ensure that RPATH_LIST contains only absolute pathnames, if it is nonempty.
571 # We cannot filter it out within the build-process since the variable is used
572 # in some special cases of installation using a relative path.
573-if test -n "$RPATH_LIST"
574+if [ -n "$RPATH_LIST" ]
575 then
576 	save_IFS="$IFS"
577 	IFS='@PATH_SEPARATOR@'
578@@ -65,7 +65,7 @@
579 		./*|../*|*/..|*/../*)
580 			;;
581 		*)
582-			test -n "$filtered" && filtered="${filtered}@PATH_SEPARATOR@"
583+			[ -n "$filtered" ] && filtered="${filtered}@PATH_SEPARATOR@"
584 			filtered="${filtered}${item}"
585 			;;
586 		esac
587@@ -78,7 +78,7 @@
588 # with --disable-overwrite, we installed into a subdirectory, but transformed
589 # the headers to include like this:
590 #	<ncurses@LIB_SUFFIX@/curses.h>
591-if test x@WITH_OVERWRITE@ = xno ; then
592+if [ x@WITH_OVERWRITE@ = xno ]; then
593 	case $includedir in
594 	$prefix/include/ncurses@LIB_SUFFIX@@EXTRA_SUFFIX@)
595 		includedir=`echo "$includedir" | sed -e 's,/[^/]*$,,'`
596@@ -86,9 +86,50 @@
597 	esac
598 fi
599
600-test $# = 0 && exec @SHELL@ $0 --error
601+LIBS="@LIBS@ @PRIVATE_LIBS@"
602+if [ "@TINFO_NAME@" = "@LIB_NAME@" ]; then
603+	LIBS="-l${THIS} $LIBS"
604+else
605+	LIBS="-l${THIS} -l${TINFO_LIB} $LIBS"
606+fi
607+
608+# Ignore -L options which do not correspond to an actual directory, or which
609+# are standard library directories (i.e., the linker is supposed to search
610+# those directories).
611+#
612+# There is no portable way to find the list of standard library directories.
613+# Require a POSIX shell anyway, to keep this simple.
614+lib_flags=
615+for opt in -L$libdir @LDFLAGS@ @EXTRA_LDFLAGS@ $LIBS
616+do
617+	case $opt in
618+	-L*)
619+		[ -d ${opt##-L} ] || continue
620+		case ${opt##-L} in
621+		@LD_SEARCHPATH@) # skip standard libdir
622+			continue
623+			;;
624+		*)
625+			found=no
626+			for check in $lib_flags
627+			do
628+				if [ "x$check" = "x$opt" ]
629+				then
630+					found=yes
631+					break
632+				fi
633+			done
634+			[ $found = yes ] && continue
635+			;;
636+		esac
637+		;;
638+	esac
639+	lib_flags="$lib_flags $opt"
640+done
641
642-while test $# -gt 0; do
643+[ $# = 0 ] && exec @SHELL@ $0 --error
644+
645+while [ $# -gt 0 ]; do
646 	case "$1" in
647 	# basic configuration
648 	--prefix)
649@@ -100,10 +141,10 @@
650 	# compile/link
651 	--cflags)
652 		INCS="@PKG_CFLAGS@"
653-		if test "x@WITH_OVERWRITE@" = xno ; then
654+		if [ "x@WITH_OVERWRITE@" = xno ]; then
655 			INCS="$INCS -I${includesubdir}"
656 		fi
657-		if test "${includedir}" != /usr/include ; then
658+		if [ "${includedir}" != /usr/include ]; then
659 			INCS="$INCS -I${includedir}"
660 		fi
661 		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
662@@ -111,22 +152,54 @@
663 ENDECHO
664 		;;
665 	--libs)
666-		if test "$libdir" = /usr/lib
667-		then
668-			LIBDIR=
669-		else
670-			LIBDIR=-L$libdir
671-		fi
672-		LIBS="@LIBS@ @PRIVATE_LIBS@"
673-		if test @TINFO_NAME@ = @LIB_NAME@ ; then
674-		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
675-			$LIBDIR @EXTRA_LDFLAGS@ -l${THIS} $LIBS
676-ENDECHO
677-		else
678-		sed -e 's,^[ ]*,,' -e 's, [ ]*, ,g' -e 's,[ ]*$,,' <<-ENDECHO
679-			$LIBDIR @EXTRA_LDFLAGS@ -l${THIS} -l${TINFO_LIB} $LIBS
680-ENDECHO
681-		fi
682+		OPTS=
683+		for opt in $lib_flags
684+		do
685+			[ -n "$OPTS" ] && OPTS="$OPTS "
686+			OPTS="${OPTS}${opt}"
687+		done
688+		printf "%s\n" "$OPTS"
689+		;;
690+	--libs-only-L)
691+		OPTS=
692+		for opt in $lib_flags
693+		do
694+			case "x$opt" in
695+			x-L*)
696+				[ -n "$OPTS" ] && OPTS="$OPTS "
697+				OPTS="${OPTS}${opt}"
698+				;;
699+			esac
700+		done
701+		printf "%s\n" "$OPTS"
702+		;;
703+	--libs-only-l)
704+		OPTS=
705+		for opt in $lib_flags
706+		do
707+			case "x$opt" in
708+			x-l*)
709+				[ -n "$OPTS" ] && OPTS="$OPTS "
710+				OPTS="${OPTS}${opt}"
711+				;;
712+			esac
713+		done
714+		printf "%s\n" "$OPTS"
715+		;;
716+	--libs-only-other)
717+		OPTS=
718+		for opt in $lib_flags
719+		do
720+			case "x$opt" in
721+			x-[lL]*)
722+				;;
723+			*)
724+				[ -n "$OPTS" ] && OPTS="$OPTS "
725+				OPTS="${OPTS}${opt}"
726+				;;
727+			esac
728+		done
729+		printf "%s\n" "$OPTS"
730 		;;
731 	# identification
732 	--version)
733@@ -147,9 +220,9 @@
734 		;;
735 	--includedir)
736 		INCS=
737-		if test "x@WITH_OVERWRITE@" = xno ; then
738+		if [ "x@WITH_OVERWRITE@" = xno ]; then
739 			INCS="${includesubdir}"
740-		elif test "${includedir}" != /usr/include ; then
741+		elif [ "${includedir}" != /usr/include ]; then
742 			INCS="${includedir}"
743 		fi
744 		echo $INCS
745@@ -181,6 +254,10 @@
746   --cflags           echos the C compiler flags needed to compile with ${THIS}
747   --libs             echos the libraries needed to link with ${THIS}
748
749+  --libs-only-L      echos -L linker options (search path) for ${THIS}
750+  --libs-only-l      echos -l linker options (libraries) for ${THIS}
751+  --libs-only-other  echos linker options other than -L/-l
752+
753   --version          echos the release+patchdate version of ${THIS}
754   --abi-version      echos the ABI version of ${THIS}
755   --mouse-version    echos the mouse-interface version of ${THIS}
756Index: misc/terminfo.src
757--- ncurses-6.1-20190921+/misc/terminfo.src	2019-08-03 21:42:15.000000000 +0000
758+++ ncurses-6.1-20190928/misc/terminfo.src	2019-09-22 18:48:45.000000000 +0000
759@@ -6,8 +6,8 @@
760 # Report bugs and new terminal descriptions to
761 #	bug-ncurses@gnu.org
762 #
763-#	$Revision: 1.763 $
764-#	$Date: 2019/08/03 21:42:15 $
765+#	$Revision: 1.765 $
766+#	$Date: 2019/09/22 18:48:45 $
767 #
768 # The original header is preserved below for reference.  It is noted that there
769 # is a "newer" version which differs in some cosmetic details (but actually
770@@ -3292,7 +3292,7 @@
771 # tracked under rdar://problem/7365108 and rdar://problem/7365134
772 # in Apple's bug reporter.
773 #
774-# In OS X 10.7 (Leopard) the TERM which can be set in the preferences dialog
775+# In OS X 10.5 (Leopard) the TERM which can be set in the preferences dialog
776 # defaults to xterm-color.  Alternative selections are ansi, dtterm, rxvt,
777 # vt52, vt100, vt102 and xterm.
778 nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
779@@ -3364,7 +3364,7 @@
780
781 # This is tested with OS X 10.8 (Mountain Lion), 2012/08/11
782 #	TERM_PROGRAM_VERSION=309
783-# Earlier reports state that these differences also apply to OS X 10.7 (Leopard),
784+# Earlier reports state that these differences also apply to OS X 10.7 (Lion),
785 #	TERM_PROGRAM_VERSION=303
786 nsterm-build309|Terminal.app in OS X 10.8,
787 	use=xterm+256setaf, use=nsterm-bce,
788@@ -26372,4 +26372,7 @@
789 #	+ updated alacritty+common entry & notes -TD
790 #	+ use xterm+sl-twm for consistency -TD
791 #
792+# 2019-09-22
793+#	+ correct a comment -TD
794+#
795 ######## SHANTIH!  SHANTIH!  SHANTIH!
796Index: package/debian-mingw/changelog
797--- ncurses-6.1-20190921+/package/debian-mingw/changelog	2019-09-21 14:56:20.000000000 +0000
798+++ ncurses-6.1-20190928/package/debian-mingw/changelog	2019-09-27 18:43:59.000000000 +0000
799@@ -1,8 +1,8 @@
800-ncurses6 (6.1+20190921) unstable; urgency=low
801+ncurses6 (6.1+20190928) unstable; urgency=low
802
803   * latest weekly patch
804
805- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Sep 2019 10:56:20 -0400
806+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 22 Sep 2019 14:43:59 -0400
807
808 ncurses6 (5.9-20131005) unstable; urgency=low
809
810Index: package/debian-mingw64/changelog
811--- ncurses-6.1-20190921+/package/debian-mingw64/changelog	2019-09-21 14:56:20.000000000 +0000
812+++ ncurses-6.1-20190928/package/debian-mingw64/changelog	2019-09-27 18:43:59.000000000 +0000
813@@ -1,8 +1,8 @@
814-ncurses6 (6.1+20190921) unstable; urgency=low
815+ncurses6 (6.1+20190928) unstable; urgency=low
816
817   * latest weekly patch
818
819- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Sep 2019 10:56:20 -0400
820+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 22 Sep 2019 14:43:59 -0400
821
822 ncurses6 (5.9-20131005) unstable; urgency=low
823
824Index: package/debian/changelog
825--- ncurses-6.1-20190921+/package/debian/changelog	2019-09-21 14:56:20.000000000 +0000
826+++ ncurses-6.1-20190928/package/debian/changelog	2019-09-27 18:43:59.000000000 +0000
827@@ -1,8 +1,8 @@
828-ncurses6 (6.1+20190921) unstable; urgency=low
829+ncurses6 (6.1+20190928) unstable; urgency=low
830
831   * latest weekly patch
832
833- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 21 Sep 2019 10:56:20 -0400
834+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 22 Sep 2019 14:43:59 -0400
835
836 ncurses6 (5.9-20120608) unstable; urgency=low
837
838Index: package/mingw-ncurses.nsi
839Prereq:  1.352
840--- ncurses-6.1-20190921+/package/mingw-ncurses.nsi	2019-09-21 14:56:20.000000000 +0000
841+++ ncurses-6.1-20190928/package/mingw-ncurses.nsi	2019-09-27 18:43:59.000000000 +0000
842@@ -1,4 +1,4 @@
843-; $Id: mingw-ncurses.nsi,v 1.352 2019/09/21 14:56:20 tom Exp $
844+; $Id: mingw-ncurses.nsi,v 1.353 2019/09/27 18:43:59 tom Exp $
845
846 ; TODO add examples
847 ; TODO bump ABI to 6
848@@ -10,7 +10,7 @@
849 !define VERSION_MAJOR "6"
850 !define VERSION_MINOR "1"
851 !define VERSION_YYYY  "2019"
852-!define VERSION_MMDD  "0921"
853+!define VERSION_MMDD  "0928"
854 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
855
856 !define MY_ABI   "5"
857Index: package/mingw-ncurses.spec
858--- ncurses-6.1-20190921+/package/mingw-ncurses.spec	2019-09-21 14:56:20.000000000 +0000
859+++ ncurses-6.1-20190928/package/mingw-ncurses.spec	2019-09-27 18:43:59.000000000 +0000
860@@ -3,7 +3,7 @@
861 Summary: shared libraries for terminal handling
862 Name: mingw32-ncurses6
863 Version: 6.1
864-Release: 20190921
865+Release: 20190928
866 License: X11
867 Group: Development/Libraries
868 Source: ncurses-%{version}-%{release}.tgz
869Index: package/ncurses.spec
870--- ncurses-6.1-20190921+/package/ncurses.spec	2019-09-21 14:56:20.000000000 +0000
871+++ ncurses-6.1-20190928/package/ncurses.spec	2019-09-27 18:43:59.000000000 +0000
872@@ -1,7 +1,7 @@
873 Summary: shared libraries for terminal handling
874 Name: ncurses6
875 Version: 6.1
876-Release: 20190921
877+Release: 20190928
878 License: X11
879 Group: Development/Libraries
880 Source: ncurses-%{version}-%{release}.tgz
881Index: package/ncursest.spec
882--- ncurses-6.1-20190921+/package/ncursest.spec	2019-09-21 14:56:20.000000000 +0000
883+++ ncurses-6.1-20190928/package/ncursest.spec	2019-09-27 18:43:59.000000000 +0000
884@@ -1,7 +1,7 @@
885 Summary: Curses library with POSIX thread support.
886 Name: ncursest6
887 Version: 6.1
888-Release: 20190921
889+Release: 20190928
890 License: X11
891 Group: Development/Libraries
892 Source: ncurses-%{version}-%{release}.tgz
893Index: test/ncurses.c
894Prereq:  1.518
895--- ncurses-6.1-20190921+/test/ncurses.c	2019-08-31 23:22:40.000000000 +0000
896+++ ncurses-6.1-20190928/test/ncurses.c	2019-09-22 19:12:40.000000000 +0000
897@@ -40,7 +40,7 @@
898    Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
899            Thomas E. Dickey (beginning revision 1.27 in 1996).
900
901-$Id: ncurses.c,v 1.518 2019/08/31 23:22:40 tom Exp $
902+$Id: ncurses.c,v 1.519 2019/09/22 19:12:40 tom Exp $
903
904 ***************************************************************************/
905
906@@ -7815,11 +7815,13 @@
907 	for (;;) {
908 	    char ch = '\0';
909 	    if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
910-		if (command == 0)
911-		    command = 'q';
912-		if (errno == EINTR) {
913+		int save_err = errno;
914+		perror("\nOOPS");
915+		if (save_err == EINTR) {
916 		    clearerr(stdin);
917 		    continue;
918+		} else if (command == 0) {
919+		    command = 'q';
920 		}
921 		break;
922 	    } else if (command == 0 && !isspace(UChar(ch))) {
923