From: Thomas E. Dickey Date: Sun, 30 Apr 2017 01:53:51 +0000 (+0000) Subject: ncurses 6.0 - patch 20170429 X-Git-Tag: v6.1~39 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=8e397cccba0aad135cb9a8a353756f4273a7cdf6;hp=a8e3f06ac309504143cd56ac9ec55889bfdf4914 ncurses 6.0 - patch 20170429 + corrected a case where $with_gpm was set to "maybe" after CF_WITH_GPM, overlooked in 20160528 fixes (report by Alexandre Bury). + improve a couple of test-program's help-messages. + corrected loop in rain.c from 20170415 changes. + modify winnstr and winchnstr to return error if the output pointer is null, as well as adding a null pointer check of the window pointer for better compatibility with other implementations. + improve discussion of NetBSD curses in scr_dump.5 + modify LIMIT_TYPED macro in new_pair.h to avoid changing sign of the value to be limited (reports by Darby Payne, Rob Boudreau). + update config.guess, config.sub from http://git.savannah.gnu.org/cgit/config.git --- diff --git a/NEWS b/NEWS index 1019c400..7365c949 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.2822 2017/04/22 20:29:13 tom Exp $ +-- $Id: NEWS,v 1.2829 2017/04/30 01:26:45 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,20 @@ 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. +20170429 + + corrected a case where $with_gpm was set to "maybe" after CF_WITH_GPM, + overlooked in 20160528 fixes (report by Alexandre Bury). + + improve a couple of test-program's help-messages. + + corrected loop in rain.c from 20170415 changes. + + modify winnstr and winchnstr to return error if the output pointer is + null, as well as adding a null pointer check of the window pointer + for better compatibility with other implementations. + + improve discussion of NetBSD curses in scr_dump.5 + + modify LIMIT_TYPED macro in new_pair.h to avoid changing sign of the + value to be limited (reports by Darby Payne, Rob Boudreau). + + update config.guess, config.sub from + http://git.savannah.gnu.org/cgit/config.git + 20170422 + build-fix for termcap-configuration (report by Chi-Hsuan Yen). + improve terminfo manual page discussion of control- and graphics- diff --git a/VERSION b/VERSION index f4ee9f2c..19cac37e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:9 6.0 20170422 +5:0:9 6.0 20170429 diff --git a/aclocal.m4 b/aclocal.m4 index 3fd29176..722dbc4c 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.808 2017/02/26 00:34:27 tom Exp $ +dnl $Id: aclocal.m4,v 1.809 2017/04/29 22:41:39 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -7268,7 +7268,7 @@ then fi ])dnl dnl --------------------------------------------------------------------------- -dnl CF_WITH_GPM version: 9 updated: 2016/05/28 20:33:31 +dnl CF_WITH_GPM version: 10 updated: 2017/04/29 18:32:18 dnl ----------- dnl dnl The option parameter (if neither yes/no) is assumed to be the name of @@ -7290,7 +7290,7 @@ if test "$with_gpm" != no ; then AC_DEFINE(HAVE_LIBGPM,1,[Define to 1 if we have the gpm library]) with_gpm=yes else - AC_CHECK_LIB(gpm,Gpm_Open,[:],[ + AC_CHECK_LIB(gpm,Gpm_Open,[with_gpm=yes],[ if test "$with_gpm" = maybe; then AC_MSG_WARN(Cannot link with GPM library) with_gpm=no diff --git a/config.guess b/config.guess index bbd48b60..69ed3e57 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-03-05' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -837,10 +837,11 @@ EOF UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin @@ -1343,6 +1344,9 @@ EOF NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; + NSX-?:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk${UNAME_RELEASE} + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; diff --git a/config.sub b/config.sub index 7e792b4a..40ea5dfe 100755 --- a/config.sub +++ b/config.sub @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2017 Free Software Foundation, Inc. -timestamp='2017-01-01' +timestamp='2017-04-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -263,7 +263,7 @@ case $basic_machine in | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ @@ -315,6 +315,7 @@ case $basic_machine in | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ + | wasm32 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -388,7 +389,7 @@ case $basic_machine in | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ @@ -446,6 +447,7 @@ case $basic_machine in | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -948,6 +950,9 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -1243,6 +1248,9 @@ case $basic_machine in basic_machine=a29k-wrs os=-vxworks ;; + wasm32) + basic_machine=wasm32-unknown + ;; w65*) basic_machine=w65-wdc os=-none diff --git a/configure b/configure index 679e5ad7..255e9fac 100755 --- a/configure +++ b/configure @@ -5353,7 +5353,7 @@ fi echo "$as_me:5353: result: $ac_cv_lib_gpm_Gpm_Open" >&5 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6 if test $ac_cv_lib_gpm_Gpm_Open = yes; then - : + with_gpm=yes else if test "$with_gpm" = maybe; then diff --git a/dist.mk b/dist.mk index 6ff73c12..68a2a9b0 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.1157 2017/04/16 10:19:41 tom Exp $ +# $Id: dist.mk,v 1.1158 2017/04/23 14:51:25 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 = 20170422 +NCURSES_PATCH = 20170429 # 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/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index b719c581..ab154905 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -131,7 +131,7 @@

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index 84af2f97..12dda478 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 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index 0aa2de38..edc85d7e 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -147,7 +147,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/curs_inchstr.3x.html b/doc/html/man/curs_inchstr.3x.html
index 2eb84bc7..297aaa48 100644
--- a/doc/html/man/curs_inchstr.3x.html
+++ b/doc/html/man/curs_inchstr.3x.html
@@ -1,6 +1,6 @@
 
 
 
@@ -83,26 +83,29 @@
        (the number of  characters  retrieved,  exclusive  of  the
        trailing 0).
 
-       No  error  conditions are defined.  If the chstr parameter
-       is null, no data is returned, and the return value is  ze-
-       ro.
+       X/Open Curses defines no error conditions.  In this imple-
+       mentation:
 
-       Functions  with a "mv" prefix first perform a cursor move-
-       ment using wmove, and return an error if the  position  is
+       o   If the win parameter is null, an error is returned,
+
+       o   If the chstr parameter is null, an error is returned,
+
+       Functions with a "mv" prefix first perform a cursor  move-
+       ment  using  wmove, and return an error if the position is
        outside the window, or if the window pointer is null.
 
 
 

NOTES

-       Note  that  all  routines  except winchnstr may be macros.
-       SVr4 does not document whether the result string is  zero-
-       terminated;  it  does  not document whether a length limit
+       Note that all routines except  winchnstr  may  be  macros.
+       SVr4  does not document whether the result string is zero-
+       terminated; it does not document whether  a  length  limit
        argument includes any trailing 0; and it does not document
        the meaning of the return value.
 
 
 

PORTABILITY

-       These  functions are described in the XSI Curses standard,
-       Issue 4.  It is no more specific than the SVr4  documenta-
+       These functions are described in the XSI Curses  standard,
+       Issue  4.  It is no more specific than the SVr4 documenta-
        tion on the trailing 0.  It does specify that the success-
        ful return of the functions is OK.
 
@@ -110,7 +113,7 @@
 

SEE ALSO

        curses(3x), curs_inch(3x).
 
-       Comparable functions in the wide-character (ncursesw)  li-
+       Comparable  functions in the wide-character (ncursesw) li-
        brary are described in curs_in_wchstr(3x).
 
 
diff --git a/doc/html/man/curs_instr.3x.html b/doc/html/man/curs_instr.3x.html
index da74fd1a..9012f5eb 100644
--- a/doc/html/man/curs_instr.3x.html
+++ b/doc/html/man/curs_instr.3x.html
@@ -1,6 +1,6 @@
 
 
 
@@ -78,12 +78,15 @@
        All  of the functions return ERR upon failure, or the num-
        ber of characters actually read into the string.
 
-       X/Open defines no error conditions.  In  this  implementa-
-       tion, if the window parameter is null or the str parameter
-       is null, a zero is returned.
+       X/Open Curses defines no error conditions.  In this imple-
+       mentation:
 
-       Functions with a "mv" prefix first perform a cursor  move-
-       ment  using  wmove, and return an error if the position is
+       o   If the win parameter is null, an error is returned,
+
+       o   If the chstr parameter is null, an error is returned,
+
+       Functions  with a "mv" prefix first perform a cursor move-
+       ment using wmove, and return an error if the  position  is
        outside the window, or if the window pointer is null.
 
 
@@ -92,11 +95,11 @@
 
 
 

PORTABILITY

-       SVr4 does not document whether a length limit includes  or
+       SVr4  does not document whether a length limit includes or
        excludes the trailing NUL.
 
-       The  ncurses library extends the XSI description by allow-
-       ing a negative value for n.  In this case,  the  functions
+       The ncurses library extends the XSI description by  allow-
+       ing  a  negative value for n.  In this case, the functions
        return the string ending at the right margin.
 
 
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
index bfb4c7a6..fcb67f54 100644
--- a/doc/html/man/form.3x.html
+++ b/doc/html/man/form.3x.html
@@ -239,7 +239,7 @@
        curses(3x) and related pages whose names begin "form_" for
        detailed descriptions of the entry points.
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
index 7b959f21..26b750a7 100644
--- a/doc/html/man/infocmp.1m.html
+++ b/doc/html/man/infocmp.1m.html
@@ -514,7 +514,7 @@
 
        http://invisible-island.net/ncurses/tctest.html
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 

AUTHOR

diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
index e2bfb14b..b0bf6fc0 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 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 

AUTHOR

diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
index 6f97dfd7..96ddacff 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 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
index 3e409223..4ba66546 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 20170422).
+       ncurses version 6.0 (patch 20170429).
 
        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/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
index a42dbc77..aabe9c75 100644
--- a/doc/html/man/ncurses6-config.1.html
+++ b/doc/html/man/ncurses6-config.1.html
@@ -114,7 +114,7 @@
 

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
index d63c7f39..ba7598c1 100644
--- a/doc/html/man/panel.3x.html
+++ b/doc/html/man/panel.3x.html
@@ -208,7 +208,7 @@
 

SEE ALSO

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

AUTHOR

diff --git a/doc/html/man/scr_dump.5.html b/doc/html/man/scr_dump.5.html
index dafb1c0e..20fd4f42 100644
--- a/doc/html/man/scr_dump.5.html
+++ b/doc/html/man/scr_dump.5.html
@@ -26,7 +26,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: scr_dump.5,v 1.9 2017/04/22 18:44:25 tom Exp @
+  * @Id: scr_dump.5,v 1.10 2017/04/29 20:53:55 tom Exp @
 -->
 
 
@@ -253,8 +253,22 @@
 
 
 

NetBSD

-       As of April 2017,  NetBSD  curses  does  not  yet  support
-       screen dumps.
+       As of April 2017, NetBSD curses does not support  scr_dump
+       and  scr_restore  (or  scr_init, scr_set), although it has
+       putwin and getwin.
+
+       Like ncurses5, NetBSD putwin does not identify  its  dumps
+       with a useful magic number.  It writes
+
+       o   the  curses shared library major and minor versions as
+           the first two bytes (e.g., 7 and 1),
+
+       o   followed by a binary dump of the WINDOW,
+
+       o   some data for wide-characters referenced by the WINDOW
+           structure, and
+
+       o   finally, lines as done by other implementations.
 
 
 

EXAMPLE

diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
index e13434bf..8dbcda50 100644
--- a/doc/html/man/tabs.1.html
+++ b/doc/html/man/tabs.1.html
@@ -170,7 +170,7 @@
 

SEE ALSO

        tset(1), infocmp(1m), curses(3x), terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index 37564f42..f2d7ffd4 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -33,7 +33,7 @@
   ****************************************************************************
   * @Id: terminfo.head,v 1.32 2017/04/22 13:52:49 tom Exp @
   * Head of terminfo man page ends here
-  * @Id: terminfo.tail,v 1.84 2017/04/22 16:00:56 tom Exp @
+  * @Id: terminfo.tail,v 1.85 2017/04/22 18:59:02 tom Exp @
   * Beginning of terminfo.tail file
   * This file is part of ncurses.
   * See "terminfo.head" for copyright.
@@ -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 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 

Terminfo Entry Syntax

diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index aaf92162..27486f49 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -403,7 +403,7 @@
        infocmp(1m),   captoinfo(1m),   infotocap(1m),    toe(1m),
        curses(3x), term(5).  terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 

AUTHOR

diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index eb756553..0c9c6bf3 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -120,7 +120,7 @@
        tic(1m),    infocmp(1m),   captoinfo(1m),   infotocap(1m),
        curses(3x), terminfo(5).
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index db32031e..a7e1c835 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -530,7 +530,7 @@
        clear(1),    stty(1),   tabs(1),   tset(1),   terminfo(5),
        curs_termcap(3x).
 
-       This describes ncurses version 6.0 (patch 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index a6c8c10c..03b4eb60 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -435,7 +435,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 20170422).
+       This describes ncurses version 6.0 (patch 20170429).
 
 
 
diff --git a/man/curs_inchstr.3x b/man/curs_inchstr.3x
index 2dc7673c..0f2a9134 100644
--- a/man/curs_inchstr.3x
+++ b/man/curs_inchstr.3x
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc.              *
+.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -26,8 +26,15 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_inchstr.3x,v 1.15 2010/12/04 18:36:44 tom Exp $
+.\" $Id: curs_inchstr.3x,v 1.16 2017/04/29 21:31:17 tom Exp $
 .TH curs_inchstr 3X ""
+.ie \n(.g .ds `` \(lq
+.el       .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el       .ds '' ''
+.de bP
+.IP \(bu 4
+..
 .na
 .hy 0
 .SH NAME
@@ -74,12 +81,14 @@ All routines return the integer \fBERR\fR upon failure and an integer value
 other than \fBERR\fR upon successful completion (the number of characters
 retrieved, exclusive of the trailing 0).
 .PP
-No error conditions are defined.
-If the \fIchstr\fP parameter is null,
-no data is returned,
-and the return value is zero.
+X/Open Curses defines no error conditions.
+In this implementation:
+.bP
+If the \fIwin\fP parameter is null, an error is returned,
+.bP
+If the \fIchstr\fP parameter is null, an error is returned,
 .PP
-Functions with a "mv" prefix first perform a cursor movement using
+Functions with a \*(``mv\*('' prefix first perform a cursor movement using
 \fBwmove\fP, and return an error if the position is outside the window,
 or if the window pointer is null.
 .SH NOTES
diff --git a/man/curs_instr.3x b/man/curs_instr.3x
index 1b17db95..bb6435b1 100644
--- a/man/curs_instr.3x
+++ b/man/curs_instr.3x
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc.              *
+.\" Copyright (c) 1998-2010,2017 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -26,8 +26,15 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_instr.3x,v 1.16 2010/12/04 18:38:55 tom Exp $
+.\" $Id: curs_instr.3x,v 1.17 2017/04/29 21:37:55 tom Exp $
 .TH curs_instr 3X ""
+.ie \n(.g .ds `` \(lq
+.el       .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el       .ds '' ''
+.de bP
+.IP \(bu 4
+..
 .SH NAME
 \fBinstr\fR,
 \fBinnstr\fR,
@@ -66,12 +73,14 @@ functions with \fIn\fR as the last argument return a leading substring at most
 All of the functions return \fBERR\fR upon failure,
 or the number of characters actually read into the string.
 .PP
-X/Open defines no error conditions.
-In this implementation,
-if the window parameter is null or the str parameter is null,
-a zero is returned.
+X/Open Curses defines no error conditions.
+In this implementation:
+.bP
+If the \fIwin\fP parameter is null, an error is returned,
+.bP
+If the \fIchstr\fP parameter is null, an error is returned,
 .PP
-Functions with a "mv" prefix first perform a cursor movement using
+Functions with a \*(``mv\*('' prefix first perform a cursor movement using
 \fBwmove\fP, and return an error if the position is outside the window,
 or if the window pointer is null.
 .SH NOTES
diff --git a/man/scr_dump.5 b/man/scr_dump.5
index aff1fb57..88c427bc 100644
--- a/man/scr_dump.5
+++ b/man/scr_dump.5
@@ -26,7 +26,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: scr_dump.5,v 1.9 2017/04/22 18:44:25 tom Exp $
+.\" $Id: scr_dump.5,v 1.10 2017/04/29 20:53:55 tom Exp $
 .TH scr_dump 5
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -251,7 +251,23 @@ e.g.,
 .NE
 .SS NetBSD
 .PP
-As of April 2017, NetBSD curses does not yet support screen dumps.
+As of April 2017, NetBSD curses does
+not support \fBscr_dump\fP and \fBscr_restore\fP
+(or \fBscr_init\fP, \fBscr_set\fP),
+although it has \fBputwin\fP and \fBgetwin\fP.
+.PP
+Like ncurses5, NetBSD \fBputwin\fP does not identify its dumps with a
+useful magic number.
+It writes
+.bP
+the curses shared library major and minor versions
+as the first two bytes (e.g., 7 and 1),
+.bP
+followed by a binary dump of the \fBWINDOW\fP,
+.bP
+some data for wide-characters referenced by the \fBWINDOW\fP structure, and
+.bP
+finally, lines as done by other implementations.
 .SH EXAMPLE
 .PP
 Given a simple program which writes text to the screen
diff --git a/ncurses/base/lib_inchstr.c b/ncurses/base/lib_inchstr.c
index aebb6d62..bf30e3ce 100644
--- a/ncurses/base/lib_inchstr.c
+++ b/ncurses/base/lib_inchstr.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2010,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +41,7 @@
 
 #include 
 
-MODULE_ID("$Id: lib_inchstr.c,v 1.12 2010/12/20 01:37:41 tom Exp $")
+MODULE_ID("$Id: lib_inchstr.c,v 1.16 2017/04/30 00:10:25 tom Exp $")
 
 NCURSES_EXPORT(int)
 winchnstr(WINDOW *win, chtype *str, int n)
@@ -50,16 +50,19 @@ winchnstr(WINDOW *win, chtype *str, int n)
 
     T((T_CALLED("winchnstr(%p,%p,%d)"), (void *) win, (void *) str, n));
 
-    if (!str)
-	returnCode(0);
+    if (!win || !str) {
+	i = ERR;
+    } else {
+	int row = win->_cury;
+	int col = win->_curx;
+	NCURSES_CH_T *text = win->_line[row].text;
 
-    if (win) {
-	for (; (n < 0 || (i < n)) && (win->_curx + i <= win->_maxx); i++)
-	    str[i] =
-		(chtype) CharOf(win->_line[win->_cury].text[win->_curx + i]) |
-		AttrOf(win->_line[win->_cury].text[win->_curx + i]);
+	for (; (n < 0 || (i < n)) && (col + i <= win->_maxx); i++) {
+	    str[i] = (((chtype) CharOf(text[col + i]) & A_CHARTEXT) |
+		      AttrOf(text[col + i]));
+	}
+	str[i] = (chtype) 0;
     }
-    str[i] = (chtype) 0;
 
     returnCode(i);
 }
diff --git a/ncurses/base/lib_instr.c b/ncurses/base/lib_instr.c
index af26de48..dbd2a020 100644
--- a/ncurses/base/lib_instr.c
+++ b/ncurses/base/lib_instr.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2014,2016 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +41,7 @@
 
 #include 
 
-MODULE_ID("$Id: lib_instr.c,v 1.22 2016/05/28 23:11:26 tom Exp $")
+MODULE_ID("$Id: lib_instr.c,v 1.23 2017/04/29 21:16:20 tom Exp $")
 
 NCURSES_EXPORT(int)
 winnstr(WINDOW *win, char *str, int n)
@@ -50,20 +50,19 @@ winnstr(WINDOW *win, char *str, int n)
 
     T((T_CALLED("winnstr(%p,%p,%d)"), (void *) win, str, n));
 
-    if (!str)
-	returnCode(0);
-
-    if (win) {
-	int row, col;
-
-	getyx(win, row, col);
+    if (!win || !str) {
+	i = ERR;
+    } else {
+	int row = win->_cury;
+	int col = win->_curx;
+	NCURSES_CH_T *text = win->_line[row].text;
 
 	if (n < 0)
-	    n = win->_maxx - win->_curx + 1;
+	    n = win->_maxx - col + 1;
 
 	for (; i < n;) {
 #if USE_WIDEC_SUPPORT
-	    cchar_t *cell = &(win->_line[row].text[col]);
+	    cchar_t *cell = &(text[col]);
 	    attr_t attrs;
 	    NCURSES_PAIRS_T pair;
 	    mbstate_t state;
@@ -109,14 +108,14 @@ winnstr(WINDOW *win, char *str, int n)
 		}
 	    }
 #else
-	    str[i++] = (char) CharOf(win->_line[row].text[col]);
+	    str[i++] = (char) CharOf(text[col]);
 #endif
 	    if (++col > win->_maxx) {
 		break;
 	    }
 	}
+	str[i] = '\0';		/* SVr4 does not seem to count the null */
     }
-    str[i] = '\0';		/* SVr4 does not seem to count the null */
     T(("winnstr returns %s", _nc_visbuf(str)));
     returnCode(i);
 }
diff --git a/ncurses/base/lib_mouse.c b/ncurses/base/lib_mouse.c
index e6976349..161e443d 100644
--- a/ncurses/base/lib_mouse.c
+++ b/ncurses/base/lib_mouse.c
@@ -84,7 +84,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.171 2017/03/25 21:20:35 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.173 2017/04/30 01:22:04 tom Exp $")
 
 #include 
 
@@ -486,10 +486,15 @@ load_gpm_library(SCREEN *sp)
 {
     sp->_mouse_gpm_found = FALSE;
     if ((sp->_dlopen_gpm = dlopen(LIBGPM_SONAME, my_RTLD)) != 0) {
+#pragma GCC diagnostic push
+#if (defined(__GNUC__) && (__GNUC__ >= 5)) || defined(__clang__)
+#pragma GCC diagnostic ignored "-Wpedantic"
+#endif
 	if (GET_DLSYM(gpm_fd) == 0 ||
 	    GET_DLSYM(Gpm_Open) == 0 ||
 	    GET_DLSYM(Gpm_Close) == 0 ||
 	    GET_DLSYM(Gpm_GetEvent) == 0) {
+#pragma GCC diagnostic pop
 	    T(("GPM initialization failed: %s", dlerror()));
 	    unload_gpm_library(sp);
 	} else {
diff --git a/ncurses/base/lib_screen.c b/ncurses/base/lib_screen.c
index 5bc52348..79d6cce3 100644
--- a/ncurses/base/lib_screen.c
+++ b/ncurses/base/lib_screen.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -41,7 +41,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_screen.c,v 1.85 2016/09/10 18:38:36 tom Exp $")
+MODULE_ID("$Id: lib_screen.c,v 1.86 2017/04/23 15:07:27 tom Exp $")
 
 #define MAX_SIZE 0x3fff		/* 16k is big enough for a window or pad */
 
@@ -61,7 +61,7 @@ MODULE_ID("$Id: lib_screen.c,v 1.85 2016/09/10 18:38:36 tom Exp $")
 #define TOP_SLIMIT _nc_SLIMIT(sizeof(buffer))
 
 /*
- * Use 0x8888 as the magic number for new-format files, since it cannot be
+ * Use 0x888888 as the magic number for new-format files, since it cannot be
  * mistaken for the _cury/_curx pair of 16-bit numbers which start the old
  * format.  It happens to be unused in the file 5.22 database (2015/03/07).
  */
diff --git a/ncurses/modules b/ncurses/modules
index 117aed98..2efa2996 100644
--- a/ncurses/modules
+++ b/ncurses/modules
@@ -1,4 +1,4 @@
-# $Id: modules,v 1.121 2017/03/01 01:58:12 tom Exp $
+# $Id: modules,v 1.122 2017/04/29 20:23:50 tom Exp $
 ##############################################################################
 # Copyright (c) 1998-2013,2017 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -125,7 +125,7 @@ lib_freeall	lib		$(base)		$(HEADER_DEPS)	$(INCDIR)/tic.h
 charable	lib		$(wide)		$(HEADER_DEPS)
 lib_add_wch	lib		$(wide)		$(HEADER_DEPS)
 lib_box_set	lib		$(wide)		$(HEADER_DEPS)
-lib_cchar	lib		$(wide)		$(HEADER_DEPS)
+lib_cchar	lib		$(wide)		$(HEADER_DEPS)	$(srcdir)/new_pair.h
 lib_erasewchar	lib		$(wide)		$(HEADER_DEPS)
 lib_get_wch	lib		$(wide)		$(HEADER_DEPS)
 lib_get_wstr	lib		$(wide)		$(HEADER_DEPS)
diff --git a/ncurses/new_pair.h b/ncurses/new_pair.h
index 4df40c6f..e34b4bed 100644
--- a/ncurses/new_pair.h
+++ b/ncurses/new_pair.h
@@ -33,7 +33,7 @@
 /*
  * Common type definitions and macros for new_pair.c, lib_color.c
  *
- * $Id: new_pair.h,v 1.5 2017/04/02 14:46:34 tom Exp $
+ * $Id: new_pair.h,v 1.6 2017/04/29 20:25:29 tom Exp $
  */
 
 #ifndef NEW_PAIR_H
@@ -42,7 +42,12 @@
 
 #define USE_NEW_PAIR NCURSES_EXT_COLORS
 
-#define LIMIT_TYPED(n,t) (t)(((t)(n) < 0) ? MAX_OF_TYPE(t) : (n))
+#define LIMIT_TYPED(n,t) \
+	(t)(((n) > MAX_OF_TYPE(t)) \
+	    ? MAX_OF_TYPE(t) \
+	    : ((n) < -MAX_OF_TYPE(t)) \
+	       ? -MAX_OF_TYPE(t) \
+	       : (n))
 
 #define limit_COLOR(n) LIMIT_TYPED(n,NCURSES_COLOR_T)
 #define limit_PAIRS(n) LIMIT_TYPED(n,NCURSES_PAIRS_T)
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index 1b77010d..5e496671 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170422) unstable; urgency=low
+ncurses6 (6.0+20170429) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 16 Apr 2017 06:19:41 -0400
+ -- Thomas E. Dickey   Sun, 23 Apr 2017 10:51:25 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index 1b77010d..5e496671 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170422) unstable; urgency=low
+ncurses6 (6.0+20170429) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 16 Apr 2017 06:19:41 -0400
+ -- Thomas E. Dickey   Sun, 23 Apr 2017 10:51:25 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian/changelog b/package/debian/changelog
index be0dd268..d0a84961 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20170422) unstable; urgency=low
+ncurses6 (6.0+20170429) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 16 Apr 2017 06:19:41 -0400
+ -- Thomas E. Dickey   Sun, 23 Apr 2017 10:51:25 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index 2b0bdcef..550aa64c 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.208 2017/04/16 10:19:41 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.209 2017/04/23 14:51:25 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  "2017"
-!define VERSION_MMDD  "0422"
+!define VERSION_MMDD  "0429"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index c2e3512f..ff86202f 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: 20170422
+Release: 20170429
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 5084dbc1..2b88c395 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: 20170422
+Release: 20170429
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/test/inch_wide.c b/test/inch_wide.c
index 82e95f80..27edc8f8 100644
--- a/test/inch_wide.c
+++ b/test/inch_wide.c
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: inch_wide.c,v 1.8 2017/04/15 18:52:39 tom Exp $
+ * $Id: inch_wide.c,v 1.9 2017/04/29 22:03:21 tom Exp $
  */
 /*
        int in_wch(cchar_t *wcval);
@@ -68,6 +68,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
 	" ESC/^Q                   - quit",
 	" h,j,k,l (and arrow-keys) - move viewport",
 	" w                        - recur to new window",
+	"                            for next input file",
 	0
     };
 
@@ -266,7 +267,7 @@ main(int argc, char *argv[])
     setlocale(LC_ALL, "");
 
     if (argc < 2) {
-	fprintf(stderr, "usage: %s file\n", argv[0]);
+	fprintf(stderr, "usage: %s file1 [file2 [...]]\n", argv[0]);
 	return EXIT_FAILURE;
     }
 
diff --git a/test/inchs.c b/test/inchs.c
index 55ab8bab..2e05ccbc 100644
--- a/test/inchs.c
+++ b/test/inchs.c
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: inchs.c,v 1.13 2017/04/15 18:52:10 tom Exp $
+ * $Id: inchs.c,v 1.14 2017/04/29 22:03:26 tom Exp $
  *
  * Author: Thomas E Dickey
  */
@@ -78,6 +78,7 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
 	" ESC/^Q                   - quit",
 	" h,j,k,l (and arrow-keys) - move viewport",
 	" w                        - recur to new window",
+	"                            for next input file",
 	0
     };
     WINDOW *txtbox = 0;
@@ -278,7 +279,7 @@ main(int argc, char *argv[])
     setlocale(LC_ALL, "");
 
     if (argc < 2) {
-	fprintf(stderr, "usage: %s file\n", argv[0]);
+	fprintf(stderr, "usage: %s file1 [file2 [...]]\n", argv[0]);
 	return EXIT_FAILURE;
     }
 
diff --git a/test/rain.c b/test/rain.c
index f5ec33ac..f3f7aa49 100644
--- a/test/rain.c
+++ b/test/rain.c
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: rain.c,v 1.42 2017/04/15 19:32:33 tom Exp $
+ * $Id: rain.c,v 1.43 2017/04/30 01:08:14 tom Exp $
  */
 #include 
 #include 
@@ -387,6 +387,8 @@ main(int argc GCC_UNUSED,
 	case HELP_KEY_1:
 	    popup_msg(stdscr, help);
 	    break;
+	case ERR:
+	    break;
 	default:
 	    beep();
 	}