From 603f0cb25b7acc8f04f4b18d2a2fe6f90039829a Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 12 Jun 2016 00:45:07 +0000 Subject: [PATCH] ncurses 6.0 - patch 20160611 + revise fix for Debian #805618 (report by Vlado Potisk, cf: 20151128). + modify test/ncurses.c a/A screens to make exiting on an escape character depend on the start of keypad and timeout modes, to allow better testing of function-keys. + modify rs1 for xterm-16color, xterm-88color and xterm-256color to reset palette using "oc" string as in linux -TD + use ANSI reply for u8 in xterm-new, to reflect vt220-style responses that could be returned -TD + added a few capabilities fixed in recent vte -TD --- NEWS | 13 +++++++++++- VERSION | 2 +- dist.mk | 4 ++-- doc/html/man/captoinfo.1m.html | 2 +- doc/html/man/clear.1.html | 2 +- doc/html/man/curs_getch.3x.html | 17 ++++++++++++---- doc/html/man/form.3x.html | 2 +- doc/html/man/infocmp.1m.html | 2 +- doc/html/man/infotocap.1m.html | 2 +- doc/html/man/menu.3x.html | 2 +- doc/html/man/ncurses.3x.html | 2 +- doc/html/man/panel.3x.html | 2 +- doc/html/man/tabs.1.html | 2 +- doc/html/man/terminfo.5.html | 2 +- doc/html/man/tic.1m.html | 2 +- doc/html/man/toe.1m.html | 2 +- doc/html/man/tput.1.html | 2 +- doc/html/man/tset.1.html | 2 +- man/curs_getch.3x | 10 ++++++++- misc/terminfo.src | 33 ++++++++++++++++++++++-------- ncurses/base/lib_getch.c | 14 ++++++------- 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 +- progs/tic.c | 4 ++-- test/blue.c | 6 +++--- test/ncurses.c | 35 ++++++++++++++++++-------------- test/test_sgr.c | 4 ++-- 31 files changed, 118 insertions(+), 72 deletions(-) diff --git a/NEWS b/NEWS index c124cf16..6e2284f0 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.2614 2016/06/04 23:20:36 tom Exp $ +-- $Id: NEWS,v 1.2618 2016/06/11 21:55:21 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,17 @@ 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. +20160611 + + revise fix for Debian #805618 (report by Vlado Potisk, cf: 20151128). + + modify test/ncurses.c a/A screens to make exiting on an escape + character depend on the start of keypad and timeout modes, to allow + better testing of function-keys. + + modify rs1 for xterm-16color, xterm-88color and xterm-256color to + reset palette using "oc" string as in linux -TD + + use ANSI reply for u8 in xterm-new, to reflect vt220-style responses + that could be returned -TD + + added a few capabilities fixed in recent vte -TD + 20160604 + correct logic for -f option in test/demo_terminfo.c + add test/list_keys.c diff --git a/VERSION b/VERSION index 1fd6fe35..4cdbc989 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:9 6.0 20160604 +5:0:9 6.0 20160611 diff --git a/dist.mk b/dist.mk index 11ca076d..c070040e 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1109 2016/06/04 11:00:51 tom Exp $ +# $Id: dist.mk,v 1.1110 2016/06/11 12:32:48 tom Exp $ # 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 -NCURSES_PATCH = 20160604 +NCURSES_PATCH = 20160611 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html index 899e1a49..4b474c25 100644 --- a/doc/html/man/captoinfo.1m.html +++ b/doc/html/man/captoinfo.1m.html @@ -198,7 +198,7 @@

SEE ALSO

        infocmp(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index 03e49701..47740165 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -67,7 +67,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/doc/html/man/curs_getch.3x.html b/doc/html/man/curs_getch.3x.html
index 90d336f9..c72a2944 100644
--- a/doc/html/man/curs_getch.3x.html
+++ b/doc/html/man/curs_getch.3x.html
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_getch.3x,v 1.45 2016/05/15 01:05:18 tom Exp @
+  * @Id: curs_getch.3x,v 1.47 2016/06/11 22:56:33 tom Exp @
 -->
 
 
@@ -125,6 +125,14 @@
        experience a delay between the time a user presses the es-
        cape key and the escape is returned to the program.
 
+       In ncurses, the timer normally expires after the value  in
+       ESCDELAY  (see curs_variables(3x)).  If notimeout is TRUE,
+       the timer does not expire; it  is  an  infinite  (or  very
+       large) value.  Because function keys usually begin with an
+       escape character, the terminal may appear to hang  in  no-
+       timeout  mode  after pressing the escape key until another
+       key is pressed.
+
 
 

Ungetting characters

        The ungetch routine places ch back onto the input queue to
@@ -171,6 +179,7 @@
             KEY_SR          Scroll 1 line backward (reverse)
             KEY_NPAGE       Next page
             KEY_PPAGE       Previous page
+
             KEY_STAB        Set tab
             KEY_CTAB        Clear tab
             KEY_CATAB       Clear all tabs
@@ -179,7 +188,6 @@
             KEY_RESET       Reset or hard reset
             KEY_PRINT       Print or copy
             KEY_LL          Home down or bottom (lower left)
-
             KEY_A1          Upper left of keypad
             KEY_A3          Upper right of keypad
             KEY_B2          Center of keypad
@@ -237,6 +245,7 @@
             KEY_SREDO       Shifted redo key
             KEY_SREPLACE    Shifted replace key
             KEY_SRIGHT      Shifted right arrow
+
             KEY_SRSUME      Shifted resume key
             KEY_SSAVE       Shifted save key
             KEY_SSUSPEND    Shifted suspend key
@@ -392,8 +401,8 @@
 
 

SEE ALSO

        curses(3x),       curs_inopts(3x),       curs_outopts(3x),
-       curs_mouse(3x),   curs_move(3x),   curs_refresh(3x),   re-
-       sizeterm(3x).
+       curs_mouse(3x),      curs_move(3x),      curs_refresh(3x),
+       curs_variables(3x), resizeterm(3x).
 
        Comparable  functions in the wide-character (ncursesw) li-
        brary are described in curs_get_wch(3x).
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
index c91ec933..baecf91e 100644
--- a/doc/html/man/form.3x.html
+++ b/doc/html/man/form.3x.html
@@ -235,7 +235,7 @@
        curses(3x) and related pages whose names begin "form_" for
        detailed descriptions of the entry points.
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
index 979bfddc..cf34637d 100644
--- a/doc/html/man/infocmp.1m.html
+++ b/doc/html/man/infocmp.1m.html
@@ -475,7 +475,7 @@
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 

AUTHOR

diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
index 6a246c54..1e64c4e7 100644
--- a/doc/html/man/infotocap.1m.html
+++ b/doc/html/man/infotocap.1m.html
@@ -88,7 +88,7 @@
 

SEE ALSO

        curses(3x), tic(1m), infocmp(1m), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 

AUTHOR

diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
index 0efe28e7..1f78eb9d 100644
--- a/doc/html/man/menu.3x.html
+++ b/doc/html/man/menu.3x.html
@@ -217,7 +217,7 @@
        curses(3x) and related pages whose names begin "menu_" for
        detailed descriptions of the entry points.
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
index b0d5a188..c2373647 100644
--- a/doc/html/man/ncurses.3x.html
+++ b/doc/html/man/ncurses.3x.html
@@ -60,7 +60,7 @@
        sonable optimization.  This implementation is "new curses"
        (ncurses) and is the approved replacement for 4.4BSD clas-
        sic  curses,  which has been discontinued.  This describes
-       ncurses version 6.0 (patch 20160521).
+       ncurses version 6.0 (patch 20160611).
 
        The ncurses library emulates the curses library of  System
        V  Release  4  UNIX,  and  XPG4 (X/Open Portability Guide)
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
index 1d8542c6..250c413f 100644
--- a/doc/html/man/panel.3x.html
+++ b/doc/html/man/panel.3x.html
@@ -209,7 +209,7 @@
 

SEE ALSO

        curses(3x), curs_variables(3x),
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 

AUTHOR

diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
index d9d7804e..27db64bb 100644
--- a/doc/html/man/tabs.1.html
+++ b/doc/html/man/tabs.1.html
@@ -164,7 +164,7 @@
 

SEE ALSO

        tset(1), infocmp(1m), curses(3x), terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index e3fc4b8b..d0ceccfb 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -75,7 +75,7 @@
        nals by giving a set of capabilities which they  have,  by
        specifying how to perform screen operations, and by speci-
        fying padding requirements and  initialization  sequences.
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
        Entries in terminfo consist of a sequence of `,' separated
        fields (embedded commas may be escaped with a backslash or
diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index 9c84e1bc..2cce15c7 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -398,7 +398,7 @@
        infocmp(1m),    captoinfo(1m),   infotocap(1m),   toe(1m),
        curses(3x), term(5).  terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 

AUTHOR

diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index ecfcf7d3..d2442acd 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -117,7 +117,7 @@
        tic(1m),   infocmp(1m),   captoinfo(1m),    infotocap(1m),
        curses(3x), terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index 5fb2df5a..6809ec97 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -383,7 +383,7 @@
        clear(1),    stty(1),   tabs(1),   tset(1),   terminfo(5),
        curs_termcap(3x).
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index e1ab663f..9970e0a9 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -350,7 +350,7 @@
        csh(1),   sh(1),   stty(1),   curs_terminfo(3x),   tty(4),
        terminfo(5), ttys(5), environ(7)
 
-       This describes ncurses version 6.0 (patch 20160521).
+       This describes ncurses version 6.0 (patch 20160611).
 
 
 
diff --git a/man/curs_getch.3x b/man/curs_getch.3x
index 642205a8..1196b3d6 100644
--- a/man/curs_getch.3x
+++ b/man/curs_getch.3x
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_getch.3x,v 1.45 2016/05/15 01:05:18 tom Exp $
+.\" $Id: curs_getch.3x,v 1.47 2016/06/11 22:56:33 tom Exp $
 .TH curs_getch 3X ""
 .na
 .hy 0
@@ -118,6 +118,13 @@ time, the character is passed through;
 otherwise, the function key value is returned.
 For this reason, many terminals experience a delay between the time
 a user presses the escape key and the escape is returned to the program.
+.PP
+In \fBncurses\fP, the timer normally expires after the value in \fBESCDELAY\fP (see \fBcurs_variables\fP(3X)).
+If \fBnotimeout\fP is \fBTRUE\fP, the timer does not expire;
+it is an infinite (or very large) value.
+Because function keys usually begin with an escape character,
+the terminal may appear to hang in notimeout mode after pressing the escape key
+until another key is pressed.
 .SS Ungetting characters
 .PP
 The \fBungetch\fR routine places \fIch\fR back onto the input queue to be
@@ -391,6 +398,7 @@ any code using it be conditionalized on the \fBNCURSES_VERSION\fR feature macro.
 \fBcurs_mouse\fR(3X),
 \fBcurs_move\fR(3X),
 \fBcurs_refresh\fR(3X),
+\fBcurs_variables\fR(3X),
 \fBresizeterm\fR(3X).
 .PP
 Comparable functions in the wide-character (ncursesw) library are
diff --git a/misc/terminfo.src b/misc/terminfo.src
index 48085426..63e7f512 100644
--- a/misc/terminfo.src
+++ b/misc/terminfo.src
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #	bug-ncurses@gnu.org
 #
-#	$Revision: 1.563 $
-#	$Date: 2016/05/15 00:30:28 $
+#	$Revision: 1.565 $
+#	$Date: 2016/06/11 18:59:38 $
 #
 # The original header is preserved below for reference.  It is noted that there
 # is a "newer" version which differs in some cosmetic details (but actually
@@ -4019,8 +4019,8 @@ xterm-xfree86|xterm terminal emulator (XFree86),
 xterm-new|modern xterm terminal emulator,
 	npc,
 	indn=\E[%p1%dS, kb2=\EOE, kcbt=\E[Z, kent=\EOM,
-	rin=\E[%p1%dT, use=xterm+pcfkeys, use=xterm+tmux,
-	use=xterm-basic,
+	rin=\E[%p1%dT, use=ansi+enq, use=xterm+pcfkeys,
+	use=xterm+tmux, use=xterm-basic,
 
 # This fragment is for people who cannot agree on what the backspace key
 # should send.
@@ -4230,7 +4230,8 @@ xterm-xi|xterm on XI Graphics Accelerated X under BSD/OS 3.1,
 xterm-16color|xterm with 16 colors like aixterm,
 	ccc,
 	initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
-	use=ibm+16color, use=xterm-new,
+	oc=\E]104\007, rs1=\Ec\E]104\007, use=ibm+16color,
+	use=xterm-new,
 
 # 256-colors is a compile-time feature of XFree86 xterm beginning with
 # patch #111 (1999/7/10) -TD
@@ -4273,9 +4274,10 @@ xterm+88color|xterm 88-color feature,
 
 # These variants of XFree86 3.9.16 xterm are built as a configure option.
 xterm-256color|xterm with 256 colors,
-	use=xterm+256color, use=xterm-new,
+	rs1=\Ec\E]104\007, use=xterm+256color, use=xterm-new,
 xterm-88color|xterm with 88 colors,
-	use=xterm+88color, use=xterm-256color,
+	rs1=\Ec\E]104\007, use=xterm+88color,
+	use=xterm-256color,
 
 # This chunk is based on suggestions by Ailin Nemui and Nicholas Marriott, who
 # asked for some of xterm's advanced features to be added to its terminfo
@@ -4878,9 +4880,13 @@ gnome+pcfkeys|VTE's variation on xterm+pcfkeys,
 gnome|GNOME Terminal,
 	use=vte-2012,
 
-# relevant changes were made in January 2014
+# relevant changes were made in January 2014, and later.
 vte-2014|VTE 0.35.1,
-	use=xterm+pcfkeys, use=vte-2012,
+	ncv@,
+	cbt=\E[Z, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l,
+	ich=\E[%p1%d@, indn=\E[%p1%dS, kent=\EOM, rin=\E[%p1%dT,
+	rmso=\E[27m, rmul=\E[24m, use=xterm+pcfkeys,
+	use=vte-2012,
 
 vte|VTE aka GNOME Terminal,
 	use=vte-2014,
@@ -23836,4 +23842,13 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #	+ modify linux2.6 entry to improve line-drawing -TD
 #	+ make linux3.0 entry the default linux entry (Debian #823658) -TD
 #
+# 2016-05-29
+#	+ modify rs1 for xterm-16color, xterm-88color and xterm-256color to
+#	  reset palette using "oc" string as in linux -TD
+#
+# 2016-06-11
+#	+ use ANSI reply for u8 in xterm-new, to reflect vt220-style responses
+#	  that could be returned -TD
+#	+ added a few capabilities fixed in recent vte -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
diff --git a/ncurses/base/lib_getch.c b/ncurses/base/lib_getch.c
index 5cd52ba8..14956705 100644
--- a/ncurses/base/lib_getch.c
+++ b/ncurses/base/lib_getch.c
@@ -42,7 +42,7 @@
 
 #include 
 
-MODULE_ID("$Id: lib_getch.c,v 1.134 2016/01/23 21:32:00 tom Exp $")
+MODULE_ID("$Id: lib_getch.c,v 1.135 2016/06/11 21:52:23 tom Exp $")
 
 #include 
 
@@ -360,7 +360,7 @@ fifo_clear(SCREEN *sp)
     tail = peek = 0;
 }
 
-static int kgetch(SCREEN *EVENTLIST_2nd(_nc_eventlist * evl));
+static int kgetch(SCREEN *, bool EVENTLIST_2nd(_nc_eventlist *));
 
 static void
 recur_wrefresh(WINDOW *win)
@@ -497,8 +497,6 @@ _nc_wgetch(WINDOW *win,
 	    TR(TRACE_IEVENT, ("timed delay in wgetch()"));
 	    if (sp->_cbreak > 1)
 		delay = (sp->_cbreak - 1) * 100;
-	    else if (win->_notimeout)
-		delay = 0;
 	    else
 		delay = win->_delay;
 
@@ -539,7 +537,7 @@ _nc_wgetch(WINDOW *win,
 	int runcount = 0;
 
 	do {
-	    ch = kgetch(sp EVENTLIST_2nd(evl));
+	    ch = kgetch(sp, win->_notimeout EVENTLIST_2nd(evl));
 	    if (ch == KEY_MOUSE) {
 		++runcount;
 		if (sp->_mouse_inline(sp))
@@ -651,7 +649,7 @@ wgetch_events(WINDOW *win, _nc_eventlist * evl)
     int code;
     int value;
 
-    T((T_CALLED("wgetch_events(%p,%p)"), (void *) win, (void *)evl));
+    T((T_CALLED("wgetch_events(%p,%p)"), (void *) win, (void *) evl));
     code = _nc_wgetch(win,
 		      &value,
 		      _nc_use_meta(win)
@@ -694,11 +692,11 @@ wgetch(WINDOW *win)
 */
 
 static int
-kgetch(SCREEN *sp EVENTLIST_2nd(_nc_eventlist * evl))
+kgetch(SCREEN *sp, bool forever EVENTLIST_2nd(_nc_eventlist * evl))
 {
     TRIES *ptr;
     int ch = 0;
-    int timeleft = GetEscdelay(sp);
+    int timeleft = forever ? 9999999 : GetEscdelay(sp);
 
     TR(TRACE_IEVENT, ("kgetch() called"));
 
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index 75175198..003a1872 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160604) unstable; urgency=low
+ncurses6 (6.0+20160611) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 04 Jun 2016 07:00:51 -0400
+ -- Thomas E. Dickey   Sat, 11 Jun 2016 08:32:48 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index 75175198..003a1872 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160604) unstable; urgency=low
+ncurses6 (6.0+20160611) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 04 Jun 2016 07:00:51 -0400
+ -- Thomas E. Dickey   Sat, 11 Jun 2016 08:32:48 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian/changelog b/package/debian/changelog
index 520789fd..6eff57a0 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20160604) unstable; urgency=low
+ncurses6 (6.0+20160611) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 04 Jun 2016 07:00:51 -0400
+ -- Thomas E. Dickey   Sat, 11 Jun 2016 08:32:48 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index fd16f725..9bb7ded4 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.161 2016/06/04 11:00:51 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.162 2016/06/11 12:32:48 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "0"
 !define VERSION_YYYY  "2016"
-!define VERSION_MMDD  "0604"
+!define VERSION_MMDD  "0611"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index 82a22803..7e654bbe 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.0
-Release: 20160604
+Release: 20160611
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 296e81f1..8e7bcb24 100644
--- a/package/ncurses.spec
+++ b/package/ncurses.spec
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20160604
+Release: 20160611
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/progs/tic.c b/progs/tic.c
index 13478899..9f446f5c 100644
--- a/progs/tic.c
+++ b/progs/tic.c
@@ -48,7 +48,7 @@
 #include 
 #include 
 
-MODULE_ID("$Id: tic.c,v 1.221 2016/01/02 20:04:37 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.222 2016/06/11 23:20:55 tom Exp $")
 
 #define STDIN_NAME ""
 
@@ -2274,7 +2274,7 @@ check_conflict(TERMTYPE *tp)
 static void
 check_exit_attribute(const char *name, char *test, char *trimmed, char *untrimmed)
 {
-    if (VALID_STRING(test)) {
+    if (VALID_STRING(test) && (trimmed != 0)) {
 	if (similar_sgr(-1, trimmed, test) ||
 	    similar_sgr(-1, untrimmed, test)) {
 	    _nc_warning("%s matches exit_attribute_mode", name);
diff --git a/test/blue.c b/test/blue.c
index 1d168e37..5402c4f9 100644
--- a/test/blue.c
+++ b/test/blue.c
@@ -36,7 +36,7 @@
  *****************************************************************************/
 
 /*
- * $Id: blue.c,v 1.44 2016/04/16 23:20:09 tom Exp $
+ * $Id: blue.c,v 1.45 2016/06/12 00:17:37 tom Exp $
  */
 
 #include 
@@ -209,7 +209,7 @@ printcard(int value)
 	addch(ranks[isuit][0] | (chtype) COLOR_PAIR(BLUE_ON_WHITE));
 	addch(ranks[isuit][1] | (chtype) COLOR_PAIR(BLUE_ON_WHITE));
 
-	attr_on(color, NULL);
+	attron(color);
 #if USE_WIDEC_SUPPORT
 	{
 	    wchar_t values[2];
@@ -220,7 +220,7 @@ printcard(int value)
 #else
 	addch((chtype) suits[which]);
 #endif
-	attr_off(color, NULL);
+	attroff(color);
     }
     (void) addch(' ');
 }
diff --git a/test/ncurses.c b/test/ncurses.c
index 664311cc..5764dd75 100644
--- a/test/ncurses.c
+++ b/test/ncurses.c
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond  1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.437 2016/05/07 23:56:59 tom Exp $
+$Id: ncurses.c,v 1.438 2016/06/11 21:05:48 tom Exp $
 
 ***************************************************************************/
 
@@ -200,9 +200,9 @@ Repaint(void)
 }
 
 static bool
-isQuit(int c)
+isQuit(int c, bool escape)
 {
-    return ((c) == QUIT || (c) == ESCAPE);
+    return ((c) == QUIT || (escape && ((c) == ESCAPE)));
 }
 #define case_QUIT	QUIT: case ESCAPE
 
@@ -652,6 +652,8 @@ blocking_getch(GetchFlags flags, int delay)
     return ((delay < 0) && flags['t']);
 }
 
+#define ExitOnEscape() (flags[UChar('k')] && flags[UChar('t')])
+
 static void
 wgetch_help(WINDOW *win, GetchFlags flags)
 {
@@ -678,13 +680,16 @@ wgetch_help(WINDOW *win, GetchFlags flags)
     printw("Type any key to see its %s value.  Also:\n",
 	   flags['k'] ? "keypad" : "literal");
     for (n = 0; n < SIZEOF(help); ++n) {
+	const char *msg = help[n];
 	int row = 1 + (int) (n % chk);
 	int col = (n >= chk) ? COLS / 2 : 0;
-	int flg = ((strstr(help[n], "toggle") != 0)
-		   && (flags[UChar(*help[n])] != FALSE));
+	int flg = ((strstr(msg, "toggle") != 0)
+		   && (flags[UChar(*msg)] != FALSE));
+	if (*msg == '^' && ExitOnEscape())
+	    msg = "^[,^q -- quit";
 	if (flg)
 	    (void) standout();
-	MvPrintw(row, col, "%s", help[n]);
+	MvPrintw(row, col, "%s", msg);
 	if (col == 0)
 	    clrtoeol();
 	if (flg)
@@ -842,7 +847,7 @@ wgetch_test(unsigned level, WINDOW *win, int delay)
 	if (c == ERR && blocking_getch(flags, delay)) {
 	    wprintw(win, "ERR");
 	    wgetch_wrap(win, first_y);
-	} else if (isQuit(c)) {
+	} else if (isQuit(c, ExitOnEscape())) {
 	    break;
 	} else if (c == 'e') {
 	    flags[UChar('e')] = !flags[UChar('e')];
@@ -1098,7 +1103,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay)
 	if (code == ERR && blocking_getch(flags, delay)) {
 	    wprintw(win, "ERR");
 	    wgetch_wrap(win, first_y);
-	} else if (isQuit((int) c)) {
+	} else if (isQuit((int) c, ExitOnEscape())) {
 	    break;
 	} else if (c == 'e') {
 	    flags[UChar('e')] = !flags[UChar('e')];
@@ -2962,7 +2967,7 @@ color_edit(void)
 	MvPrintw(LINES - 1, 0, "Number: %d", value);
 	clrtoeol();
     } while
-	(!isQuit(this_c));
+	(!isQuit(this_c, TRUE));
 
     erase();
 
@@ -3222,7 +3227,7 @@ slk_test(void)
 	    beep();
 	    break;
 	}
-    } while (!isQuit(c = Getchar()));
+    } while (!isQuit(c = Getchar(), TRUE));
 
   done:
     slk_clear();
@@ -3376,7 +3381,7 @@ wide_slk_test(void)
 	    beep();
 	    break;
 	}
-    } while (!isQuit(c = Getchar()));
+    } while (!isQuit(c = Getchar(), TRUE));
 
   done:
     slk_clear();
@@ -3716,7 +3721,7 @@ acs_display(void)
 		     my_list[at_code].name);
 	}
 	refresh();
-    } while (!isQuit(c = Getchar()));
+    } while (!isQuit(c = Getchar(), TRUE));
 
     Pause();
     erase();
@@ -4251,7 +4256,7 @@ wide_acs_display(void)
 		     my_list[at_code].name);
 	}
 	refresh();
-    } while (!isQuit(c = Getchar()));
+    } while (!isQuit(c = Getchar(), TRUE));
 
     Pause();
     erase();
@@ -4865,7 +4870,7 @@ acs_and_scroll(void)
 	usescr = frame_win(current);
 	wrefresh(usescr);
     } while
-	(!isQuit(c = wGetchar(usescr))
+	(!isQuit(c = wGetchar(usescr), TRUE)
 	 && (c != ERR));
 
   breakout:
@@ -6757,7 +6762,7 @@ overlap_test(void)
     memset(flavor, 0, sizeof(flavor));
     state = overlap_help(0, flavor);
 
-    while (!isQuit(ch = Getchar()))
+    while (!isQuit(ch = Getchar(), TRUE))
 	switch (ch) {
 	case 'a':		/* refresh window A first, then B */
 	    overlap_test_0(win1, win2);
diff --git a/test/test_sgr.c b/test/test_sgr.c
index b113e63f..aa7a649b 100644
--- a/test/test_sgr.c
+++ b/test/test_sgr.c
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: test_sgr.c,v 1.6 2016/02/13 22:08:16 tom Exp $
+ * $Id: test_sgr.c,v 1.7 2016/06/11 23:15:03 tom Exp $
  *
  * A simple demo of the sgr/sgr0 terminal capabilities.
  */
@@ -203,7 +203,7 @@ brute_force(const char *name)
     } else if (!VALID_STRING(my_sgr0)) {
 	fprintf(stderr, "no \"sgr0\" capability found\n");
     } else {
-	char *values[MAXSGR];
+	char *values[MAXSGR + MAXPAR];
 	unsigned j;
 	unsigned ignore = 0;
 	unsigned reason = 0;
-- 
2.44.0