From f6b436c4fb50275df43ea10ba9c744fe195a327d Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 25 Sep 2021 22:18:46 +0000 Subject: [PATCH] ncurses 6.2 - patch 20210925 + add kbeg to xterm+keypad to accommodate termcap applications -TD + add smglp and smgrp to vt420+lrmm, to provide useful data for the "tabs" +m option -TD + build-fix for gcc 3.4.3 with Solaris10, which does not allow forward reference of anonymous struct typedef. + modify tput to allow multiple commands per line. + minor fixes for tset manpage. --- NEWS | 11 ++++- VERSION | 2 +- dist.mk | 4 +- doc/html/man/adacurses6-config.1.html | 2 +- doc/html/man/captoinfo.1m.html | 2 +- doc/html/man/clear.1.html | 2 +- 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/ncurses6-config.1.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 | 69 +++++++++++++++------------ doc/html/man/tset.1.html | 16 ++++--- include/MKterm.h.awk.in | 11 +++-- include/curses.h.in | 9 +++- man/tput.1 | 12 ++++- man/tset.1 | 10 ++-- misc/terminfo.src | 43 ++++++++++++----- ncurses/base/MKlib_gen.sh | 3 +- ncurses/curses.priv.h | 8 ++-- ncurses/new_pair.h | 6 ++- ncurses/term.priv.h | 8 +--- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- progs/toe.c | 6 ++- progs/tput.c | 69 +++++++++++++++++++-------- 37 files changed, 213 insertions(+), 124 deletions(-) diff --git a/NEWS b/NEWS index 6da78c94..989bf236 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3708 2021/09/11 23:45:11 tom Exp $ +-- $Id: NEWS,v 1.3712 2021/09/24 19:45:04 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,15 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20210925 + + add kbeg to xterm+keypad to accommodate termcap applications -TD + + add smglp and smgrp to vt420+lrmm, to provide useful data for the + "tabs" +m option -TD + + build-fix for gcc 3.4.3 with Solaris10, which does not allow forward + reference of anonymous struct typedef. + + modify tput to allow multiple commands per line. + + minor fixes for tset manpage. + 20210911 + adjust ifdef in test_opaque.c to fix build with ncurses 5.7 + add testing note for xterm-{hp|sco|sun} -TD diff --git a/VERSION b/VERSION index 5a3f4a41..5280c093 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20210911 +5:0:10 6.2 20210925 diff --git a/dist.mk b/dist.mk index 8dd1217f..951cf83e 100644 --- a/dist.mk +++ b/dist.mk @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1435 2021/09/11 10:58:38 tom Exp $ +# $Id: dist.mk,v 1.1437 2021/09/25 10:32:30 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -38,7 +38,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 2 -NCURSES_PATCH = 20210911 +NCURSES_PATCH = 20210925 # 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 5c55394f..896a37dc 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -126,7 +126,7 @@

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index be6529ae..6c62295d 100644
--- a/doc/html/man/captoinfo.1m.html
+++ b/doc/html/man/captoinfo.1m.html
@@ -199,7 +199,7 @@
 

SEE ALSO

        infocmp(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index e33f99d3..bb222f91 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -150,7 +150,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
index 71187338..907b12a5 100644
--- a/doc/html/man/form.3x.html
+++ b/doc/html/man/form.3x.html
@@ -248,7 +248,7 @@
        curses(3x) and related pages whose names  begin  "form_"  for  detailed
        descriptions of the entry points.
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
index 3ea177c4..18573a0d 100644
--- a/doc/html/man/infocmp.1m.html
+++ b/doc/html/man/infocmp.1m.html
@@ -514,7 +514,7 @@
 
        https://invisible-island.net/ncurses/tctest.html
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 

AUTHOR

diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
index fcfc4a68..66c53844 100644
--- a/doc/html/man/infotocap.1m.html
+++ b/doc/html/man/infotocap.1m.html
@@ -91,7 +91,7 @@
 

SEE ALSO

        infocmp(1m), tic(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 

AUTHOR

diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
index 43d05693..590b0cea 100644
--- a/doc/html/man/menu.3x.html
+++ b/doc/html/man/menu.3x.html
@@ -223,7 +223,7 @@
        curses(3x) and related pages whose names  begin  "menu_"  for  detailed
        descriptions of the entry points.
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
index 208269fd..6bfb8675 100644
--- a/doc/html/man/ncurses.3x.html
+++ b/doc/html/man/ncurses.3x.html
@@ -60,7 +60,7 @@
        method of updating  character  screens  with  reasonable  optimization.
        This  implementation  is  "new  curses"  (ncurses)  and is the approved
        replacement for 4.4BSD classic curses,  which  has  been  discontinued.
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
        The  ncurses  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
index 0ccec263..12273291 100644
--- a/doc/html/man/ncurses6-config.1.html
+++ b/doc/html/man/ncurses6-config.1.html
@@ -113,7 +113,7 @@
 

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
index 68c333d2..0f61e014 100644
--- a/doc/html/man/panel.3x.html
+++ b/doc/html/man/panel.3x.html
@@ -281,7 +281,7 @@
 

SEE ALSO

        curses(3x), curs_variables(3x),
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 

AUTHOR

diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
index fe7bea60..dc5cf413 100644
--- a/doc/html/man/tabs.1.html
+++ b/doc/html/man/tabs.1.html
@@ -207,7 +207,7 @@
 

SEE ALSO

        infocmp(1m), tset(1), curses(3x), terminfo(5).
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index 27fb326a..540e7060 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -106,7 +106,7 @@
        have, by specifying how to perform screen operations, and by specifying
        padding requirements and initialization sequences.
 
-       This manual describes ncurses version 6.2 (patch 20210904).
+       This manual describes ncurses version 6.2 (patch 20210925).
 
 
 

Terminfo Entry Syntax

diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index 608cf0f0..39f1e664 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -461,7 +461,7 @@
        captoinfo(1m),   infocmp(1m),   infotocap(1m),   toe(1m),   curses(3x),
        term(5).  terminfo(5).  user_caps(5).
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 

AUTHOR

diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index bb79ece5..70f0340b 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -171,7 +171,7 @@
        captoinfo(1m),   infocmp(1m),   infotocap(1m),   tic(1m),   curses(3x),
        terminfo(5).
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index 504a66e4..00b0e006 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tput.1,v 1.70 2021/09/04 19:02:50 tom Exp @
+  * @Id: tput.1,v 1.71 2021/09/19 00:34:23 tom Exp @
 -->
 
 
@@ -374,7 +374,7 @@
        ---------------------------------------------------------------------
        0           (capname  is a numeric variable that is not specified in
                    the terminfo(5) database for this  terminal  type,  e.g.
-                   tput -T450 lines and tput -T2621 xmc)
+                   tput -T450 lines and tput -Thp2621 xmc)
        1           no error message is printed, see the EXIT CODES section.
        2           usage error
        3           unknown terminal type or no terminfo database
@@ -458,76 +458,83 @@
            for the standard capname operands, and an internal library function
            to analyze nonstandard capname operands.
 
+           Besides  providing  more  reliable operation than AT&T's utility, a
+           portability problem is introduced by  this  analysis.   An  OpenBSD
+           developer  adapted  the  internal  library function from ncurses to
+           allow tput to interpret multiple  commands  on  a  line.   Portable
+           applications should not rely upon this feature; ncurses provides it
+           to support applications written specifically for OpenBSD.
+
        This  implementation  (unlike  others)  can  accept  both  termcap  and
-       terminfo names for the capname feature, if termcap support is  compiled
-       in.   However,  the  predefined  termcap  and  terminfo  names have two
+       terminfo  names for the capname feature, if termcap support is compiled
+       in.  However, the  predefined  termcap  and  terminfo  names  have  two
        ambiguities in this case (and the terminfo name is assumed):
 
-       o   The termcap name dl corresponds to the terminfo  name  dl1  (delete
+       o   The  termcap  name  dl corresponds to the terminfo name dl1 (delete
            one line).
-           The  terminfo  name dl corresponds to the termcap name DL (delete a
+           The terminfo name dl corresponds to the termcap name DL  (delete  a
            given number of lines).
 
-       o   The termcap name ed corresponds to  the  terminfo  name  rmdc  (end
+       o   The  termcap  name  ed  corresponds  to the terminfo name rmdc (end
            delete mode).
-           The  terminfo  name ed corresponds to the termcap name cd (clear to
+           The terminfo name ed corresponds to the termcap name cd  (clear  to
            end of screen).
 
-       The longname and -S options, and  the  parameter-substitution  features
-       used  in  the  cup  example,  were  not  supported in BSD curses before
+       The  longname  and  -S options, and the parameter-substitution features
+       used in the cup example,  were  not  supported  in  BSD  curses  before
        4.3reno (1989) or in AT&T/USL curses before SVr4 (1988).
 
-       IEEE  Std  1003.1/The  Open  Group    Base   Specifications   Issue   7
-       (POSIX.1-2008)  documents  only the operands for clear, init and reset.
+       IEEE   Std   1003.1/The   Open   Group   Base  Specifications  Issue  7
+       (POSIX.1-2008) documents only the operands for clear, init  and  reset.
        There are a few interesting observations to make regarding that:
 
-       o   In this implementation, clear is part of the capname support.   The
-           others   (init   and   longname)  do  not  correspond  to  terminal
+       o   In  this implementation, clear is part of the capname support.  The
+           others  (init  and  longname)  do  not   correspond   to   terminal
            capabilities.
 
        o   Other  implementations  of  tput  on  SVr4-based  systems  such  as
-           Solaris,  IRIX64  and  HPUX as well as others such as AIX and Tru64
+           Solaris, IRIX64 and HPUX as well as others such as  AIX  and  Tru64
            provide support for capname operands.
 
        o   A few platforms such as FreeBSD recognize termcap names rather than
            terminfo capability names in their respective tput commands.  Since
-           2010, NetBSD's tput uses terminfo names.   Before  that,  it  (like
+           2010,  NetBSD's  tput  uses  terminfo names.  Before that, it (like
            FreeBSD) recognized termcap names.
 
-           Beginning  in  2021,  FreeBSD uses the ncurses tput, configured for
+           Beginning in 2021, FreeBSD uses the ncurses  tput,  configured  for
            both terminfo (tested first) and termcap (as a fallback).
 
        Because (apparently) all of the certified Unix systems support the full
-       set  of  capability names, the reasoning for documenting only a few may
+       set of capability names, the reasoning for documenting only a  few  may
        not be apparent.
 
-       o   X/Open Curses Issue 7 documents tput differently, with capname  and
+       o   X/Open  Curses Issue 7 documents tput differently, with capname and
            the other features used in this implementation.
 
-       o   That  is,  there  are  two standards for tput: POSIX (a subset) and
-           X/Open Curses (the full implementation).  POSIX documents a  subset
-           to  avoid  the  complication  of  including  X/Open  Curses and the
+       o   That is, there are two standards for tput:  POSIX  (a  subset)  and
+           X/Open  Curses (the full implementation).  POSIX documents a subset
+           to avoid the  complication  of  including  X/Open  Curses  and  the
            terminal capabilities database.
 
-       o   While it is certainly possible to  write  a  tput  program  without
-           using   curses,   none   of   the   systems  which  have  a  curses
-           implementation provide a tput utility which does  not  provide  the
+       o   While  it  is  certainly  possible  to write a tput program without
+           using  curses,  none  of  the   systems   which   have   a   curses
+           implementation  provide  a  tput utility which does not provide the
            capname feature.
 
        X/Open  Curses  Issue  7  (2009)  is  the  first  version  to  document
        utilities.  However that part of X/Open Curses does not follow existing
        practice (i.e., Unix features documented in SVID 3):
 
-       o   It  assigns exit code 4 to "invalid operand", which may be the same
-           as unknown capability.  For instance, the source code for  Solaris'
+       o   It assigns exit code 4 to "invalid operand", which may be the  same
+           as  unknown capability.  For instance, the source code for Solaris'
            xcurses uses the term "invalid" in this case.
 
-       o   It  assigns  exit  code  255  to  a  numeric  variable  that is not
+       o   It assigns exit  code  255  to  a  numeric  variable  that  is  not
            specified in the terminfo database.  That likely is a documentation
-           error,  confusing  the  -1  written  to  the standard output for an
+           error, confusing the -1 written  to  the  standard  output  for  an
            absent or cancelled numeric value versus an (unsigned) exit code.
 
-       The various Unix systems (AIX, HPUX, Solaris) use the  same  exit-codes
+       The  various  Unix systems (AIX, HPUX, Solaris) use the same exit-codes
        as ncurses.
 
        NetBSD curses documents different exit codes which do not correspond to
@@ -537,7 +544,7 @@
 

SEE ALSO

        clear(1), stty(1), tabs(1), tset(1), curs_termcap(3x), terminfo(5).
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index 4d3d0338..ed9dc11c 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tset.1,v 1.57 2021/07/10 22:50:45 tom Exp @
+  * @Id: tset.1,v 1.58 2021/09/18 21:21:55 tom Exp @
 -->
 
 
@@ -154,16 +154,20 @@
 
        -c   Set control characters and modes.
 
-       -e   Set the erase character to ch.
+       -e ch
+            Set the erase character to ch.
 
        -I   Do  not  send  the  terminal  or tab initialization strings to the
             terminal.
 
-       -i   Set the interrupt character to ch.
+       -i ch
+            Set the interrupt character to ch.
 
-       -k   Set the line kill character to ch.
+       -k ch
+            Set the line kill character to ch.
 
-       -m   Specify a mapping from a port type to a terminal.  See the section
+       -m mapping
+            Specify a mapping from a port type to a terminal.  See the section
             TERMINAL TYPE MAPPING for more information.
 
        -Q   Do  not  display any values for the erase, interrupt and line kill
@@ -385,7 +389,7 @@
        csh(1),   sh(1),   stty(1),   curs_terminfo(3x),  tty(4),  terminfo(5),
        ttys(5), environ(7)
 
-       This describes ncurses version 6.2 (patch 20210904).
+       This describes ncurses version 6.2 (patch 20210925).
 
 
 
diff --git a/include/MKterm.h.awk.in b/include/MKterm.h.awk.in
index b72136d8..e79840d9 100644
--- a/include/MKterm.h.awk.in
+++ b/include/MKterm.h.awk.in
@@ -60,7 +60,7 @@ BEGIN {
 	print  "/*    and: Thomas E. Dickey                        1995-on                  */"
 	print  "/****************************************************************************/"
 	print  ""
-	print  "/* $Id: MKterm.h.awk.in,v 1.81 2021/08/18 20:52:42 tom Exp $ */"
+	print  "/* $Id: MKterm.h.awk.in,v 1.82 2021/09/24 17:02:46 tom Exp $ */"
 	print  ""
 	print  "/*"
 	print  "**	term.h -- Definition of struct term"
@@ -250,13 +250,16 @@ END {
 	print  " */"
 	print  "#ifdef NCURSES_INTERNALS"
 	print  ""
+	print  "#undef TERMINAL"
+	print  "#define TERMINAL struct term"
+	print  "TERMINAL;"
+	print  ""
 	if (@NCURSES_EXT_COLORS@) {
 	declare_termtype("int","2");
 	} else {
-	print  "typedef TERMTYPE TERMTYPE2;"
+	print  "#undef TERMTYPE2"
+	print  "#define TERMTYPE2 TERMTYPE"
 	}
-	print  ""
-	print  "typedef struct term TERMINAL;"
 	print  "#else"
 	print  ""
 	print  "typedef struct term {		/* describe an actual terminal */"
diff --git a/include/curses.h.in b/include/curses.h.in
index 3bf96952..6acf2d03 100644
--- a/include/curses.h.in
+++ b/include/curses.h.in
@@ -33,7 +33,7 @@
  *     and: Thomas E. Dickey                        1996-on                 *
  ****************************************************************************/
 
-/* $Id: curses.h.in,v 1.276 2021/08/29 09:30:34 tom Exp $ */
+/* $Id: curses.h.in,v 1.277 2021/09/24 16:07:37 tom Exp $ */
 
 #ifndef __NCURSES_H
 #define __NCURSES_H
@@ -431,7 +431,14 @@ extern NCURSES_EXPORT_VAR(chtype) acs_map[];
  */
 #define _NEWINDEX	-1
 
+#ifdef NCURSES_INTERNALS
+#undef SCREEN
+#define SCREEN struct screen
+SCREEN;
+#else
 typedef struct screen  SCREEN;
+#endif
+
 typedef struct _win_st WINDOW;
 
 typedef	chtype	attr_t;		/* ...must be at least as wide as chtype */
diff --git a/man/tput.1 b/man/tput.1
index f02ec533..50a7cd6c 100644
--- a/man/tput.1
+++ b/man/tput.1
@@ -28,7 +28,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tput.1,v 1.70 2021/09/04 19:02:50 tom Exp $
+.\" $Id: tput.1,v 1.71 2021/09/19 00:34:23 tom Exp $
 .TH @TPUT@ 1 ""
 .ds d @TERMINFO@
 .ds n 1
@@ -423,7 +423,7 @@ exit code	error message
 \fB0\fR	T{
 (\fIcapname\fR is a numeric variable that is not specified in the
 \fBterminfo\fR(5) database for this terminal type, e.g.
-\fB@TPUT@ \-T450 lines\fR and \fB@TPUT@ \-T2621 xmc\fR)
+\fB@TPUT@ \-T450 lines\fR and \fB@TPUT@ \-Thp2621 xmc\fR)
 T}
 \fB1\fR	no error message is printed, see the \fBEXIT CODES\fR section.
 \fB2\fR	usage error
@@ -516,6 +516,14 @@ requiring \fB@TPUT@\fP to know which type to use.
 This implementation uses a table to determine the parameter types for
 the standard \fIcapname\fR operands, and an internal library
 function to analyze nonstandard \fIcapname\fR operands.
+.IP
+Besides providing more reliable operation than AT&T's utility,
+a portability problem is introduced by this analysis.
+An OpenBSD developer adapted the internal library function from ncurses
+to allow \fBtput\fP to interpret multiple commands on a line.
+Portable applications should not rely upon this feature;
+ncurses provides it to support applications written
+specifically for OpenBSD.
 .PP
 This implementation (unlike others) can accept both \fItermcap\fP
 and \fIterminfo\fP names for the \fIcapname\fP feature,
diff --git a/man/tset.1 b/man/tset.1
index faf1c4eb..063f5066 100644
--- a/man/tset.1
+++ b/man/tset.1
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tset.1,v 1.57 2021/07/10 22:50:45 tom Exp $
+.\" $Id: tset.1,v 1.58 2021/09/18 21:21:55 tom Exp $
 .TH @TSET@ 1 ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -150,19 +150,19 @@ The options are as follows:
 .B \-c
 Set control characters and modes.
 .TP 5
-.B \-e
+.BI \-e\  ch
 Set the erase character to \fIch\fR.
 .TP
 .B \-I
 Do not send the terminal or tab initialization strings to the terminal.
 .TP
-.B \-i
+.BI \-i\  ch
 Set the interrupt character to \fIch\fR.
 .TP
-.B \-k
+.BI \-k\  ch
 Set the line kill character to \fIch\fR.
 .TP
-.B \-m
+.BI \-m\  mapping
 Specify a mapping from a port type to a terminal.
 See the section
 .B TERMINAL TYPE MAPPING
diff --git a/misc/terminfo.src b/misc/terminfo.src
index a0bb89ec..bddbf107 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.916 $
-#	$Date: 2021/09/11 23:22:59 $
+#	$Revision: 1.918 $
+#	$Date: 2021/09/21 08:18:36 $
 #
 # 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
@@ -2837,7 +2837,9 @@ vt340|dec-vt340|vt330|dec-vt330|dec vt340 graphics terminal with 24 line page,
 
 # Left/right margins are supported in xterm since patch #279 (2012/05/10)
 vt420+lrmm|VT420 left/right margins,
-	mgc=\E[?69l, smglr=\E[?69h\E[%i%p1%d;%p2%ds,
+	mgc=\E[?69l, smglp=\E[?69h\E[%i%p1%ds,
+	smglr=\E[?69h\E[%i%p1%d;%p2%ds,
+	smgrp=\E[?69h\E[%i;%p1%ds,
 
 # DEC doesn't supply a vt400 description, so we add Daniel Glasser's
 # (originally written with vt420 as its primary name, and usable for it).
@@ -5033,22 +5035,34 @@ xterm+alt+title|xterm 90 and 251 features combined,
 #  | NumLock |    /    |    *    |    -    |
 #  |         |   $Oo   |   $Oj   |   $OS   |
 #  |_________|__kpDIV__|__kpMUL__|__kpSUB__|
-#  |    7         8         9    |         |
-#  |   $Ow   |   $Ox   |   $Oy   |    +    |
-#  |_ka1__K1_|_________|_ka3__K3_|   $Ok   |
-#  |    4    |    5    |    6    |  kpADD  |
+#  |    7         8         9    |    +    |
+#  |   $Ow   |   $Ox   |   $Oy   |   $Ok   |
+#  |_ka1__K1_|_________|_ka3__K3_|  kpADD  |
+#  |    4    |    5    |    6    |         |
 #  |   $Ot   |   $Ou   |   $Ov   |         |
 #  |_________|_kb2__K2_|_________|_________|
 #  |    1    |    2    |    3    |         |
 #  |   $Oq   |   $Or   |   $Os   |         |
 #  |_kc1__K4_|_________|_kc3__K5_|  enter  |
-#  |         0         |   .     |   $OM   |
-#  |        $Op        |  $On    |         |
-#  |___________________|_________|_kent_@8_|
+#  |         0         |    .    |   $OM   |
+#  |        $Op        |   $On   |         |
+#  |_______kpZRO_______|__kpDOT__|_kent_@8_|
+#
+# ka2, kb1, kb3 and kc2 are extensions, as are the mixed-case names.
+# There are no termcap equivalents for these extensions.
+#
+# kpCMA (comma) is used here for the VT100 keypad, which xterm emulates with
+# shifted-keypad-plus, though normally that invokes a font-size change.
+#
+# Old versions of xterm, e.g., xterm-xfree86, documented \EOE as kb2, which
+# does not fit into this layout.  The extension kp5 fits, but is not visible
+# to termcap applications.  As an alternative, kbeg (which does have a termcap
+# equivalent) is provided.
 #
 xterm+keypad|xterm emulating VT100/VT220 numeric keypad,
-	kp5=\EOE, kpADD=\EOk, kpCMA=\EOl, kpDIV=\EOo, kpDOT=\EOn,
-	kpMUL=\EOj, kpSUB=\EOm, kpZRO=\EOp, use=vt220+keypad,
+	kbeg=\EOE, kp5=\EOE, kpADD=\EOk, kpCMA=\EOl, kpDIV=\EOo,
+	kpDOT=\EOn, kpMUL=\EOj, kpSUB=\EOm, kpZRO=\EOp,
+	use=vt220+keypad,
 #
 # Those chunks use the new-style (the xterm oldFunctionKeys resource is false).
 # Alternatively, the same scheme with old-style function keys as in xterm-r6
@@ -27232,4 +27246,9 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #	+ use hp+arrows in a few places -TD
 #	+ use hp+pfk-cr in a few places -TD
 #
+# 2021-09-21
+#	+ add kbeg to xterm+keypad to accommodate termcap applications -TD
+#	+ add smglp and smgrp to vt420+lrmm, to provide useful data for the
+#	  "tabs" +m option -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index b264eada..26e473b4 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -2,7 +2,7 @@
 #
 # MKlib_gen.sh -- generate sources from curses.h macro definitions
 #
-# ($Id: MKlib_gen.sh,v 1.69 2021/08/07 21:17:46 tom Exp $)
+# ($Id: MKlib_gen.sh,v 1.70 2021/09/24 19:23:20 tom Exp $)
 #
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
@@ -471,6 +471,7 @@ END		{
 					gsub(/[ \t]+/," ",value);
 					sub(/^[0-9a-zA-Z_]+ /,"",value);
 					sub(/^\* /,"",value);
+					gsub("struct [0-9a-zA-Z_]+ \*","",value);
 					gsub(/[0-9a-zA-Z_]+ \* /,"",value);
 					gsub(/ (const) /," ",value);
 					gsub(/ (int|short|attr_t|chtype|wchar_t|NCURSES_BOOL|NCURSES_OUTC|NCURSES_OUTC_sp|va_list) /," ",value);
diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
index c0d579fc..872d25af 100644
--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.645 2021/09/04 10:29:15 tom Exp $
+ * $Id: curses.priv.h,v 1.646 2021/09/24 16:09:35 tom Exp $
  *
  *	curses.priv.h
  *
@@ -899,8 +899,7 @@ typedef enum {
 /*
  * The SCREEN structure.
  */
-
-struct screen {
+typedef struct screen {
 	int		_ifd;		/* input file descriptor for screen */
 	int		_ofd;		/* output file descriptor for screen */
 	FILE		*_ofp;		/* output file ptr for screen	    */
@@ -1184,7 +1183,8 @@ struct screen {
 	const char	*_tputs_trace;
 #endif
 #endif
-};
+#undef SCREEN
+} SCREEN;
 
 extern NCURSES_EXPORT_VAR(SCREEN *) _nc_screen_chain;
 extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
diff --git a/ncurses/new_pair.h b/ncurses/new_pair.h
index bc031a70..49d7e8b8 100644
--- a/ncurses/new_pair.h
+++ b/ncurses/new_pair.h
@@ -34,7 +34,7 @@
 /*
  * Common type definitions and macros for new_pair.c, lib_color.c
  *
- * $Id: new_pair.h,v 1.12 2021/08/18 19:18:12 tom Exp $
+ * $Id: new_pair.h,v 1.13 2021/09/24 17:52:01 tom Exp $
  */
 
 #ifndef NEW_PAIR_H
@@ -46,7 +46,9 @@
 
 #include 
 
-typedef struct screen  SCREEN;
+#undef SCREEN
+#define SCREEN struct screen
+SCREEN;
 
 #define LIMIT_TYPED(n,t) \
 	(t)(((n) > MAX_OF_TYPE(t)) \
diff --git a/ncurses/term.priv.h b/ncurses/term.priv.h
index f31e9f58..85380ac3 100644
--- a/ncurses/term.priv.h
+++ b/ncurses/term.priv.h
@@ -27,7 +27,7 @@
  ****************************************************************************/
 
 /*
- * $Id: term.priv.h,v 1.4 2021/08/19 20:02:09 tom Exp $
+ * $Id: term.priv.h,v 1.5 2021/09/24 16:42:04 tom Exp $
  *
  *	term.priv.h
  *
@@ -102,11 +102,6 @@ typedef struct {
 /*
  * Internals for term.h
  */
-
-#if NCURSES_EXT_COLORS
-typedef struct termtype2  TERMTYPE2;
-#endif
-
 typedef struct term {			/* describe an actual terminal */
 	TERMTYPE	type;		/* terminal type description */
 	short		Filedes;	/* file description being written to */
@@ -118,6 +113,7 @@ typedef struct term {			/* describe an actual terminal */
 #if NCURSES_EXT_COLORS
 	TERMTYPE2	type2;		/* extended terminal type description */
 #endif
+#undef TERMINAL
 } TERMINAL;
 
 /*
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index 0e7cae88..42f5224a 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210911) unstable; urgency=low
+ncurses6 (6.2+20210925) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Fri, 10 Sep 2021 20:03:50 -0400
+ -- Thomas E. Dickey   Fri, 24 Sep 2021 15:17:49 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index 0e7cae88..42f5224a 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210911) unstable; urgency=low
+ncurses6 (6.2+20210925) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Fri, 10 Sep 2021 20:03:50 -0400
+ -- Thomas E. Dickey   Fri, 24 Sep 2021 15:17:49 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian/changelog b/package/debian/changelog
index 03f62299..b6df649b 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210911) unstable; urgency=low
+ncurses6 (6.2+20210925) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Fri, 10 Sep 2021 20:03:50 -0400
+ -- Thomas E. Dickey   Fri, 24 Sep 2021 15:17:49 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index a5eb84a4..043cd554 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.477 2021/09/11 10:58:38 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.479 2021/09/25 10:32:30 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "2"
 !define VERSION_YYYY  "2021"
-!define VERSION_MMDD  "0911"
+!define VERSION_MMDD  "0925"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index 3dbf413a..d771d4b3 100644
--- a/package/mingw-ncurses.spec
+++ b/package/mingw-ncurses.spec
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20210911
+Release: 20210925
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 98d052ed..b6755bfd 100644
--- a/package/ncurses.spec
+++ b/package/ncurses.spec
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20210911
+Release: 20210925
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncursest.spec b/package/ncursest.spec
index e0216f1d..dd527d26 100644
--- a/package/ncursest.spec
+++ b/package/ncursest.spec
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20210911
+Release: 20210925
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/progs/toe.c b/progs/toe.c
index 643038f6..60a76a22 100644
--- a/progs/toe.c
+++ b/progs/toe.c
@@ -45,7 +45,7 @@
 #include 
 #endif
 
-MODULE_ID("$Id: toe.c,v 1.82 2021/06/26 19:44:08 tom Exp $")
+MODULE_ID("$Id: toe.c,v 1.83 2021/09/21 20:07:51 tom Exp $")
 
 #define isDotname(name) (!strcmp(name, ".") || !strcmp(name, ".."))
 
@@ -245,7 +245,9 @@ make_db_name(char *dst, const char *src, unsigned limit)
 	    && !strcmp(src + size - lens, suffix)) {
 	    _nc_STRCPY(dst, src, PATH_MAX);
 	} else {
-	    _nc_SPRINTF(dst, _nc_SLIMIT(PATH_MAX) "%s%s", src, suffix);
+	    _nc_SPRINTF(dst, _nc_SLIMIT(PATH_MAX) "%.*s%s",
+			(int) (PATH_MAX - sizeof(suffix)),
+			src, suffix);
 	}
 	result = TRUE;
     }
diff --git a/progs/tput.c b/progs/tput.c
index fe82d472..ccc2f56d 100644
--- a/progs/tput.c
+++ b/progs/tput.c
@@ -47,7 +47,7 @@
 #include 
 #include 
 
-MODULE_ID("$Id: tput.c,v 1.91 2021/08/21 00:24:45 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.94 2021/09/19 00:06:44 tom Exp $")
 
 #define PUTS(s)		fputs(s, stdout)
 
@@ -136,7 +136,7 @@ exit_code(int token, int value)
  * Returns nonzero on error.
  */
 static int
-tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
+tput_cmd(int fd, TTY * settings, bool opt_x, int argc, char **argv, int *used)
 {
     NCURSES_CONST char *name;
     char *s;
@@ -146,6 +146,7 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
 #endif
 
     name = check_aliases(argv[0], FALSE);
+    *used = 1;
     if (is_reset || is_init) {
 	TTY oldmode;
 
@@ -155,7 +156,7 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
 
 	if (is_reset) {
 	    reset_start(stdout, TRUE, FALSE);
-	    reset_tty_settings(fd, saved_settings);
+	    reset_tty_settings(fd, settings);
 	} else {
 	    reset_start(stdout, FALSE, TRUE);
 	}
@@ -165,13 +166,13 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
 #else
 	(void) fd;
 #endif
-	set_control_chars(saved_settings, terasechar, intrchar, tkillchar);
-	set_conversions(saved_settings);
+	set_control_chars(settings, terasechar, intrchar, tkillchar);
+	set_conversions(settings);
 	if (send_init_strings(fd, &oldmode)) {
 	    reset_flush();
 	}
 
-	update_tty_settings(&oldmode, saved_settings);
+	update_tty_settings(&oldmode, settings);
 	return 0;
     }
 
@@ -217,7 +218,8 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
     } else if (VALID_STRING(s)) {
 	if (argc > 1) {
 	    int k;
-	    int ignored;
+	    int analyzed;
+	    int popcount;
 	    long numbers[1 + NUM_PARM];
 	    char *strings[1 + NUM_PARM];
 	    char *p_is_s[NUM_PARM];
@@ -254,14 +256,19 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
 	    }
 #endif
 
+	    popcount = 0;
+	    _nc_reset_tparm(NULL);
 	    switch (paramType) {
 	    case Num_Str:
 		s = TPARM_2(s, numbers[1], strings[2]);
+		analyzed = 2;
 		break;
 	    case Num_Str_Str:
 		s = TPARM_3(s, numbers[1], strings[2], strings[3]);
+		analyzed = 3;
 		break;
 	    case Numbers:
+		analyzed = _nc_tparm_analyze(NULL, s, p_is_s, &popcount);
 #define myParam(n) numbers[n]
 		s = TIPARM_9(s,
 			     myParam(1),
@@ -278,7 +285,7 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
 	    case Other:
 		/* FALLTHRU */
 	    default:
-		(void) _nc_tparm_analyze(NULL, s, p_is_s, &ignored);
+		analyzed = _nc_tparm_analyze(NULL, s, p_is_s, &popcount);
 #define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
 		s = TPARM_9(s,
 			    myParam(1),
@@ -293,6 +300,10 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
 #undef myParam
 		break;
 	    }
+	    if (analyzed < popcount) {
+		analyzed = popcount;
+	    }
+	    *used += analyzed;
 	}
 
 	/* use putp() in order to perform padding */
@@ -312,6 +323,7 @@ main(int argc, char **argv)
     char buf[BUFSIZ];
     int result = 0;
     int fd;
+    int used;
     TTY tty_settings;
     bool opt_x = FALSE;		/* clear scrollback if possible */
     bool is_alias;
@@ -372,34 +384,53 @@ main(int argc, char **argv)
 	quit(ErrTermType, "unknown terminal \"%s\"", term);
 
     if (cmdline) {
+	int code = 0;
 	if ((argc <= 0) && !is_alias)
 	    usage();
-	ExitProgram(tput_cmd(fd, &tty_settings, opt_x, argc, argv));
+	while (argc > 0) {
+	    code = tput_cmd(fd, &tty_settings, opt_x, argc, argv, &used);
+	    if (code != 0)
+		break;
+	    argc -= used;
+	    argv += used;
+	}
+	ExitProgram(code);
     }
 
     while (fgets(buf, sizeof(buf), stdin) != 0) {
-	char *argvec[16];	/* command, 9 parms, null, & slop */
+	size_t need = strlen(buf);
+	char **argvec = typeCalloc(char *, need + 1);
+	char **argnow;
 	int argnum = 0;
 	char *cp;
 
-	/* crack the argument list into a dope vector */
+	if (argvec == NULL) {
+	    quit(ErrSystem(1), strerror(errno));
+	}
+
+	/* split the buffer into tokens */
 	for (cp = buf; *cp; cp++) {
 	    if (isspace(UChar(*cp))) {
 		*cp = '\0';
-	    } else if (cp == buf || cp[-1] == 0) {
+	    } else if (cp == buf || cp[-1] == '\0') {
 		argvec[argnum++] = cp;
-		if (argnum >= (int) SIZEOF(argvec) - 1)
+		if (argnum >= (int) need)
 		    break;
 	    }
 	}
-	argvec[argnum] = 0;
 
-	if (argnum != 0
-	    && tput_cmd(fd, &tty_settings, opt_x, argnum, argvec) != 0) {
-	    if (result == 0)
-		result = ErrSystem(0);	/* will return value >4 */
-	    ++result;
+	argnow = argvec;
+	while (argnum > 0) {
+	    int code = tput_cmd(fd, &tty_settings, opt_x, argnum, argnow, &used);
+	    if (code != 0) {
+		if (result == 0)
+		    result = ErrSystem(0);	/* will return value >4 */
+		++result;
+	    }
+	    argnum -= used;
+	    argnow += used;
 	}
+	free(argvec);
     }
 
     ExitProgram(result);
-- 
2.44.0