]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.2 - patch 20210821
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 22 Aug 2021 00:41:36 +0000 (00:41 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 22 Aug 2021 00:41:36 +0000 (00:41 +0000)
+ improve tparm implementation of %P and %g, more closely matching
  SVr4 terminfo.
+ move internals of TERMINAL structure to new header term.priv.h
+ add "check" rule for ncurses/Makefile
+ corrected tsl capability for terminator -TD
+ add check in tic to report instances where tparm would detect an
  error in an expression (cf: 20201010).
+ correct a few places where SP->_pair_limit was used rather than
  SP->_pair_alloc (cf: 20170812).
+ fix missing "%d" for setaf/setab code 8-15 in xterm+direct16 (report
  by Florian Weimer) -TD
+ fix some documentation errata from OpenBSD changes.
+ update config.sub

79 files changed:
MANIFEST
NEWS
VERSION
announce.html.in
config.sub
dist.mk
doc/html/man/adacurses6-config.1.html
doc/html/man/captoinfo.1m.html
doc/html/man/clear.1.html
doc/html/man/form.3x.html
doc/html/man/infocmp.1m.html
doc/html/man/infotocap.1m.html
doc/html/man/legacy_coding.3x.html
doc/html/man/menu.3x.html
doc/html/man/ncurses.3x.html
doc/html/man/ncurses6-config.1.html
doc/html/man/panel.3x.html
doc/html/man/tabs.1.html
doc/html/man/term.5.html
doc/html/man/term.7.html
doc/html/man/terminfo.5.html
doc/html/man/tic.1m.html
doc/html/man/toe.1m.html
doc/html/man/tput.1.html
doc/html/man/tset.1.html
include/MKterm.h.awk.in
include/tic.h
man/infocmp.1m
man/legacy_coding.3x
man/term.5
man/term.7
man/terminfo.head
man/terminfo.tail
man/tic.1m
misc/terminfo.src
mk-1st.awk
ncurses/Makefile.in
ncurses/base/new_pair.c
ncurses/curses.priv.h
ncurses/llib-lncurses
ncurses/llib-lncursest
ncurses/llib-lncursestw
ncurses/llib-lncursesw
ncurses/llib-ltic
ncurses/llib-ltict
ncurses/llib-ltictw
ncurses/llib-lticw
ncurses/llib-ltinfo
ncurses/llib-ltinfot
ncurses/llib-ltinfotw
ncurses/llib-ltinfow
ncurses/new_pair.h
ncurses/report_offsets.c
ncurses/term.priv.h [new file with mode: 0644]
ncurses/tinfo/lib_data.c
ncurses/tinfo/lib_tparm.c
ncurses/tinfo/make_keys.c
ncurses/tinfo/write_entry.c
ncurses/tty/tty_update.c
ncurses/wcwidth.h
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.map
package/ncurses.spec
package/ncurses.sym
package/ncursest.map
package/ncursest.spec
package/ncursest.sym
package/ncursestw.map
package/ncursestw.sym
package/ncursesw.map
package/ncursesw.sym
progs/dump_entry.c
progs/tic.c
progs/tput.c
test/ditto.c

index 9407467f3c6cd1540a0f064445f8edc01652ade8..14296529e89d82cb4a359689010bf2a549f43a6e 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
 ./ncurses/new_pair.h
 ./ncurses/report_hashing.c
 ./ncurses/report_offsets.c
 ./ncurses/new_pair.h
 ./ncurses/report_hashing.c
 ./ncurses/report_offsets.c
+./ncurses/term.priv.h
 ./ncurses/tinfo/MKcaptab.awk
 ./ncurses/tinfo/MKcaptab.sh
 ./ncurses/tinfo/MKcodes.awk
 ./ncurses/tinfo/MKcaptab.awk
 ./ncurses/tinfo/MKcaptab.sh
 ./ncurses/tinfo/MKcodes.awk
diff --git a/NEWS b/NEWS
index 74274020612375efbd23b1b28ff5bb9c3f02134a..c7e80d8df209fa7ceebfa76acf14cf956ba1e4d9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3694 2021/08/14 15:01:03 tom Exp $
+-- $Id: NEWS,v 1.3698 2021/08/21 23:25:57 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -46,6 +46,21 @@ 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.
 
 Changes through 1.9.9e did not credit all contributions;
 it is not possible to add this information.
 
+20210821
+       + improve tparm implementation of %P and %g, more closely matching
+         SVr4 terminfo.
+       + move internals of TERMINAL structure to new header term.priv.h
+       + add "check" rule for ncurses/Makefile
+       + corrected tsl capability for terminator -TD
+       + add check in tic to report instances where tparm would detect an
+         error in an expression (cf: 20201010).
+       + correct a few places where SP->_pair_limit was used rather than
+         SP->_pair_alloc (cf: 20170812).
+       + fix missing "%d" for setaf/setab code 8-15 in xterm+direct16 (report
+         by Florian Weimer) -TD
+       + fix some documentation errata from OpenBSD changes.
+       + update config.sub
+
 20210814
        + add workaround for broken pcre2 package in Debian 10, from xterm #369.
 
 20210814
        + add workaround for broken pcre2 package in Debian 10, from xterm #369.
 
diff --git a/VERSION b/VERSION
index f9f2b0eed5caf6d3f3f1677707e7dff79b7fd4b6..7905a0585ae782bc5321d3f5507e1129162b6365 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20210814
+5:0:10 6.2     20210821
index 9651b06fd4f35cd1eb14dcf835c79ecd892e709c..24da9f52356f09497ee9f3d74c1e2303ce181436 100644 (file)
@@ -1,5 +1,5 @@
 <!--
 <!--
-  $Id: announce.html.in,v 1.100 2021/06/17 21:30:22 tom Exp $
+  $Id: announce.html.in,v 1.101 2021/08/15 20:02:52 tom Exp $
   ****************************************************************************
   * Copyright 2018-2020,2021 Thomas E. Dickey                                *
   *                                                                          *
   ****************************************************************************
   * Copyright 2018-2020,2021 Thomas E. Dickey                                *
   *                                                                          *
@@ -1605,7 +1605,7 @@ diff --git a/st.info b/st.info
       <p>The <span class="main-name">ncurses</span> utilities have
       options to allow you to filter terminfo entries for use with
       less capable <em>curses</em>/<em>terminfo</em> versions such
       <p>The <span class="main-name">ncurses</span> utilities have
       options to allow you to filter terminfo entries for use with
       less capable <em>curses</em>/<em>terminfo</em> versions such
-      as the HP/UX and AIX ports.</p>
+      as the HP-UX and AIX ports.</p>
     </li>
   </ul>
 
     </li>
   </ul>
 
index d80c5d759e48d7942ccbb665d8ae6d2c4dcaf397..d74fb6deac942a4e21f49fa752c3280e66c196a0 100755 (executable)
@@ -4,7 +4,7 @@
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
-timestamp='2021-07-03'
+timestamp='2021-08-14'
 
 # 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
 
 # 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
@@ -121,9 +121,11 @@ esac
 
 # Split fields of configuration type
 # shellcheck disable=SC2162
 
 # Split fields of configuration type
 # shellcheck disable=SC2162
+saved_IFS=$IFS
 IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
 IFS="-" read field1 field2 field3 field4 <<EOF
 $1
 EOF
+IFS=$saved_IFS
 
 # Separate into logical components for further validation
 case $1 in
 
 # Separate into logical components for further validation
 case $1 in
@@ -172,6 +174,10 @@ case $1 in
                                                basic_machine=$field1
                                                basic_os=$field2
                                                ;;
                                                basic_machine=$field1
                                                basic_os=$field2
                                                ;;
+                                       zephyr*)
+                                               basic_machine=$field1-unknown
+                                               basic_os=$field2
+                                               ;;
                                        # Manufacturers
                                        dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
                                        | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
                                        # Manufacturers
                                        dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
                                        | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
@@ -931,9 +937,11 @@ case $basic_machine in
 
        *-*)
                # shellcheck disable=SC2162
 
        *-*)
                # shellcheck disable=SC2162
+               saved_IFS=$IFS
                IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
                IFS="-" read cpu vendor <<EOF
 $basic_machine
 EOF
+               IFS=$saved_IFS
                ;;
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
                ;;
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
@@ -1313,9 +1321,11 @@ case $basic_os in
                ;;
        *-*)
                # shellcheck disable=SC2162
                ;;
        *-*)
                # shellcheck disable=SC2162
+               saved_IFS=$IFS
                IFS="-" read kernel os <<EOF
 $basic_os
 EOF
                IFS="-" read kernel os <<EOF
 $basic_os
 EOF
+               IFS=$saved_IFS
                ;;
        # Default OS when just kernel was specified
        nto*)
                ;;
        # Default OS when just kernel was specified
        nto*)
@@ -1697,7 +1707,7 @@ fi
 # Now, validate our (potentially fixed-up) OS.
 case $os in
        # Sometimes we do "kernel-libc", so those need to count as OSes.
 # Now, validate our (potentially fixed-up) OS.
 case $os in
        # Sometimes we do "kernel-libc", so those need to count as OSes.
-       musl* | newlib* | uclibc*)
+       musl* | newlib* | relibc* | uclibc*)
                ;;
        # Likewise for "kernel-abi"
        eabi* | gnueabi*)
                ;;
        # Likewise for "kernel-abi"
        eabi* | gnueabi*)
@@ -1738,7 +1748,7 @@ case $os in
             | skyos* | haiku* | rdos* | toppers* | drops* | es* \
             | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
             | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
             | skyos* | haiku* | rdos* | toppers* | drops* | es* \
             | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
             | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
-            | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*)
+            | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*)
                ;;
        # This one is extra strict with allowed versions
        sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
                ;;
        # This one is extra strict with allowed versions
        sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
@@ -1755,11 +1765,12 @@ esac
 # As a final step for OS-related things, validate the OS-kernel combination
 # (given a valid OS), if there is a kernel.
 case $kernel-$os in
 # As a final step for OS-related things, validate the OS-kernel combination
 # (given a valid OS), if there is a kernel.
 case $kernel-$os in
-       linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* )
+       linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+                  | linux-musl* | linux-relibc* | linux-uclibc* )
                ;;
        uclinux-uclibc* )
                ;;
                ;;
        uclinux-uclibc* )
                ;;
-       -dietlibc* | -newlib* | -musl* | -uclibc* )
+       -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
                # These are just libc implementations, not actual OSes, and thus
                # require a kernel.
                echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
                # These are just libc implementations, not actual OSes, and thus
                # require a kernel.
                echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
diff --git a/dist.mk b/dist.mk
index ccde78e5abd8b5cc4384ba6ccc1f887e84250fba..20fe3a5ac1aec18c84798afb8740e35575f9eb71 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -26,7 +26,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: dist.mk,v 1.1430 2021/08/14 10:38:41 tom Exp $
+# $Id: dist.mk,v 1.1431 2021/08/21 14:10:10 tom Exp $
 # Makefile for creating ncurses distributions.
 #
 # This only needs to be used directly as a makefile by developers, but
 # 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
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 2
-NCURSES_PATCH = 20210814
+NCURSES_PATCH = 20210821
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index f3c73ffc78881fc93218674fe860d8546c61b024..094f67e610390bd3754a9f0a257834f551c4a9dc 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index 7b12bee8e9c05ca4b2a37dececa416417fe22b6d..3d9aae2b6e1d04115a9143a3418a0cd2aa533698 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 8568ccbc3e84e6d71969e92dbb766a12e4d4ea80..9e35ed667e76354f989eb3195c24bb6b8121bde0 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index bd0fd0d7b7a47a80f115e78989160eb0317692a1..075cb2a6ffcdc11467987d42a5da51d103a79ac5 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "form_"  for  detailed
        descriptions of the entry points.
 
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "form_"  for  detailed
        descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index b3032b2754ae589a4a63cc8c9707056d0b2f6101..92a2a6e58e12d00cf444b4345b1b73906fe7981b 100644 (file)
@@ -28,7 +28,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: infocmp.1m,v 1.78 2021/06/17 21:30:22 tom Exp @
+  * @Id: infocmp.1m,v 1.79 2021/08/15 20:01:31 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 
        <STRONG>-R</STRONG><EM>subset</EM>
             Restrict output to a given subset.  This option is  for  use  with
 
        <STRONG>-R</STRONG><EM>subset</EM>
             Restrict output to a given subset.  This option is  for  use  with
-            archaic  versions of terminfo like those on SVr1, Ultrix, or HP/UX
+            archaic  versions of terminfo like those on SVr1, Ultrix, or HP-UX
             that do not support the full set of SVR4/XSI Curses terminfo;  and
             variants  such  as AIX that have their own extensions incompatible
             with SVr4/XSI.
             that do not support the full set of SVR4/XSI Curses terminfo;  and
             variants  such  as AIX that have their own extensions incompatible
             with SVr4/XSI.
 
        https://invisible-island.net/ncurses/tctest.html
 
 
        https://invisible-island.net/ncurses/tctest.html
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 7feb2027bcb61cdaa3b0cf7ba205bdca63560e78..328f9a499ff18694cfa41d68464c8a62361f51bd 100644 (file)
@@ -91,7 +91,7 @@
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 5a5a3f0e64d04b9b2f7fa00430c6aa718746f2fd..ef4cfa0449f4438b542b521a99615106a44e8754 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ****************************************************************************
 <!--
   ****************************************************************************
-  * Copyright 2020 Thomas E. Dickey                                          *
+  * Copyright 2020,2021 Thomas E. Dickey                                     *
   * Copyright 2005-2016,2017 Free Software Foundation, Inc.                  *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * Copyright 2005-2016,2017 Free Software Foundation, Inc.                  *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -28,7 +28,7 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey
-  * @Id: legacy_coding.3x,v 1.8 2020/10/17 23:40:23 tom Exp @
+  * @Id: legacy_coding.3x,v 1.9 2021/08/15 19:32:05 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
@@ -90,7 +90,7 @@
 
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
-       <STRONG>unctrl</STRONG>.
+       <STRONG><A HREF="unctrl.3x.html">unctrl(3x)</A></STRONG>.
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 02739bd3cb85be1a65ec1e13b8f3b6123fe2a132..f301005dba90263921a291d01373cf9545be32b1 100644 (file)
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "menu_"  for  detailed
        descriptions of the entry points.
 
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names  begin  "menu_"  for  detailed
        descriptions of the entry points.
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index e6211175959a63816e79deb9e9fb0e04d123ff12..163279b5aa9297c492bd172e1ed758d8f8a7d3fe 100644 (file)
@@ -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.
        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 <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
        The  <STRONG>ncurses</STRONG>  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
 
        The  <STRONG>ncurses</STRONG>  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
index b99dc4417d0ed544097edb7ca741197ea340e180..d3a0a86fad51436138d74dbe11e01ef4383368ec 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index 05c06a11bef679de8ed1ad0cc642777edc23aea2..909efbfb0efc25d5b8d3ec08f3508a6361c81637 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 784a97bcc2cf83fa43b1efd7706779c419d5ce5a..bbd29aaa977b04bb877e5fcce535aa796001dc37 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index c2bf0eb8f570a1ef7c4bda6028afd07e62a5d978..941c2d82ca093dda56ede0bc05ccab5303ff82c8 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ****************************************************************************
 <!--
   ****************************************************************************
-  * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+  * Copyright 2018-2020,2021 Thomas E. Dickey                                *
   * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: term.5,v 1.38 2020/07/25 21:56:02 tom Exp @
+  * @Id: term.5,v 1.40 2021/08/15 19:38:47 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 </PRE><H3><a name="h3-setupterm">setupterm</a></H3><PRE>
        Note  that  it  is  possible for <STRONG>setupterm</STRONG> to expect a different set of
        capabilities than  are  actually  present  in  the  file.   Either  the
 </PRE><H3><a name="h3-setupterm">setupterm</a></H3><PRE>
        Note  that  it  is  possible for <STRONG>setupterm</STRONG> to expect a different set of
        capabilities than  are  actually  present  in  the  file.   Either  the
-       database  may  have  been  updated  since <STRONG>setupterm</STRONG> has been recompiled
+       database   may   have  been  updated  since  <STRONG>setupterm</STRONG>  was  recompiled
        (resulting in extra unrecognized entries in the file)  or  the  program
        may  have  been  recompiled more recently than the database was updated
        (resulting in missing entries).  The routine <STRONG>setupterm</STRONG> must be prepared
        (resulting in extra unrecognized entries in the file)  or  the  program
        may  have  been  recompiled more recently than the database was updated
        (resulting in missing entries).  The routine <STRONG>setupterm</STRONG> must be prepared
 
 
 </PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
-       /usr/share/terminfo/*/*  compiled terminal capability data base
+       /usr/share/terminfo/*/*  compiled terminal capability database
 
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
index 8bb02199761cd6d419c8b86d0be6d4fd58a8c07b..e9d3512d569364c9ca080289bd515fb79472ef18 100644 (file)
@@ -1,6 +1,6 @@
 <!--
   ****************************************************************************
 <!--
   ****************************************************************************
-  * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+  * Copyright 2018-2020,2021 Thomas E. Dickey                                *
   * Copyright 1998-2011,2017 Free Software Foundation, Inc.                  *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
   * Copyright 1998-2011,2017 Free Software Foundation, Inc.                  *
   *                                                                          *
   * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: term.7,v 1.28 2020/02/02 23:34:34 tom Exp @
+  * @Id: term.7,v 1.30 2021/08/15 19:39:57 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
@@ -72,7 +72,7 @@
        termcap  entry  for  your  type  is not compatible with yours, but this
        situation is rare and  can  almost  always  be  avoided  by  explicitly
        exporting  "vt100"  (assuming  you  are  in fact using a VT100-superset
        termcap  entry  for  your  type  is not compatible with yours, but this
        situation is rare and  can  almost  always  be  avoided  by  explicitly
        exporting  "vt100"  (assuming  you  are  in fact using a VT100-superset
-       console, terminal, or terminal emulator.)
+       console, terminal, or terminal emulator).
 
        In any case, you are free to override the system <STRONG>TERM</STRONG> setting  to  your
        taste in your shell profile.  The <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG> utility may be of assistance;
 
        In any case, you are free to override the system <STRONG>TERM</STRONG> setting  to  your
        taste in your shell profile.  The <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG> utility may be of assistance;
 
 </PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
        /usr/share/terminfo/?/*
 
 </PRE><H2><a name="h2-FILES">FILES</a></H2><PRE>
        /usr/share/terminfo/?/*
-            compiled terminal capability data base
+            compiled terminal capability database
 
        /etc/inittab
             tty line initialization (AT&amp;T-like UNIXes)
 
        /etc/inittab
             tty line initialization (AT&amp;T-like UNIXes)
index 953d01ed686bbaf7077d0f6b9accdc23cab7ebd3..16bd0c351437888baa4b854c54ba2117f05f6de4 100644 (file)
@@ -32,7 +32,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: terminfo.head,v 1.40 2021/06/17 21:30:22 tom Exp @
+  * @Id: terminfo.head,v 1.41 2021/08/15 19:32:53 tom Exp @
   * Head of terminfo man page ends here
   ****************************************************************************
   * Copyright 2018-2020,2021 Thomas E. Dickey                                *
   * Head of terminfo man page ends here
   ****************************************************************************
   * Copyright 2018-2020,2021 Thomas E. Dickey                                *
@@ -62,7 +62,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: terminfo.tail,v 1.101 2021/06/17 21:30:22 tom Exp @
+  * @Id: terminfo.tail,v 1.102 2021/08/21 22:55:23 tom Exp @
   *.in -2
   *.in +2
   *.in -2
   *.in -2
   *.in +2
   *.in -2
@@ -87,7 +87,7 @@
 
 
 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-NAME">NAME</a></H2><PRE>
-       terminfo - terminal capability data base
+       terminfo - terminal capability database
 
 
 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-SYNOPSIS">SYNOPSIS</a></H2><PRE>
@@ -95,7 +95,7 @@
 
 
 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
-       <EM>Terminfo</EM>  is  a data base describing terminals, used by screen-oriented
+       <EM>Terminfo</EM>  is  a  database describing terminals, used by screen-oriented
        programs  such  as  <STRONG>nvi(1)</STRONG>,  <STRONG>lynx(1)</STRONG>,   <STRONG>mutt(1)</STRONG>,   and   other   curses
        applications,  using  high-level calls to libraries such as <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
        It is also used via low-level calls by  non-curses  applications  which
        programs  such  as  <STRONG>nvi(1)</STRONG>,  <STRONG>lynx(1)</STRONG>,   <STRONG>mutt(1)</STRONG>,   and   other   curses
        applications,  using  high-level calls to libraries such as <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>.
        It is also used via low-level calls by  non-curses  applications  which
        have, by specifying how to perform screen operations, and by specifying
        padding requirements and initialization sequences.
 
        have, by specifying how to perform screen operations, and by specifying
        padding requirements and initialization sequences.
 
-       This manual describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This manual describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 </PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
 
 
 </PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
             these are simply two different sets of variables, whose values are
             not reset between calls to <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG>.  However, that fact  is  not
             documented in other implementations.  Relying on it will adversely
             these are simply two different sets of variables, whose values are
             not reset between calls to <STRONG><A HREF="curs_terminfo.3x.html">tparm(3x)</A></STRONG>.  However, that fact  is  not
             documented in other implementations.  Relying on it will adversely
-            impact portability to other implementations.
+            impact portability to other implementations:
+
+            <STRONG>o</STRONG>   SVr4 curses  stores  the  <EM>static</EM>  variables  in  the  <STRONG>TERMINAL</STRONG>
+                structure  (declared  in <STRONG>term.h</STRONG>), and the <EM>dynamic</EM> <EM>variables</EM> on
+                the stack in  the  <STRONG>tparm</STRONG>  function.   The  former  are  zeroed
+                automatically  when the <STRONG>setupterm</STRONG> function allocates the data.
+                The latter are set only by a <STRONG>%P</STRONG> operator.  A <STRONG>%g</STRONG>  for  a  given
+                variable   without   first   setting  it  with  <STRONG>%P</STRONG>  will  give
+                unpredictable results.
+
+            <STRONG>o</STRONG>   Solaris XPG4 curses does not distinguish between  <EM>dynamic</EM>  and
+                <EM>static</EM>  variables.  They are the same.  Like SVr4 curses, XPG4
+                curses does not initialize these explicitly.
+
+            <STRONG>o</STRONG>   Before version 6.3, ncurses stores  both  <EM>dynamic</EM>  and  <EM>static</EM>
+                variables in persistent storage, initialized to zeros.
+
+            <STRONG>o</STRONG>   Beginning  with version 6.3, ncurses stores <EM>static</EM> and <EM>dynamic</EM>
+                variables  in  the  same  manner  as   SVr4.    Unlike   other
+                implementations,  ncurses  zeros  dynamic variables before the
+                first <STRONG>%g</STRONG> or <STRONG>%P</STRONG> operator.
 
        <STRONG>%'</STRONG><EM>c</EM><STRONG>'</STRONG> char constant <EM>c</EM>
 
 
        <STRONG>%'</STRONG><EM>c</EM><STRONG>'</STRONG> char constant <EM>c</EM>
 
          board of squares            ACS_BOARD      #         h        0x68
          lantern symbol              ACS_LANTERN    #         i        0x69
          lower right corner          ACS_LRCORNER   +         j        0x6a
          board of squares            ACS_BOARD      #         h        0x68
          lantern symbol              ACS_LANTERN    #         i        0x69
          lower right corner          ACS_LRCORNER   +         j        0x6a
-
          upper right corner          ACS_URCORNER   +         k        0x6b
          upper left corner           ACS_ULCORNER   +         l        0x6c
          lower left corner           ACS_LLCORNER   +         m        0x6d
          upper right corner          ACS_URCORNER   +         k        0x6b
          upper left corner           ACS_ULCORNER   +         l        0x6c
          lower left corner           ACS_LLCORNER   +         m        0x6d
index 377364692373c7a04267d1685441debd17f2e20c..be0a6dd6aac6be58a3541ed38e13581e41614d46 100644 (file)
@@ -27,7 +27,7 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: tic.1m,v 1.79 2021/06/17 21:30:22 tom Exp @
+  * @Id: tic.1m,v 1.80 2021/08/15 20:01:19 tom Exp @
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 -->
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
 <HTML>
 
        <STRONG>-R</STRONG><EM>subset</EM>
               Restrict output to a given subset.  This option is for use  with
 
        <STRONG>-R</STRONG><EM>subset</EM>
               Restrict output to a given subset.  This option is for use  with
-              archaic  versions  of  terminfo  like  those on SVr1, Ultrix, or
-              HP/UX that do not  support  the  full  set  of  SVR4/XSI  Curses
-              terminfo; and outright broken ports like AIX 3.x that have their
-              own extensions incompatible with  SVr4/XSI.   Available  subsets
-              are "SVr1", "Ultrix", "HP", "BSD" and "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for
+              archaic  versions of terminfo like those on SVr1, Ultrix, or HP-
+              UX that do not support the full set of SVR4/XSI Curses terminfo;
+              and  outright  broken  ports  like  AIX  3.x that have their own
+              extensions incompatible with SVr4/XSI.   Available  subsets  are
+              "SVr1",  "Ultrix",  "HP",  "BSD"  and "AIX"; see <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG> for
               details.
 
        <STRONG>-r</STRONG>     Force  entry  resolution  (so  there   are   no   remaining   tc
               details.
 
        <STRONG>-r</STRONG>     Force  entry  resolution  (so  there   are   no   remaining   tc
        <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.  <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
 
        <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="term.5.html">term(5)</A></STRONG>.  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.  <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
 
 
 </PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
index 6ded423d51e2706daaf3a4b19b63159fc6b2ab09..8a4923f086baeb504dedc470c0002ae35fd1a3ec 100644 (file)
        <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
        <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>,   <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>,   <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>,   <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>,   <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
        <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index 6555c356ab07930e9905753b9b13fad479a94f09..ff7fca2ad5956ddb98fbf5d7f0aca655db525eb6 100644 (file)
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
 </PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
        <STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index 0d894e5bfbd1270453606dea87503d3930e649c2..81a75bceee68b457e9caba47dd10b931268509a0 100644 (file)
        <STRONG>csh(1)</STRONG>,   <STRONG>sh(1)</STRONG>,   <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,  <STRONG>tty(4)</STRONG>,  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
        <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
        <STRONG>csh(1)</STRONG>,   <STRONG>sh(1)</STRONG>,   <STRONG>stty(1)</STRONG>,   <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>,  <STRONG>tty(4)</STRONG>,  <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
        <STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
 
-       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210710).
+       This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210821).
 
 
 
 
 
 
index b6062c8b87e25478b5a27a49c7f2adea179cefcd..b72136d813eac4a511bb3dbe6fd71e022b40682f 100644 (file)
@@ -60,7 +60,7 @@ BEGIN {
        print  "/*    and: Thomas E. Dickey                        1995-on                  */"
        print  "/****************************************************************************/"
        print  ""
        print  "/*    and: Thomas E. Dickey                        1995-on                  */"
        print  "/****************************************************************************/"
        print  ""
-       print  "/* $Id: MKterm.h.awk.in,v 1.79 2021/03/20 16:08:03 tom Exp $ */"
+       print  "/* $Id: MKterm.h.awk.in,v 1.81 2021/08/18 20:52:42 tom Exp $ */"
        print  ""
        print  "/*"
        print  "**      term.h -- Definition of struct term"
        print  ""
        print  "/*"
        print  "**      term.h -- Definition of struct term"
@@ -244,6 +244,9 @@ END {
        print  " * The only reason these structures are visible is for read-only use."
        print  " * Programs which modify the data are not, never were, portable across"
        print  " * curses implementations."
        print  " * The only reason these structures are visible is for read-only use."
        print  " * Programs which modify the data are not, never were, portable across"
        print  " * curses implementations."
+       print  " *"
+       print  " * The first field in TERMINAL is used in macros."
+       print  " * The remaining fields are private."
        print  " */"
        print  "#ifdef NCURSES_INTERNALS"
        print  ""
        print  " */"
        print  "#ifdef NCURSES_INTERNALS"
        print  ""
@@ -253,19 +256,13 @@ END {
        print  "typedef TERMTYPE TERMTYPE2;"
        }
        print  ""
        print  "typedef TERMTYPE TERMTYPE2;"
        }
        print  ""
+       print  "typedef struct term TERMINAL;"
+       print  "#else"
+       print  ""
        print  "typedef struct term {           /* describe an actual terminal */"
        print  "    TERMTYPE    type;           /* terminal type description */"
        print  "typedef struct term {           /* describe an actual terminal */"
        print  "    TERMTYPE    type;           /* terminal type description */"
-       print  "    short       Filedes;        /* file description being written to */"
-       print  "    TTY         Ottyb;          /* original state of the terminal */"
-       print  "    TTY         Nttyb;          /* current state of the terminal */"
-       print  "    int         _baudrate;      /* used to compute padding */"
-       print  "    char *      _termname;      /* used for termname() */"
-       if (@NCURSES_EXT_COLORS@) {
-       print  "    TERMTYPE2   type2;          /* extended terminal type description */"
-       }
        print  "} TERMINAL;"
        print  "} TERMINAL;"
-       print  "#else"
-       print  "typedef struct term TERMINAL;"
+       print  ""
        print  "#endif /* NCURSES_INTERNALS */"
        print  ""
        print  ""
        print  "#endif /* NCURSES_INTERNALS */"
        print  ""
        print  ""
index 6645486233743e24edb9cd397c632cb6f9de04f4..36169f027c248503e9abe337354ec2e1e7d8f2ed 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
  ****************************************************************************/
 
 /*
- * $Id: tic.h,v 1.82 2021/03/20 16:06:15 tom Exp $
+ * $Id: tic.h,v 1.84 2021/08/21 00:24:45 tom Exp $
  *     tic.h - Global variables and structures for the terminfo compiler.
  */
 
  *     tic.h - Global variables and structures for the terminfo compiler.
  */
 
@@ -337,7 +337,8 @@ extern NCURSES_EXPORT_VAR(const struct tinfo_fkeys) _nc_tinfo_fkeys[];
 
 extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
 
 
 extern NCURSES_EXPORT_VAR(int) _nc_tparm_err;
 
-extern NCURSES_EXPORT(int) _nc_tparm_analyze(const char *, char **, int *);
+extern NCURSES_EXPORT(int) _nc_tparm_analyze(TERMINAL *, const char *, char **, int *);
+extern NCURSES_EXPORT(void) _nc_reset_tparm(TERMINAL *);
 
 /* lib_trace.c */
 extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
 
 /* lib_trace.c */
 extern NCURSES_EXPORT_VAR(unsigned) _nc_tracing;
index 54839872791ab3f42010ac5ebcbf091bb734d4b4..087796f17fbadec22deb8c5f2f1f656601a95ba6 100644 (file)
@@ -28,7 +28,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: infocmp.1m,v 1.78 2021/06/17 21:30:22 tom Exp $
+.\" $Id: infocmp.1m,v 1.79 2021/08/15 20:01:31 tom Exp $
 .TH @INFOCMP@ 1M ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .TH @INFOCMP@ 1M ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -476,7 +476,7 @@ Omit the \*(``Reconstructed from\*('' comment for source listings.
 \fB\-R\fR\fIsubset\fR
 Restrict output to a given subset.
 This option is for use with archaic
 \fB\-R\fR\fIsubset\fR
 Restrict output to a given subset.
 This option is for use with archaic
-versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
+versions of terminfo like those on SVr1, Ultrix, or HP-UX that do not support
 the full set of SVR4/XSI Curses terminfo; and variants such as AIX
 that have their own extensions incompatible with SVr4/XSI.
 .RS
 the full set of SVR4/XSI Curses terminfo; and variants such as AIX
 that have their own extensions incompatible with SVr4/XSI.
 .RS
index fa3181a88515426b3bb5a5cb6ea273f244698334..42c3dd6469e48c2c402525487c400e48da7a663f 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
 .\"***************************************************************************
-.\" Copyright 2020 Thomas E. Dickey                                          *
+.\" Copyright 2020,2021 Thomas E. Dickey                                     *
 .\" Copyright 2005-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" Copyright 2005-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -29,7 +29,7 @@
 .\"
 .\" Author: Thomas E. Dickey
 .\"
 .\"
 .\" Author: Thomas E. Dickey
 .\"
-.\" $Id: legacy_coding.3x,v 1.8 2020/10/17 23:40:23 tom Exp $
+.\" $Id: legacy_coding.3x,v 1.9 2021/08/15 19:32:05 tom Exp $
 .TH legacy_coding 3X ""
 .SH NAME
 \fBuse_legacy_coding\fR \- override locale-encoding checks
 .TH legacy_coding 3X ""
 .SH NAME
 \fBuse_legacy_coding\fR \- override locale-encoding checks
@@ -70,6 +70,6 @@ It was not supported on Version 7, BSD or System V implementations.
 It is recommended that any code depending on ncurses extensions
 be conditioned using NCURSES_VERSION.
 .SH SEE ALSO
 It is recommended that any code depending on ncurses extensions
 be conditioned using NCURSES_VERSION.
 .SH SEE ALSO
-\fBunctrl\fR.
+\fBunctrl\fR(3X).
 .SH AUTHOR
 Thomas Dickey (to support lynx's font-switching feature).
 .SH AUTHOR
 Thomas Dickey (to support lynx's font-switching feature).
index e9ae5bd0b908a88fdf97367af97f47ce39cf5346..3a4a1d07b163cbff71d8befc3ae8472247fc6644 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
 .\"***************************************************************************
-.\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
+.\" Copyright 2018-2020,2021 Thomas E. Dickey                                *
 .\" Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: term.5,v 1.38 2020/07/25 21:56:02 tom Exp $
+.\" $Id: term.5,v 1.40 2021/08/15 19:38:47 tom Exp $
 .TH term 5
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .TH term 5
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -286,7 +286,7 @@ to expect a different set of capabilities
 than are actually present in the file.
 Either the database may have been updated since
 .B setupterm
 than are actually present in the file.
 Either the database may have been updated since
 .B setupterm
-has been recompiled
+was recompiled
 (resulting in extra unrecognized entries in the file)
 or the program may have been recompiled more recently
 than the database was updated
 (resulting in extra unrecognized entries in the file)
 or the program may have been recompiled more recently
 than the database was updated
@@ -400,7 +400,7 @@ Compiled entries are limited to 32768 bytes because offsets into the
 The legacy format could have supported 32768-byte entries,
 but was limited a virtual memory page's 4096 bytes.
 .SH FILES
 The legacy format could have supported 32768-byte entries,
 but was limited a virtual memory page's 4096 bytes.
 .SH FILES
-\*d/*/*        compiled terminal capability data base
+\*d/*/*        compiled terminal capability database
 .SH SEE ALSO
 \fBcurses\fR(3X), \fBterminfo\fR(\*n).
 .SH AUTHORS
 .SH SEE ALSO
 \fBcurses\fR(3X), \fBterminfo\fR(\*n).
 .SH AUTHORS
index fc46b8a6f914a43e578ebc340e9e11147b52517a..4e66ee71d354a29b8fedc4ed29d499dffcec3e4d 100644 (file)
@@ -1,5 +1,5 @@
 .\"***************************************************************************
 .\"***************************************************************************
-.\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
+.\" Copyright 2018-2020,2021 Thomas E. Dickey                                *
 .\" Copyright 1998-2011,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" Copyright 1998-2011,2017 Free Software Foundation, Inc.                  *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: term.7,v 1.28 2020/02/02 23:34:34 tom Exp $
+.\" $Id: term.7,v 1.30 2021/08/15 19:39:57 tom Exp $
 .TH term 7
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .TH term 7
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -61,7 +61,7 @@ There can be problems if the remote terminfo or termcap entry
 for your type is not compatible with yours, but this situation is rare and
 can almost always be avoided by explicitly exporting \*(``vt100\*(''
 (assuming you are in fact using a VT100-superset console,
 for your type is not compatible with yours, but this situation is rare and
 can almost always be avoided by explicitly exporting \*(``vt100\*(''
 (assuming you are in fact using a VT100-superset console,
-terminal, or terminal emulator.)
+terminal, or terminal emulator).
 .PP
 In any case, you are free to override the system \fBTERM\fR setting to your
 taste in your shell profile.
 .PP
 In any case, you are free to override the system \fBTERM\fR setting to your
 taste in your shell profile.
@@ -213,7 +213,7 @@ should be unique within the first 14 characters.
 .SH FILES
 .TP 5
 \*d/?/*
 .SH FILES
 .TP 5
 \*d/?/*
-compiled terminal capability data base
+compiled terminal capability database
 .TP 5
 /etc/inittab
 tty line initialization (AT&T-like UNIXes)
 .TP 5
 /etc/inittab
 tty line initialization (AT&T-like UNIXes)
index 398f498a4ecf792c9db82b5eade0c8b5d71c5817..15be24e71c35123ee974d1910da12040f42c2419 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: terminfo.head,v 1.40 2021/06/17 21:30:22 tom Exp $
+.\" $Id: terminfo.head,v 1.41 2021/08/15 19:32:53 tom Exp $
 .TH terminfo 5 "" "" "File Formats"
 .ds n 5
 .ds d @TERMINFO@
 .TH terminfo 5 "" "" "File Formats"
 .ds n 5
 .ds d @TERMINFO@
 .el    .in -2
 ..
 .SH NAME
 .el    .in -2
 ..
 .SH NAME
-terminfo \- terminal capability data base
+terminfo \- terminal capability database
 .SH SYNOPSIS
 \*d/*/*
 .SH DESCRIPTION
 .I Terminfo
 .SH SYNOPSIS
 \*d/*/*
 .SH DESCRIPTION
 .I Terminfo
-is a data base describing terminals,
+is a database describing terminals,
 used by screen-oriented programs such as
 \fBnvi\fR(1),
 \fBlynx\fR(1),
 used by screen-oriented programs such as
 \fBnvi\fR(1),
 \fBlynx\fR(1),
index 3259e981b561751a5c63936471f1e3cb056101b4..a4620d19702e9574b9020633954fc86b426b0d5d 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: terminfo.tail,v 1.101 2021/06/17 21:30:22 tom Exp $
+.\" $Id: terminfo.tail,v 1.102 2021/08/21 22:55:23 tom Exp $
 .ps +1
 .SS User-Defined Capabilities
 .
 .ps +1
 .SS User-Defined Capabilities
 .
@@ -483,7 +483,31 @@ The terms \*(``static\*('' and \*(``dynamic\*('' are misleading.
 Historically, these are simply two different sets of variables,
 whose values are not reset between calls to \fBtparm\fP(3X).
 However, that fact is not documented in other implementations.
 Historically, these are simply two different sets of variables,
 whose values are not reset between calls to \fBtparm\fP(3X).
 However, that fact is not documented in other implementations.
-Relying on it will adversely impact portability to other implementations.
+Relying on it will adversely impact portability to other implementations:
+.RS
+.bP
+SVr4 curses stores the \fIstatic\fP variables in the \fBTERMINAL\fP
+structure (declared in \fBterm.h\fP), and the \fIdynamic variables\fP
+on the stack in the \fBtparm\fP function.
+The former are zeroed automatically when the \fBsetupterm\fP function
+allocates the data.
+The latter are set only by a \fB%P\fP operator.
+A \fB%g\fP for a given variable without first setting it with \fB%P\fP
+will give unpredictable results.
+.bP
+Solaris XPG4 curses does not distinguish between \fIdynamic\fP and
+\fIstatic\fP variables.
+They are the same.
+Like SVr4 curses, XPG4 curses does not initialize these explicitly.
+.bP
+Before version 6.3, ncurses stores both \fIdynamic\fP and \fIstatic\fP
+variables in persistent storage, initialized to zeros.
+.bP
+Beginning with version 6.3, ncurses stores \fIstatic\fP and \fIdynamic\fP
+variables in the same manner as SVr4.
+Unlike other implementations, ncurses zeros dynamic variables 
+before the first \fB%g\fP or \fB%P\fP operator.
+.RE
 .TP
 \fB%'\fP\fIc\fP\fB'\fP
 char constant \fIc\fP
 .TP
 \fB%'\fP\fIc\fP\fB'\fP
 char constant \fIc\fP
index e538e98e7bbd5e36db1e43e30f1d22f66ac46716..17aa03f0b97f2d1185262f917ea516f80302ad34 100644 (file)
@@ -27,7 +27,7 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: tic.1m,v 1.79 2021/06/17 21:30:22 tom Exp $
+.\" $Id: tic.1m,v 1.80 2021/08/15 20:01:19 tom Exp $
 .TH @TIC@ 1M ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .TH @TIC@ 1M ""
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
@@ -279,7 +279,7 @@ Suppress comments and blank lines when showing translated source.
 \fB\-R\fR\fIsubset\fR
 Restrict output to a given subset.
 This option is for use with archaic
 \fB\-R\fR\fIsubset\fR
 Restrict output to a given subset.
 This option is for use with archaic
-versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support
+versions of terminfo like those on SVr1, Ultrix, or HP-UX that do not support
 the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
 that have their own extensions incompatible with SVr4/XSI.
 Available subsets
 the full set of SVR4/XSI Curses terminfo; and outright broken ports like AIX 3.x
 that have their own extensions incompatible with SVr4/XSI.
 Available subsets
index e8b3e4b6b04a8d506cd031f42c221ccb1b1b61cd..86523e5d34d129fc475093909ad94931dfdc9869 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.907 $
-#      $Date: 2021/08/01 00:06:57 $
+#      $Revision: 1.909 $
+#      $Date: 2021/08/17 00:26:19 $
 #
 # 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
 #
 # 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
@@ -5244,12 +5244,12 @@ nsterm-direct|nsterm with direct-color indexing,
 
 xterm+direct16|xterm with direct-color indexing,
        CO#16,
 
 xterm+direct16|xterm with direct-color indexing,
        CO#16,
-       setab=\E[%?%p1%{8}%<%t4%p1%d%e%?%p1%{16}%<%t%p1%{92}%+%e48:2
-             ::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d
+       setab=\E[%?%p1%{8}%<%t4%p1%d%e%?%p1%{16}%<%t%p1%{92}%+%d%e48
+             :2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&
+             %d%;%;m,
+       setaf=\E[%?%p1%{8}%<%t3%p1%d%e%?%p1%{16}%<%t%p1%'R'%+%d%e38:
+             2::%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d
              %;%;m,
              %;%;m,
-       setaf=\E[%?%p1%{8}%<%t3%p1%d%e%?%p1%{16}%<%t%p1%'R'%+%e38:2:
-             :%p1%{65536}%/%d:%p1%{256}%/%{255}%&%d:%p1%{255}%&%d%;
-             %;m,
        setb@, setf@, use=xterm+direct,
 
 xterm-direct16|xterm with direct-colors and 16 indexed colors,
        setb@, setf@, use=xterm+direct,
 
 xterm-direct16|xterm with direct-colors and 16 indexed colors,
@@ -7238,7 +7238,7 @@ terminator|Terminator no line wrap,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p5%t;2%;%?%p1%p3%|%t;7
            %;m%?%p9%t\E(0%e\E(B%;,
        sgr0=\E[m\E(B, smacs=\E(0, smir=\E[4h, smso=\E[7m,
        sgr=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p5%t;2%;%?%p1%p3%|%t;7
            %;m%?%p9%t\E(0%e\E(B%;,
        sgr0=\E[m\E(B, smacs=\E(0, smir=\E[4h, smso=\E[7m,
-       smul=\E[4m, tbc=\E[3g, tsl=\E]2;%p1, vpa=\E[%i%p1%dd,
+       smul=\E[4m, tbc=\E[3g, tsl=\E]2;, vpa=\E[%i%p1%dd,
        use=vt220+pcedit, use=ecma+italics, use=ecma+index,
        use=xterm+256setaf, use=xterm+sl-twm,
        use=xterm+alt1049, use=vt220+cvis,
        use=vt220+pcedit, use=ecma+italics, use=ecma+index,
        use=xterm+256setaf, use=xterm+sl-twm,
        use=xterm+alt1049, use=vt220+cvis,
@@ -27178,4 +27178,11 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 #        but cancel the non-working Cr and Ms capabilities -TD
 #      + add foot and foot-direct -TD
 #
 #        but cancel the non-working Cr and Ms capabilities -TD
 #      + add foot and foot-direct -TD
 #
+# 2021-08-15
+#      + fix missing "%d" for setaf/setab code 8-15 in xterm+direct16 (report
+#        by Florian Weimer) -TD
+#
+# 2021-08-16
+#      + corrected tsl capability for terminator -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index beb8911f88cf2a28e649c647a5c8d7bbde6e80b0..75811d4555fc6bae0ef03519e5d5d87207cbd76d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: mk-1st.awk,v 1.122 2021/07/18 18:47:20 tom Exp $
+# $Id: mk-1st.awk,v 1.123 2021/08/15 20:01:44 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2016,2017 Free Software Foundation, Inc.                    #
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2016,2017 Free Software Foundation, Inc.                    #
@@ -62,7 +62,7 @@
 # Notes:
 #      CLIXs nawk does not like underscores in command-line variable names.
 #      Mixed-case variable names are ok.
 # Notes:
 #      CLIXs nawk does not like underscores in command-line variable names.
 #      Mixed-case variable names are ok.
-#      HP/UX requires shared libraries to have executable permissions.
+#      HP-UX requires shared libraries to have executable permissions.
 #
 function is_ticlib() {
                return ( subset ~ /^ticlib$/ );
 #
 function is_ticlib() {
                return ( subset ~ /^ticlib$/ );
index e08a9b9b445363171f51a07c95d07fc8e65223dc..aba25fdaaaae2a5220c61ad9b21bc009cd095e26 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.180 2021/07/03 15:27:09 tom Exp $
+# $Id: Makefile.in,v 1.182 2021/08/19 23:43:40 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2017,2018 Free Software Foundation, Inc.                    #
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2017,2018 Free Software Foundation, Inc.                    #
@@ -193,7 +193,8 @@ HEADER_DEPS = @INTERNALS_HDR@ \
        $(INCDIR)/nc_win32.h \
        $(INCDIR)/term_entry.h \
        $(srcdir)/curses.priv.h \
        $(INCDIR)/nc_win32.h \
        $(INCDIR)/term_entry.h \
        $(srcdir)/curses.priv.h \
-       $(srcdir)/new_pair.h
+       $(srcdir)/new_pair.h \
+       $(srcdir)/term.priv.h
 
 TEST_DEPS      = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
 TEST_ARGS      = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
 
 TEST_DEPS      = ../lib/@LIB_PREFIX@ncurses@DFT_DEP_SUFFIX@
 TEST_ARGS      = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
@@ -219,6 +220,7 @@ win32con = $(srcdir)/win32con
 ################################################################################
 
 @MAKE_PHONY@.PHONY :   all
 ################################################################################
 
 @MAKE_PHONY@.PHONY :   all
+@MAKE_PHONY@.PHONY :   check
 @MAKE_PHONY@.PHONY :   clean
 @MAKE_PHONY@.PHONY :   distclean
 @MAKE_PHONY@.PHONY :   libs
 @MAKE_PHONY@.PHONY :   clean
 @MAKE_PHONY@.PHONY :   distclean
 @MAKE_PHONY@.PHONY :   libs
@@ -327,6 +329,7 @@ realclean :: distclean
        ( cd ../include && $(MAKE) $(TOP_MFLAGS) )
 
 # These rules build test-programs for the modules that have test-drivers
        ( cd ../include && $(MAKE) $(TOP_MFLAGS) )
 
 # These rules build test-programs for the modules that have test-drivers
+@MAKE_PHONY@.PHONY :   test_progs
 test_progs : $(TEST_PROGS)
 
 ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
 test_progs : $(TEST_PROGS)
 
 ./link_test.c : $(base)/MKlib_gen.sh ../include/curses.h
@@ -357,6 +360,23 @@ report_hashing$x : \
                $(srcdir)/report_hashing.c $(TEST_DEPS)
        @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) report_hashing.c $(TEST_LDFLAGS)
 
                $(srcdir)/report_hashing.c $(TEST_DEPS)
        @ECHO_LD@ $(CC) -o $@ $(CFLAGS_DEFAULT) report_hashing.c $(TEST_LDFLAGS)
 
+# Verify that each header-file can be compiled without including another.
+@MAKE_PHONY@.PHONY :   check_headers
+check_headers:
+       @$(SHELL) -c "for header in *.h;\
+               do \
+                       echo \"** testing \$${header}\" ; \
+                       echo \"#include <\$${header}>\" >headers.c; \
+                       echo \"int main(void) { return 0; }\" >>headers.c; \
+                       $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
+               done"
+       -@rm -f headers.*
+
+@MAKE_PHONY@.PHONY :   check_objects
+check_objects: test_progs
+
+check :: check_headers check_objects
+
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################
index 33369da4ba04e57bb268e308b81e158b283e94cb..70866c6368123dcc042fca77390d8679e1449f81 100644 (file)
@@ -61,7 +61,7 @@
 
 #endif
 
 
 #endif
 
-MODULE_ID("$Id: new_pair.c,v 1.22 2021/05/08 15:26:34 tom Exp $")
+MODULE_ID("$Id: new_pair.c,v 1.23 2021/08/16 22:11:26 tom Exp $")
 
 #if NCURSES_EXT_COLORS
 
 
 #if NCURSES_EXT_COLORS
 
@@ -106,7 +106,7 @@ dumpit(SCREEN *sp, int pair, const char *tag)
     size_t have = sizeof(bigbuf);
 
     _nc_STRCPY(p, tag, have);
     size_t have = sizeof(bigbuf);
 
     _nc_STRCPY(p, tag, have);
-    for (n = 0; n < sp->_pair_limit; ++n) {
+    for (n = 0; n < sp->_pair_alloc; ++n) {
        if (list[n].mode != cpFREE) {
            p += strlen(p);
            if ((size_t) (p - bigbuf) + 50 > have)
        if (list[n].mode != cpFREE) {
            p += strlen(p);
            if ((size_t) (p - bigbuf) + 50 > have)
index 55446a8945016a83f95eee885d2aef273e0ac7a2..5e490715e0da2affa9b9f1bdfeaa0353aafd1c99 100644 (file)
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.642 2021/06/26 20:23:20 tom Exp $
+ * $Id: curses.priv.h,v 1.644 2021/08/18 21:55:42 tom Exp $
  *
  *     curses.priv.h
  *
  *
  *     curses.priv.h
  *
@@ -396,7 +396,7 @@ typedef union {
 
 #include <nc_panel.h>
 
 
 #include <nc_panel.h>
 
-#include <term.h>
+#include <term.priv.h>
 #include <nc_termios.h>
 
 #define IsPreScreen(sp)      (((sp) != 0) && sp->_prescreen)
 #include <nc_termios.h>
 
 #define IsPreScreen(sp)      (((sp) != 0) && sp->_prescreen)
@@ -799,12 +799,6 @@ typedef struct _SLK {
 
 #endif /* USE_TERMLIB */
 
 
 #endif /* USE_TERMLIB */
 
-typedef        struct {
-       WINDOW *win;            /* the window used in the hook      */
-       int     line;           /* lines to take, < 0 => from bottom*/
-       int     (*hook)(WINDOW *, int); /* callback for user        */
-} ripoff_t;
-
 #if USE_GPM_SUPPORT
 #undef buttons                 /* term.h defines this, and gpm uses it! */
 #include <gpm.h>
 #if USE_GPM_SUPPORT
 #undef buttons                 /* term.h defines this, and gpm uses it! */
 #include <gpm.h>
@@ -832,16 +826,6 @@ typedef int (*TYPE_Gpm_GetEvent) (Gpm_Event *);
 #endif /* HAVE_LIBDL */
 #endif /* USE_GPM_SUPPORT */
 
 #endif /* HAVE_LIBDL */
 #endif /* USE_GPM_SUPPORT */
 
-typedef struct {
-    long sequence;
-    bool last_used;
-    char *fix_sgr0;            /* this holds the filtered sgr0 string */
-    char *last_bufp;           /* help with fix_sgr0 leak */
-    TERMINAL *last_term;
-} TGETENT_CACHE;
-
-#define TGETENT_MAX 4
-
 /*
  * When converting from terminfo to termcap, check for cases where we can trim
  * octal escapes down to 2-character form.  It is useful for terminfo format
 /*
  * When converting from terminfo to termcap, check for cases where we can trim
  * octal escapes down to 2-character form.  It is useful for terminfo format
@@ -852,46 +836,6 @@ typedef struct {
 
 #define isoctal(c) ((c) >= '0' && (c) <= '7')
 
 
 #define isoctal(c) ((c) >= '0' && (c) <= '7')
 
-/*
- * State of tparm().
- */
-#define STACKSIZE 20
-
-typedef struct {
-       union {
-               int     num;
-               char    *str;
-       } data;
-       bool num_type;
-} STACK_FRAME;
-
-#define NUM_VARS 26
-
-typedef struct {
-       const char      *tparam_base;
-
-       STACK_FRAME     stack[STACKSIZE];
-       int             stack_ptr;
-
-       char            *out_buff;
-       size_t          out_size;
-       size_t          out_used;
-
-       char            *fmt_buff;
-       size_t          fmt_size;
-
-       int             dynamic_var[NUM_VARS];
-       int             static_vars[NUM_VARS];
-#ifdef TRACE
-       const char      *tname;
-#endif
-} TPARM_STATE;
-
-typedef struct {
-    char *text;
-    size_t size;
-} TRACEBUF;
-
 /*
  * The filesystem database normally uses a single-letter for the lower level
  * of directories.  Use a hexadecimal code for filesystems which do not
 /*
  * The filesystem database normally uses a single-letter for the lower level
  * of directories.  Use a hexadecimal code for filesystems which do not
@@ -922,132 +866,8 @@ struct DriverTCB; /* Terminal Control Block forward declaration */
 #define INIT_TERM_DRIVER()     /* nothing */
 #endif
 
 #define INIT_TERM_DRIVER()     /* nothing */
 #endif
 
-typedef struct {
-    const char *name;
-    char *value;
-} ITERATOR_VARS;
-
-/*
- * Global data which is not specific to a screen.
- */
-typedef struct {
-       SIG_ATOMIC_T    have_sigtstp;
-       SIG_ATOMIC_T    have_sigwinch;
-       SIG_ATOMIC_T    cleanup_nested;
-
-       bool            init_signals;
-       bool            init_screen;
-
-       char            *comp_sourcename;
-       char            *comp_termtype;
-
-       bool            have_tic_directory;
-       bool            keep_tic_directory;
-       const char      *tic_directory;
-
-       char            *dbi_list;
-       int             dbi_size;
-
-       char            *first_name;
-       char            **keyname_table;
-       int             init_keyname;
-
-       int             slk_format;
-
-       int             getstr_limit;   /* getstr_limit based on POSIX LINE_MAX */
-
-       char            *safeprint_buf;
-       size_t          safeprint_used;
-
-       TGETENT_CACHE   tgetent_cache[TGETENT_MAX];
-       int             tgetent_index;
-       long            tgetent_sequence;
-
-       char            *dbd_blob;      /* string-heap for dbd_list[] */
-       char            **dbd_list;     /* distinct places to look for data */
-       int             dbd_size;       /* length of dbd_list[] */
-       time_t          dbd_time;       /* cache last updated */
-       ITERATOR_VARS   dbd_vars[dbdLAST];
-
-#if HAVE_TSEARCH
-       void            *cached_tparm;
-       int             count_tparm;
-#endif /* HAVE_TSEARCH */
-
-#ifdef USE_TERM_DRIVER
-       int             (*term_driver)(struct DriverTCB*, const char*, int*);
-#endif
-
-#ifndef USE_SP_WINDOWLIST
-       WINDOWLIST      *_nc_windowlist;
-#define WindowList(sp) _nc_globals._nc_windowlist
-#endif
-
-#if USE_HOME_TERMINFO
-       char            *home_terminfo;
-#endif
-
-#if !USE_SAFE_SPRINTF
-       int             safeprint_cols;
-       int             safeprint_rows;
-#endif
-
-#ifdef USE_PTHREADS
-       pthread_mutex_t mutex_curses;
-       pthread_mutex_t mutex_prescreen;
-       pthread_mutex_t mutex_screen;
-       pthread_mutex_t mutex_update;
-       pthread_mutex_t mutex_tst_tracef;
-       pthread_mutex_t mutex_tracef;
-       int             nested_tracef;
-       int             use_pthreads;
-#define _nc_use_pthreads       _nc_globals.use_pthreads
-#if USE_PTHREADS_EINTR
-       pthread_t       read_thread;            /* The reading thread */
-#endif
-#endif
-#if USE_WIDEC_SUPPORT
-       char            key_name[MB_LEN_MAX + 1];
-#endif
-
-#ifdef TRACE
-       bool            trace_opened;
-       char            trace_fname[PATH_MAX];
-       int             trace_level;
-       FILE            *trace_fp;
-       int             trace_fd;
-
-       char            *tracearg_buf;
-       size_t          tracearg_used;
-
-       TRACEBUF        *tracebuf_ptr;
-       size_t          tracebuf_used;
-
-       char            tracechr_buf[40];
-
-       char            *tracedmp_buf;
-       size_t          tracedmp_used;
-
-       unsigned char   *tracetry_buf;
-       size_t          tracetry_used;
-
-       char            traceatr_color_buf[2][80];
-       int             traceatr_color_sel;
-       int             traceatr_color_last;
-#if !defined(USE_PTHREADS) && USE_REENTRANT
-       int             nested_tracef;
-#endif
-#endif /* TRACE */
-
-#if NO_LEAKS
-       bool            leak_checking;
-#endif
-} NCURSES_GLOBALS;
-
 extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;
 
 extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;
 
-#define N_RIPS 5
-
 /* The limit reserves one byte for a terminating NUL */
 #define my_getstr_limit        (_nc_globals.getstr_limit - 1)
 #define _nc_getstr_limit(n) \
 /* The limit reserves one byte for a terminating NUL */
 #define my_getstr_limit        (_nc_globals.getstr_limit - 1)
 #define _nc_getstr_limit(n) \
@@ -1057,54 +877,6 @@ extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;
            ? my_getstr_limit \
            : (n)))
 
            ? my_getstr_limit \
            : (n)))
 
-#ifdef USE_PTHREADS
-typedef struct _prescreen_list {
-       struct _prescreen_list *next;
-       pthread_t id;
-       struct screen *sp;
-} PRESCREEN_LIST;
-#endif
-
-/*
- * Global data which can be swept up into a SCREEN when one is created.
- * It may be modified before the next SCREEN is created.
- */
-typedef struct {
-#ifdef USE_PTHREADS
-       PRESCREEN_LIST *allocated;
-#else
-       struct screen * allocated;
-#endif
-       bool            use_env;
-       bool            filter_mode;
-       attr_t          previous_attr;
-       TPARM_STATE     tparm_state;
-       TTY             *saved_tty;     /* savetty/resetty information      */
-       bool            use_tioctl;
-       NCURSES_SP_OUTC _outch;         /* output handler if not putc */
-#ifndef USE_SP_RIPOFF
-       ripoff_t        rippedoff[N_RIPS];
-       ripoff_t        *rsp;
-#endif
-#if NCURSES_NO_PADDING
-       bool            _no_padding;    /* flag to set if padding disabled  */
-#endif
-#if BROKEN_LINKER || USE_REENTRANT
-       chtype          *real_acs_map;
-       int             _LINES;
-       int             _COLS;
-       int             _TABSIZE;
-       int             _ESCDELAY;
-       TERMINAL        *_cur_term;
-#endif
-#ifdef TRACE
-#if BROKEN_LINKER || USE_REENTRANT
-       long            _outchars;
-       const char      *_tputs_trace;
-#endif
-#endif
-} NCURSES_PRESCREEN;
-
 /*
  * Use screen-specific ripoff data (for softkeys) rather than global.
  */
 /*
  * Use screen-specific ripoff data (for softkeys) rather than global.
  */
index f0820f6728ed5ff10120b0f9387f1dc8ff79cf3b..a0dc78e0785e1cff0db3b4d577088ed16ef68e36 100644 (file)
@@ -2805,6 +2805,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -3615,6 +3628,7 @@ int       _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -3639,6 +3653,11 @@ char     *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
@@ -4201,7 +4220,7 @@ ENTRY     *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index 48a31eb49de00e49df3b3a442cf153e9d186c731..fe9e11c650c2196b8df280a860d30acc8c5119c7 100644 (file)
@@ -2814,6 +2814,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -3700,6 +3713,7 @@ int       _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -3724,6 +3738,11 @@ char     *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
@@ -4322,7 +4341,7 @@ ENTRY     *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index c98f74f734155134878c8eeac932dd08f81621bb..71b5182203151883b7ec5242930ac6b0a80672f4 100644 (file)
@@ -3753,6 +3753,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -4661,6 +4674,7 @@ int       _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -4685,6 +4699,11 @@ char     *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
@@ -5323,7 +5342,7 @@ ENTRY     *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index f5f1bb3c75bf1b4a1b33c2d0efd31392fe10cfe2..802740dd1fe91a9620573f466595a76fc05d457a 100644 (file)
@@ -3744,6 +3744,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -4576,6 +4589,7 @@ int       _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -4600,6 +4614,11 @@ char     *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
@@ -5202,7 +5221,7 @@ ENTRY     *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index d2326f03f53a4582cd90f67061cf53620a346e80..2e407fd0f95a435ff4cbd0d4a3259e8dbb762480 100644 (file)
@@ -48,7 +48,7 @@ ENTRY *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index 2e59b9f00eb0f4dbb7f545537bc44fcc1bc9937c..3a93b75c8b8c79fe6a18ac923702d667220828d3 100644 (file)
@@ -48,7 +48,7 @@ ENTRY *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index d2326f03f53a4582cd90f67061cf53620a346e80..2e407fd0f95a435ff4cbd0d4a3259e8dbb762480 100644 (file)
@@ -48,7 +48,7 @@ ENTRY *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index d2326f03f53a4582cd90f67061cf53620a346e80..2e407fd0f95a435ff4cbd0d4a3259e8dbb762480 100644 (file)
@@ -48,7 +48,7 @@ ENTRY *_nc_copy_entry(
 
 #undef _nc_save_str
 char   *_nc_save_str(
 
 #undef _nc_save_str
 char   *_nc_save_str(
-               const char *const string)
+               const char *string)
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
                { return(*(char **)0); }
 
 #undef _nc_wrap_entry
index ec24d160e89f6c3713e0f97f0ae562c7a1a6afe8..da64694ee7742540e180fec74fe9e93355c3aad8 100644 (file)
@@ -76,6 +76,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -886,6 +899,7 @@ int _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -910,6 +924,11 @@ char       *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
index 2bb72bd7e144c68430078de85e716aabe4d12636..0980445cf8ec17f3af52fd9ecadac80af2c1e9e1 100644 (file)
@@ -76,6 +76,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -962,6 +975,7 @@ int _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -986,6 +1000,11 @@ char      *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
index 4fd95bfdaa80569c4c5e5117a62b77b44bc7fc8a..0fd8d287a38750d0ca83a0167ac753f1ef8a6fff 100644 (file)
@@ -76,6 +76,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -984,6 +997,7 @@ int _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -1008,6 +1022,11 @@ char     *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
index 1c3a2f2226845062ef70c23a0cd897d2dcd998e0..93c9274e7717b7b49336eb048b26a546a502a244 100644 (file)
@@ -76,6 +76,19 @@ NCURSES_BOOL _nc_is_file_path(
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
 int    _nc_env_access(void)
                { return(*(int *)0); }
 
+#undef _nc_safe_fopen
+FILE   *_nc_safe_fopen(
+               const char *path,
+               const char *mode)
+               { return(*(FILE **)0); }
+
+#undef _nc_safe_open3
+int    _nc_safe_open3(
+               const char *path,
+               int     flags,
+               mode_t  mode)
+               { return(*(int *)0); }
+
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
 /* ./tinfo/add_tries.c */
 
 #undef _nc_add_to_try
@@ -908,6 +921,7 @@ int _nc_tparm_err;
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
 
 #undef _nc_tparm_analyze
 int    _nc_tparm_analyze(
+               TERMINAL *term,
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
                const char *string,
                char    **p_is_s,
                int     *_nc_popcount)
@@ -932,6 +946,11 @@ char       *_nc_tiparm(
                ...)
                { return(*(char **)0); }
 
                ...)
                { return(*(char **)0); }
 
+#undef _nc_reset_tparm
+void   _nc_reset_tparm(
+               TERMINAL *term)
+               { /* void */ }
+
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
 /* ./tinfo/lib_tputs.c */
 
 #undef PC
index dfda890772072e6eded861b1505eba242fabecf3..bc031a70ca5c0d9763ee97bbb0018d4ff91ad2c9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
 /*
  * Common type definitions and macros for new_pair.c, lib_color.c
  *
 /*
  * Common type definitions and macros for new_pair.c, lib_color.c
  *
- * $Id: new_pair.h,v 1.11 2020/04/11 16:43:47 tom Exp $
+ * $Id: new_pair.h,v 1.12 2021/08/18 19:18:12 tom Exp $
  */
 
 #ifndef NEW_PAIR_H
 #define NEW_PAIR_H 1
 /* *INDENT-OFF* */
 
  */
 
 #ifndef NEW_PAIR_H
 #define NEW_PAIR_H 1
 /* *INDENT-OFF* */
 
+#include <ncurses_cfg.h>
+#include <ncurses_dll.h>
+
+#include <sys/types.h>
+
+typedef struct screen  SCREEN;
+
 #define LIMIT_TYPED(n,t) \
        (t)(((n) > MAX_OF_TYPE(t)) \
            ? MAX_OF_TYPE(t) \
 #define LIMIT_TYPED(n,t) \
        (t)(((n) > MAX_OF_TYPE(t)) \
            ? MAX_OF_TYPE(t) \
index 2e7083a1e43d904a86873c893d7fc5fd7dffade1..83f6f3815878f360c093cdacb40045b9924596c4 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -33,7 +33,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: report_offsets.c,v 1.21 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: report_offsets.c,v 1.22 2021/08/19 19:51:33 tom Exp $")
 
 #define show_size(type) \
        flag = 0; \
 
 #define show_size(type) \
        flag = 0; \
@@ -175,6 +175,7 @@ main(void)
     show_offset(TERMINAL, Nttyb);
     show_offset(TERMINAL, _baudrate);
     show_offset(TERMINAL, _termname);
     show_offset(TERMINAL, Nttyb);
     show_offset(TERMINAL, _baudrate);
     show_offset(TERMINAL, _termname);
+    show_offset(TERMINAL, tparm_state);
 #if HAVE_INIT_EXTENDED_COLOR
     show_COLORS(TERMINAL, type2);
 #endif
 #if HAVE_INIT_EXTENDED_COLOR
     show_COLORS(TERMINAL, type2);
 #endif
@@ -186,6 +187,15 @@ main(void)
     show_OPTION(TERMTYPE, ext_Strings);
 #endif
 
     show_OPTION(TERMTYPE, ext_Strings);
 #endif
 
+    printf("\n");
+    show_size(TPARM_STATE);
+    show_offset(TPARM_STATE, stack);
+    show_offset(TPARM_STATE, stack_ptr);
+    show_offset(TPARM_STATE, out_buff);
+    show_offset(TPARM_STATE, fmt_buff);
+    show_offset(TPARM_STATE, static_vars);
+    show_TRACES(TPARM_STATE, tname);
+
     printf("\n");
     show_size(WINDOW);
     show_WIDECH(WINDOW, _bkgrnd);
     printf("\n");
     show_size(WINDOW);
     show_WIDECH(WINDOW, _bkgrnd);
@@ -194,6 +204,11 @@ main(void)
     printf("\n");
     show_size(NCURSES_GLOBALS);
     show_offset(NCURSES_GLOBALS, init_signals);
     printf("\n");
     show_size(NCURSES_GLOBALS);
     show_offset(NCURSES_GLOBALS, init_signals);
+    show_offset(NCURSES_GLOBALS, tgetent_cache);
+    show_offset(NCURSES_GLOBALS, dbd_vars);
+#if HAVE_TSEARCH
+    show_offset(NCURSES_GLOBALS, cached_tparm);
+#endif
     show_DRIVER(NCURSES_GLOBALS, term_driver);
     show_NORMAL(NCURSES_GLOBALS, _nc_windowlist);
 #if USE_HOME_TERMINFO
     show_DRIVER(NCURSES_GLOBALS, term_driver);
     show_NORMAL(NCURSES_GLOBALS, _nc_windowlist);
 #if USE_HOME_TERMINFO
@@ -212,10 +227,13 @@ main(void)
 
     printf("\n");
     show_size(NCURSES_PRESCREEN);
 
     printf("\n");
     show_size(NCURSES_PRESCREEN);
+    show_offset(NCURSES_PRESCREEN, tparm_state);
     show_offset(NCURSES_PRESCREEN, saved_tty);
     show_offset(NCURSES_PRESCREEN, use_tioctl);
     show_offset(NCURSES_PRESCREEN, _outch);
     show_offset(NCURSES_PRESCREEN, saved_tty);
     show_offset(NCURSES_PRESCREEN, use_tioctl);
     show_offset(NCURSES_PRESCREEN, _outch);
+#ifndef USE_SP_RIPOFF
     show_NORMAL(NCURSES_PRESCREEN, rippedoff);
     show_NORMAL(NCURSES_PRESCREEN, rippedoff);
+#endif
 #if NCURSES_NO_PADDING
     show_OPTION(NCURSES_PRESCREEN, _no_padding);
 #endif
 #if NCURSES_NO_PADDING
     show_OPTION(NCURSES_PRESCREEN, _no_padding);
 #endif
@@ -224,6 +242,9 @@ main(void)
 #else
     show_REENTR(NCURSES_PRESCREEN, real_acs_map);
 #endif
 #else
     show_REENTR(NCURSES_PRESCREEN, real_acs_map);
 #endif
+#if BROKEN_LINKER || USE_REENTRANT
+    show_TRACES(NCURSES_PRESCREEN, _outchars);
+#endif
 
     return EXIT_SUCCESS;
 }
 
     return EXIT_SUCCESS;
 }
diff --git a/ncurses/term.priv.h b/ncurses/term.priv.h
new file mode 100644 (file)
index 0000000..f31e9f5
--- /dev/null
@@ -0,0 +1,330 @@
+/****************************************************************************
+ * Copyright 2021 Thomas E. Dickey                                          *
+ *                                                                          *
+ * Permission is hereby granted, free of charge, to any person obtaining a  *
+ * copy of this software and associated documentation files (the            *
+ * "Software"), to deal in the Software without restriction, including      *
+ * without limitation the rights to use, copy, modify, merge, publish,      *
+ * distribute, distribute with modifications, sublicense, and/or sell       *
+ * copies of the Software, and to permit persons to whom the Software is    *
+ * furnished to do so, subject to the following conditions:                 *
+ *                                                                          *
+ * The above copyright notice and this permission notice shall be included  *
+ * in all copies or substantial portions of the Software.                   *
+ *                                                                          *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
+ *                                                                          *
+ * Except as contained in this notice, the name(s) of the above copyright   *
+ * holders shall not be used in advertising or otherwise to promote the     *
+ * sale, use or other dealings in this Software without prior written       *
+ * authorization.                                                           *
+ ****************************************************************************/
+
+/*
+ * $Id: term.priv.h,v 1.4 2021/08/19 20:02:09 tom Exp $
+ *
+ *     term.priv.h
+ *
+ *     Header file for terminfo library objects which are private to
+ *     the library.
+ *
+ */
+
+#ifndef _TERM_PRIV_H
+#define _TERM_PRIV_H 1
+/* *INDENT-OFF* */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ncurses_cfg.h>
+
+#undef NCURSES_OPAQUE
+#define NCURSES_INTERNALS 1
+#define NCURSES_OPAQUE 0
+
+#include <limits.h>            /* PATH_MAX */
+#include <signal.h>            /* sig_atomic_t */
+#include <time.h>              /* time_t */
+#include <term.h>              /* time_t */
+
+/*
+ * State of tparm().
+ */
+#define STACKSIZE 20
+
+typedef struct {
+       union {
+               int     num;
+               char *  str;
+       } data;
+       bool num_type;
+} STACK_FRAME;
+
+#define NUM_VARS 26
+
+typedef struct {
+       const char *    tparam_base;
+
+       STACK_FRAME     stack[STACKSIZE];
+       int             stack_ptr;
+
+       char *          out_buff;
+       size_t          out_size;
+       size_t          out_used;
+
+       char *          fmt_buff;
+       size_t          fmt_size;
+
+       int             static_vars[NUM_VARS];
+#ifdef TRACE
+       const char *    tname;
+#endif
+} TPARM_STATE;
+
+typedef struct {
+       char *          text;
+       size_t          size;
+} TRACEBUF;
+
+typedef struct {
+       const char *    name;
+       char *          value;
+} ITERATOR_VARS;
+
+/*
+ * 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 */
+       TTY             Ottyb;          /* original state of the terminal */
+       TTY             Nttyb;          /* current state of the terminal */
+       int             _baudrate;      /* used to compute padding */
+       char *          _termname;      /* used for termname() */
+       TPARM_STATE     tparm_state;
+#if NCURSES_EXT_COLORS
+       TERMTYPE2       type2;          /* extended terminal type description */
+#endif
+} TERMINAL;
+
+/*
+ * Internals for soft-keys
+ */
+typedef        struct {
+       WINDOW *        win;            /* the window used in the hook      */
+       int             line;           /* lines to take, < 0 => from bottom*/
+       int             (*hook)(WINDOW *, int); /* callback for user        */
+} ripoff_t;
+
+/*
+ * Internals for tgetent
+ */
+typedef struct {
+       long            sequence;
+       bool            last_used;
+       char *          fix_sgr0;       /* this holds the filtered sgr0 string */
+       char *          last_bufp;      /* help with fix_sgr0 leak */
+       TERMINAL *      last_term;
+} TGETENT_CACHE;
+
+#define TGETENT_MAX 4
+
+#include <term_entry.h>                /* dbdLAST */
+
+#ifdef USE_TERM_DRIVER
+struct DriverTCB; /* Terminal Control Block forward declaration */
+#endif
+
+/*
+ * Global data which is not specific to a screen.
+ */
+typedef struct {
+       SIG_ATOMIC_T    have_sigtstp;
+       SIG_ATOMIC_T    have_sigwinch;
+       SIG_ATOMIC_T    cleanup_nested;
+
+       bool            init_signals;
+       bool            init_screen;
+
+       char *          comp_sourcename;
+       char *          comp_termtype;
+
+       bool            have_tic_directory;
+       bool            keep_tic_directory;
+       const char *    tic_directory;
+
+       char *          dbi_list;
+       int             dbi_size;
+
+       char *          first_name;
+       char **         keyname_table;
+       int             init_keyname;
+
+       int             slk_format;
+
+       int             getstr_limit;   /* getstr_limit based on POSIX LINE_MAX */
+
+       char *          safeprint_buf;
+       size_t          safeprint_used;
+
+       TGETENT_CACHE   tgetent_cache[TGETENT_MAX];
+       int             tgetent_index;
+       long            tgetent_sequence;
+
+       char *          dbd_blob;       /* string-heap for dbd_list[] */
+       char **         dbd_list;       /* distinct places to look for data */
+       int             dbd_size;       /* length of dbd_list[] */
+       time_t          dbd_time;       /* cache last updated */
+       ITERATOR_VARS   dbd_vars[dbdLAST];
+
+#if HAVE_TSEARCH
+       void *          cached_tparm;
+       int             count_tparm;
+#endif /* HAVE_TSEARCH */
+
+#ifdef USE_TERM_DRIVER
+       int             (*term_driver)(struct DriverTCB*, const char*, int*);
+#endif
+
+#define WINDOWLIST struct _win_list
+
+#ifndef USE_SP_WINDOWLIST
+       WINDOWLIST *    _nc_windowlist;
+#define WindowList(sp) _nc_globals._nc_windowlist
+#endif
+
+#if USE_HOME_TERMINFO
+       char *          home_terminfo;
+#endif
+
+#if !USE_SAFE_SPRINTF
+       int             safeprint_cols;
+       int             safeprint_rows;
+#endif
+
+#ifdef USE_PTHREADS
+       pthread_mutex_t mutex_curses;
+       pthread_mutex_t mutex_prescreen;
+       pthread_mutex_t mutex_screen;
+       pthread_mutex_t mutex_update;
+       pthread_mutex_t mutex_tst_tracef;
+       pthread_mutex_t mutex_tracef;
+       int             nested_tracef;
+       int             use_pthreads;
+#define _nc_use_pthreads       _nc_globals.use_pthreads
+#if USE_PTHREADS_EINTR
+       pthread_t       read_thread;    /* The reading thread */
+#endif
+#endif
+#if USE_WIDEC_SUPPORT
+       char            key_name[MB_LEN_MAX + 1];
+#endif
+
+#ifdef TRACE
+       bool            trace_opened;
+       char            trace_fname[PATH_MAX];
+       int             trace_level;
+       FILE *          trace_fp;
+       int             trace_fd;
+
+       char *          tracearg_buf;
+       size_t          tracearg_used;
+
+       TRACEBUF *      tracebuf_ptr;
+       size_t          tracebuf_used;
+
+       char            tracechr_buf[40];
+
+       char *          tracedmp_buf;
+       size_t          tracedmp_used;
+
+       unsigned char * tracetry_buf;
+       size_t          tracetry_used;
+
+       char            traceatr_color_buf[2][80];
+       int             traceatr_color_sel;
+       int             traceatr_color_last;
+#if !defined(USE_PTHREADS) && USE_REENTRANT
+       int             nested_tracef;
+#endif
+#endif /* TRACE */
+
+#if NO_LEAKS
+       bool            leak_checking;
+#endif
+} NCURSES_GLOBALS;
+
+extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;
+
+#define N_RIPS 5
+
+#ifdef USE_PTHREADS
+typedef struct _prescreen_list {
+       struct _prescreen_list *next;
+       pthread_t       id;
+       struct screen * sp;
+} PRESCREEN_LIST;
+#endif
+
+/*
+ * Global data which can be swept up into a SCREEN when one is created.
+ * It may be modified before the next SCREEN is created.
+ */
+typedef struct {
+#ifdef USE_PTHREADS
+       PRESCREEN_LIST *allocated;
+#else
+       struct screen * allocated;
+#endif
+       bool            use_env;
+       bool            filter_mode;
+       attr_t          previous_attr;
+       TPARM_STATE     tparm_state;
+       TTY *           saved_tty;      /* savetty/resetty information    */
+       bool            use_tioctl;
+       NCURSES_SP_OUTC _outch;         /* output handler if not putc */
+#ifndef USE_SP_RIPOFF
+       ripoff_t        rippedoff[N_RIPS];
+       ripoff_t *      rsp;
+#endif
+#if NCURSES_NO_PADDING
+       bool            _no_padding;    /* flag to set if padding disabled */
+#endif
+#if BROKEN_LINKER || USE_REENTRANT
+       chtype *        real_acs_map;
+       int             _LINES;
+       int             _COLS;
+       int             _TABSIZE;
+       int             _ESCDELAY;
+       TERMINAL *      _cur_term;
+#endif
+#ifdef TRACE
+#if BROKEN_LINKER || USE_REENTRANT
+       long            _outchars;
+       const char *    _tputs_trace;
+#endif
+#endif
+} NCURSES_PRESCREEN;
+
+extern NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen;
+
+#ifdef __cplusplus
+}
+#endif
+
+/* *INDENT-ON* */
+
+#endif /* _TERM_PRIV_H */
index 39274f4e7c39c923688edf9f63fefc0009ad4cc7..6a06cd77f68512f81016802117ce8c99f8dd38cf 100644 (file)
@@ -43,7 +43,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_data.c,v 1.81 2020/06/13 22:01:14 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.84 2021/08/19 08:01:33 tom Exp $")
 
 /*
  * OS/2's native linker complains if we don't initialize public data when
 
 /*
  * OS/2's native linker complains if we don't initialize public data when
@@ -251,7 +251,6 @@ NCURSES_EXPORT_VAR(NCURSES_PRESCREEN) _nc_prescreen = {
        NULL,                   /* fmt_buff */
        0,                      /* fmt_size */
 
        NULL,                   /* fmt_buff */
        0,                      /* fmt_size */
 
-       NUM_VARS_0s,            /* dynamic_var */
        NUM_VARS_0s,            /* static_vars */
 #ifdef TRACE
        NULL,                   /* tname */
        NUM_VARS_0s,            /* static_vars */
 #ifdef TRACE
        NULL,                   /* tname */
index 3fe42399855215f9ba1bc42408afdf21cc42658d..72d8813801c08487fc1f7403b32bf32e2ee2f270 100644 (file)
@@ -53,7 +53,7 @@
 #include <ctype.h>
 #include <tic.h>
 
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: lib_tparm.c,v 1.131 2021/04/03 22:05:59 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.134 2021/08/21 21:52:08 tom Exp $")
 
 /*
  *     char *
 
 /*
  *     char *
@@ -117,9 +117,14 @@ MODULE_ID("$Id: lib_tparm.c,v 1.131 2021/04/03 22:05:59 tom Exp $")
 
 NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
 
 
 NCURSES_EXPORT_VAR(int) _nc_tparm_err = 0;
 
-#define TPS(var) _nc_prescreen.tparm_state.var
+#define TPS(var) tps->var
 #define popcount _nc_popcount  /* workaround for NetBSD 6.0 defect */
 
 #define popcount _nc_popcount  /* workaround for NetBSD 6.0 defect */
 
+#define get_tparm_state(term) \
+           (term != NULL \
+             ? &(term->tparm_state) \
+             : &(_nc_prescreen.tparm_state))
+
 #define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
 #define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
 #define tc_BUMP()  if (level < 0 && number < 2) number++
 #define isUPPER(c) ((c) >= 'A' && (c) <= 'Z')
 #define isLOWER(c) ((c) >= 'a' && (c) <= 'z')
 #define tc_BUMP()  if (level < 0 && number < 2) number++
@@ -171,6 +176,7 @@ visit_nodes(const void *nodep, const VISIT which, const int depth)
 NCURSES_EXPORT(void)
 _nc_free_tparm(void)
 {
 NCURSES_EXPORT(void)
 _nc_free_tparm(void)
 {
+    TPARM_STATE *tps = get_tparm_state(cur_term);      /* FIXME */
 #if HAVE_TSEARCH
     if (MyCount != 0) {
        delete_tparm = typeCalloc(TPARM_DATA *, MyCount);
 #if HAVE_TSEARCH
     if (MyCount != 0) {
        delete_tparm = typeCalloc(TPARM_DATA *, MyCount);
@@ -200,105 +206,156 @@ _nc_free_tparm(void)
 }
 #endif
 
 }
 #endif
 
-static NCURSES_INLINE void
-get_space(size_t need)
+static int
+tparm_error(TPARM_STATE *tps, const char *message)
 {
 {
-    need += TPS(out_used);
-    if (need > TPS(out_size)) {
-       TPS(out_size) = need * 2;
-       TYPE_REALLOC(char, TPS(out_size), TPS(out_buff));
-    }
+    DEBUG(2, ("%s: %s", message, _nc_visbuf(TPS(tparam_base))));
+    return ++_nc_tparm_err;
 }
 
 }
 
+#define get_space(tps, need) \
+{ \
+    size_t need2get = need + TPS(out_used); \
+    if (need2get > TPS(out_size)) { \
+       TPS(out_size) = need2get * 2; \
+       TYPE_REALLOC(char, TPS(out_size), TPS(out_buff)); \
+    } \
+}
+
+#if NCURSES_EXPANDED
 static NCURSES_INLINE void
 static NCURSES_INLINE void
-save_text(const char *fmt, const char *s, int len)
-{
-    size_t s_len = (size_t) len + strlen(s) + strlen(fmt);
-    get_space(s_len + 1);
+  (get_space) (TPARM_STATE *tps, size_t need) {
+    get_space(tps, need);
+}
 
 
-    _nc_SPRINTF(TPS(out_buff) + TPS(out_used),
-               _nc_SLIMIT(TPS(out_size) - TPS(out_used))
-               fmt, s);
-    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
+#undef get_space
+#endif
+
+#define save_text(tps, fmt, s, len) \
+{ \
+    size_t s_len = (size_t) len + strlen(s) + strlen(fmt); \
+    get_space(tps, s_len + 1); \
+    _nc_SPRINTF(TPS(out_buff) + TPS(out_used), \
+               _nc_SLIMIT(TPS(out_size) - TPS(out_used)) \
+               fmt, s); \
+    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used)); \
 }
 
 }
 
+#if NCURSES_EXPANDED
 static NCURSES_INLINE void
 static NCURSES_INLINE void
-save_number(const char *fmt, int number, int len)
-{
-    size_t s_len = (size_t) len + 30 + strlen(fmt);
-    get_space(s_len + 1);
+  (save_text) (TPARM_STATE *tps, const char *fmt, const char *s, int len) {
+    save_text(tps, fmt, s, len);
+}
+
+#undef save_text
+#endif
 
 
-    _nc_SPRINTF(TPS(out_buff) + TPS(out_used),
-               _nc_SLIMIT(TPS(out_size) - TPS(out_used))
-               fmt, number);
-    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used));
+#define save_number(tps, fmt, number, len) \
+{ \
+    size_t s_len = (size_t) len + 30 + strlen(fmt); \
+    get_space(tps, s_len + 1); \
+    _nc_SPRINTF(TPS(out_buff) + TPS(out_used), \
+               _nc_SLIMIT(TPS(out_size) - TPS(out_used)) \
+               fmt, number); \
+    TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used)); \
 }
 
 }
 
+#if NCURSES_EXPANDED
 static NCURSES_INLINE void
 static NCURSES_INLINE void
-save_char(int c)
-{
-    if (c == 0)
-       c = 0200;
-    get_space((size_t) 1);
-    TPS(out_buff)[TPS(out_used)++] = (char) c;
+  (save_number) (TPARM_STATE *tps, const char *fmt, int number, int len) {
+    save_number(tps, fmt, number, len);
+}
+
+#undef save_number
+#endif
+
+#define save_char(tps, c) \
+{ \
+    get_space(tps, (size_t) 1); \
+    TPS(out_buff)[TPS(out_used)++] = (char) ((c == 0) ? 0200 : c); \
 }
 
 }
 
+#if NCURSES_EXPANDED
 static NCURSES_INLINE void
 static NCURSES_INLINE void
-npush(int x)
-{
-    if (TPS(stack_ptr) < STACKSIZE) {
-       TPS(stack)[TPS(stack_ptr)].num_type = TRUE;
-       TPS(stack)[TPS(stack_ptr)].data.num = x;
-       TPS(stack_ptr)++;
-    } else {
-       DEBUG(2, ("npush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
-       _nc_tparm_err++;
-    }
+  (save_char) (TPARM_STATE *tps, int c) {
+    save_char(tps, c);
 }
 
 }
 
-static NCURSES_INLINE int
-npop(void)
-{
-    int result = 0;
-    if (TPS(stack_ptr) > 0) {
-       TPS(stack_ptr)--;
-       if (TPS(stack)[TPS(stack_ptr)].num_type)
-           result = TPS(stack)[TPS(stack_ptr)].data.num;
-    } else {
-       DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
-       _nc_tparm_err++;
-    }
-    return result;
+#undef save_char
+#endif
+
+#define npush(tps, x) \
+{ \
+    if (TPS(stack_ptr) < STACKSIZE) { \
+       TPS(stack)[TPS(stack_ptr)].num_type = TRUE; \
+       TPS(stack)[TPS(stack_ptr)].data.num = x; \
+       TPS(stack_ptr)++; \
+    } else { \
+       (void) tparm_error(tps, "npush: stack overflow"); \
+    } \
 }
 
 }
 
+#if NCURSES_EXPANDED
 static NCURSES_INLINE void
 static NCURSES_INLINE void
-spush(char *x)
-{
-    if (TPS(stack_ptr) < STACKSIZE) {
-       TPS(stack)[TPS(stack_ptr)].num_type = FALSE;
-       TPS(stack)[TPS(stack_ptr)].data.str = x;
-       TPS(stack_ptr)++;
-    } else {
-       DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(TPS(tparam_base))));
-       _nc_tparm_err++;
-    }
+  (npush) (TPARM_STATE *tps, int x) {
+    npush(tps, x);
+}
+
+#undef npush
+#endif
+
+#define spush(tps, x) \
+{ \
+    if (TPS(stack_ptr) < STACKSIZE) { \
+       TPS(stack)[TPS(stack_ptr)].num_type = FALSE; \
+       TPS(stack)[TPS(stack_ptr)].data.str = x; \
+       TPS(stack_ptr)++; \
+    } else { \
+       (void) tparm_error(tps, "spush: stack overflow"); \
+    } \
 }
 
 }
 
+#if NCURSES_EXPANDED
+static NCURSES_INLINE void
+  (spush) (TPARM_STATE *tps, char *x) {
+    spush(tps, x);
+}
+
+#undef spush
+#endif
+
+#define npop(tps) \
+    ((TPS(stack_ptr)-- > 0) \
+     ? ((TPS(stack)[TPS(stack_ptr)].num_type) \
+        ? TPS(stack)[TPS(stack_ptr)].data.num \
+        : 0) \
+     : (tparm_error(tps, "npop: stack underflow"), \
+        TPS(stack_ptr) = 0))
+
+#if NCURSES_EXPANDED
+static NCURSES_INLINE int
+  (npop) (TPARM_STATE *tps) {
+    return npop(tps);
+}
+#undef npop
+#endif
+
+#define spop(tps) \
+    ((TPS(stack_ptr)-- > 0) \
+     ? ((!TPS(stack)[TPS(stack_ptr)].num_type \
+        && TPS(stack)[TPS(stack_ptr)].data.str != 0) \
+         ? TPS(stack)[TPS(stack_ptr)].data.str \
+         : dummy) \
+     : (tparm_error(tps, "spop: stack underflow"), \
+        dummy))
+
+#if NCURSES_EXPANDED
 static NCURSES_INLINE char *
 static NCURSES_INLINE char *
-spop(void)
-{
-    char *result = dummy;
-    if (TPS(stack_ptr) > 0) {
-       TPS(stack_ptr)--;
-       if (!TPS(stack)[TPS(stack_ptr)].num_type
-           && TPS(stack)[TPS(stack_ptr)].data.str != 0)
-           result = TPS(stack)[TPS(stack_ptr)].data.str;
-    } else {
-       DEBUG(2, ("spop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
-       _nc_tparm_err++;
-    }
-    return result;
+  (spop) (TPARM_STATE *tps) {
+    return spop(tps);
 }
 }
+#undef spop
+#endif
 
 static NCURSES_INLINE const char *
 parse_format(const char *s, char *format, int *len)
 
 static NCURSES_INLINE const char *
 parse_format(const char *s, char *format, int *len)
@@ -407,8 +464,9 @@ parse_format(const char *s, char *format, int *len)
  * may be cases that we cannot see the explicit parameter numbers.
  */
 NCURSES_EXPORT(int)
  * may be cases that we cannot see the explicit parameter numbers.
  */
 NCURSES_EXPORT(int)
-_nc_tparm_analyze(const char *string, char **p_is_s, int *popcount)
+_nc_tparm_analyze(TERMINAL *term, const char *string, char **p_is_s, int *popcount)
 {
 {
+    TPARM_STATE *tps = get_tparm_state(term);
     size_t len2;
     int i;
     int lastpop = -1;
     size_t len2;
     int i;
     int lastpop = -1;
@@ -541,8 +599,9 @@ _nc_tparm_analyze(const char *string, char **p_is_s, int *popcount)
  * TODO: cache the result so that this is done once per capability per term.
  */
 static int
  * TODO: cache the result so that this is done once per capability per term.
  */
 static int
-tparm_setup(const char *string, TPARM_DATA * result)
+tparm_setup(TERMINAL *term, const char *string, TPARM_DATA *result)
 {
 {
+    TPARM_STATE *tps = get_tparm_state(term);
     int rc = OK;
 
     TPS(out_used) = 0;
     int rc = OK;
 
     TPS(out_used) = 0;
@@ -558,8 +617,15 @@ tparm_setup(const char *string, TPARM_DATA * result)
 
        result->format = string;
        if ((ft = tfind(result, &MyCache, cmp_format)) != 0) {
 
        result->format = string;
        if ((ft = tfind(result, &MyCache, cmp_format)) != 0) {
+           size_t len2;
            fs = *(TPARM_DATA **) ft;
            *result = *fs;
            fs = *(TPARM_DATA **) ft;
            *result = *fs;
+           if ((len2 = strlen(string)) + 2 > TPS(fmt_size)) {
+               TPS(fmt_size) += len2 + 2;
+               TPS(fmt_buff) = typeRealloc(char, TPS(fmt_size), TPS(fmt_buff));
+               if (TPS(fmt_buff) == 0)
+                   return ERR;
+           }
        } else
 #endif
        {
        } else
 #endif
        {
@@ -568,7 +634,7 @@ tparm_setup(const char *string, TPARM_DATA * result)
             * string.  Use this value to limit the number of arguments copied
             * from the variable-length argument list.
             */
             * string.  Use this value to limit the number of arguments copied
             * from the variable-length argument list.
             */
-           result->num_parsed = _nc_tparm_analyze(string,
+           result->num_parsed = _nc_tparm_analyze(term, string,
                                                   result->p_is_s,
                                                   &(result->num_popped));
            if (TPS(fmt_buff) == 0) {
                                                   result->p_is_s,
                                                   &(result->num_popped));
            if (TPS(fmt_buff) == 0) {
@@ -619,7 +685,7 @@ tparm_setup(const char *string, TPARM_DATA * result)
  * long's, which is consistent with our va_arg() usage.
  */
 static void
  * long's, which is consistent with our va_arg() usage.
  */
 static void
-tparm_copy_valist(TPARM_DATA * data, int use_TPARM_ARG, va_list ap)
+tparm_copy_valist(TPARM_DATA *data, int use_TPARM_ARG, va_list ap)
 {
     int i;
 
 {
     int i;
 
@@ -646,7 +712,7 @@ tparm_copy_valist(TPARM_DATA * data, int use_TPARM_ARG, va_list ap)
  * will expand termcap strings OK.
  */
 static bool
  * will expand termcap strings OK.
  */
 static bool
-tparm_tc_compat(TPARM_DATA * data)
+tparm_tc_compat(TPARM_STATE *tps, TPARM_DATA *data)
 {
     bool termcap_hack = FALSE;
 
 {
     bool termcap_hack = FALSE;
 
@@ -657,10 +723,11 @@ tparm_tc_compat(TPARM_DATA * data)
 
        termcap_hack = TRUE;
        for (i = data->num_parsed - 1; i >= 0; i--) {
 
        termcap_hack = TRUE;
        for (i = data->num_parsed - 1; i >= 0; i--) {
-           if (data->p_is_s[i])
-               spush(data->p_is_s[i]);
-           else
-               npush((int) data->param[i]);
+           if (data->p_is_s[i]) {
+               spush(tps, data->p_is_s[i]);
+           } else {
+               npush(tps, (int) data->param[i]);
+           }
        }
     }
     return termcap_hack;
        }
     }
     return termcap_hack;
@@ -668,20 +735,20 @@ tparm_tc_compat(TPARM_DATA * data)
 
 #ifdef TRACE
 static void
 
 #ifdef TRACE
 static void
-tparm_trace_call(const char *string, TPARM_DATA * data)
+tparm_trace_call(TPARM_STATE *tps, const char *string, TPARM_DATA *data)
 {
     if (USE_TRACEF(TRACE_CALLS)) {
        int i;
        for (i = 0; i < data->num_actual; i++) {
            if (data->p_is_s[i] != 0) {
 {
     if (USE_TRACEF(TRACE_CALLS)) {
        int i;
        for (i = 0; i < data->num_actual; i++) {
            if (data->p_is_s[i] != 0) {
-               save_text(", %s", _nc_visbuf(data->p_is_s[i]), 0);
+               save_text(tps, ", %s", _nc_visbuf(data->p_is_s[i]), 0);
            } else if ((long) data->param[i] > MAX_OF_TYPE(NCURSES_INT2) ||
                       (long) data->param[i] < 0) {
                _tracef("BUG: problem with tparm parameter #%d of %d",
                        i + 1, data->num_actual);
                break;
            } else {
            } else if ((long) data->param[i] > MAX_OF_TYPE(NCURSES_INT2) ||
                       (long) data->param[i] < 0) {
                _tracef("BUG: problem with tparm parameter #%d of %d",
                        i + 1, data->num_actual);
                break;
            } else {
-               save_number(", %d", (int) data->param[i], 0);
+               save_number(tps, ", %d", (int) data->param[i], 0);
            }
        }
        _tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(string), TPS(out_buff));
            }
        }
        _tracef(T_CALLED("%s(%s%s)"), TPS(tname), _nc_visbuf(string), TPS(out_buff));
@@ -691,27 +758,49 @@ tparm_trace_call(const char *string, TPARM_DATA * data)
 }
 
 #else
 }
 
 #else
-#define tparm_trace_call(string, data) /* nothing */
+#define tparm_trace_call(tps, string, data)    /* nothing */
 #endif /* TRACE */
 
 #endif /* TRACE */
 
+#define init_vars(name) \
+       if (!name##_used) { \
+           name##_used = TRUE; \
+           memset(name##_vars, 0, sizeof(name##_vars)); \
+       }
+
 static NCURSES_INLINE char *
 static NCURSES_INLINE char *
-tparam_internal(const char *string, TPARM_DATA * data)
+tparam_internal(TPARM_STATE *tps, const char *string, TPARM_DATA *data)
 {
     int number;
     int len;
     int level;
     int x, y;
     int i;
 {
     int number;
     int len;
     int level;
     int x, y;
     int i;
+    const char *s;
     const char *cp = string;
     size_t len2 = strlen(cp);
     bool incremented_two = FALSE;
     const char *cp = string;
     size_t len2 = strlen(cp);
     bool incremented_two = FALSE;
-    bool termcap_hack = tparm_tc_compat(data);
-
-    tparm_trace_call(string, data);
+    bool termcap_hack = tparm_tc_compat(tps, data);
+    /*
+     * SVr4 curses stores variables 'A' to 'Z' in the TERMINAL structure (so
+     * they are initialized once to zero), and variables 'a' to 'z' on the
+     * stack in tparm, referring to the former as "static" and the latter as
+     * "dynamic".  However, it makes no check to ensure that the "dynamic"
+     * variables are initialized.
+     *
+     * Solaris xpg4 curses makes no distinction between the upper/lower, and
+     * stores the common set of 26 variables on the stack, without initializing
+     * them.
+     *
+     * In ncurses, both sets of variables are initialized on the first use.
+     */
+    bool dynamic_used = FALSE;
+    int dynamic_vars[NUM_VARS];
+
+    tparm_trace_call(tps, string, data);
 
     while ((cp - string) < (int) len2) {
        if (*cp != '%') {
 
     while ((cp - string) < (int) len2) {
        if (*cp != '%') {
-           save_char(UChar(*cp));
+           save_char(tps, UChar(*cp));
        } else {
            TPS(tparam_base) = cp++;
            cp = parse_format(cp, TPS(fmt_buff), &len);
        } else {
            TPS(tparam_base) = cp++;
            cp = parse_format(cp, TPS(fmt_buff), &len);
@@ -719,40 +808,44 @@ tparam_internal(const char *string, TPARM_DATA * data)
            default:
                break;
            case '%':
            default:
                break;
            case '%':
-               save_char('%');
+               save_char(tps, '%');
                break;
 
            case 'd':           /* FALLTHRU */
            case 'o':           /* FALLTHRU */
            case 'x':           /* FALLTHRU */
            case 'X':           /* FALLTHRU */
                break;
 
            case 'd':           /* FALLTHRU */
            case 'o':           /* FALLTHRU */
            case 'x':           /* FALLTHRU */
            case 'X':           /* FALLTHRU */
-               save_number(TPS(fmt_buff), npop(), len);
+               x = npop(tps);
+               save_number(tps, TPS(fmt_buff), x, len);
                break;
 
            case 'c':           /* FALLTHRU */
                break;
 
            case 'c':           /* FALLTHRU */
-               save_char(npop());
+               x = npop(tps);
+               save_char(tps, x);
                break;
 
 #ifdef EXP_XTERM_1005
            case 'u':
                {
                    unsigned char target[10];
                break;
 
 #ifdef EXP_XTERM_1005
            case 'u':
                {
                    unsigned char target[10];
-                   unsigned source = (unsigned) npop();
+                   unsigned source = (unsigned) npop(tps);
                    int rc = _nc_conv_to_utf8(target, source, (unsigned)
                                              sizeof(target));
                    int n;
                    for (n = 0; n < rc; ++n) {
                    int rc = _nc_conv_to_utf8(target, source, (unsigned)
                                              sizeof(target));
                    int n;
                    for (n = 0; n < rc; ++n) {
-                       save_char(target[n]);
+                       save_char(tps, target[n]);
                    }
                }
                break;
 #endif
            case 'l':
                    }
                }
                break;
 #endif
            case 'l':
-               npush((int) strlen(spop()));
+               s = spop(tps);
+               npush(tps, (int) strlen(s));
                break;
 
            case 's':
                break;
 
            case 's':
-               save_text(TPS(fmt_buff), spop(), len);
+               s = spop(tps);
+               save_text(tps, TPS(fmt_buff), s, len);
                break;
 
            case 'p':
                break;
 
            case 'p':
@@ -760,9 +853,9 @@ tparam_internal(const char *string, TPARM_DATA * data)
                i = (UChar(*cp) - '1');
                if (i >= 0 && i < NUM_PARM) {
                    if (data->p_is_s[i]) {
                i = (UChar(*cp) - '1');
                if (i >= 0 && i < NUM_PARM) {
                    if (data->p_is_s[i]) {
-                       spush(data->p_is_s[i]);
+                       spush(tps, data->p_is_s[i]);
                    } else {
                    } else {
-                       npush((int) data->param[i]);
+                       npush(tps, (int) data->param[i]);
                    }
                }
                break;
                    }
                }
                break;
@@ -771,10 +864,11 @@ tparam_internal(const char *string, TPARM_DATA * data)
                cp++;
                if (isUPPER(*cp)) {
                    i = (UChar(*cp) - 'A');
                cp++;
                if (isUPPER(*cp)) {
                    i = (UChar(*cp) - 'A');
-                   TPS(static_vars)[i] = npop();
+                   TPS(static_vars)[i] = npop(tps);
                } else if (isLOWER(*cp)) {
                    i = (UChar(*cp) - 'a');
                } else if (isLOWER(*cp)) {
                    i = (UChar(*cp) - 'a');
-                   TPS(dynamic_var)[i] = npop();
+                   init_vars(dynamic);
+                   dynamic_vars[i] = npop(tps);
                }
                break;
 
                }
                break;
 
@@ -782,16 +876,17 @@ tparam_internal(const char *string, TPARM_DATA * data)
                cp++;
                if (isUPPER(*cp)) {
                    i = (UChar(*cp) - 'A');
                cp++;
                if (isUPPER(*cp)) {
                    i = (UChar(*cp) - 'A');
-                   npush(TPS(static_vars)[i]);
+                   npush(tps, TPS(static_vars)[i]);
                } else if (isLOWER(*cp)) {
                    i = (UChar(*cp) - 'a');
                } else if (isLOWER(*cp)) {
                    i = (UChar(*cp) - 'a');
-                   npush(TPS(dynamic_var)[i]);
+                   init_vars(dynamic);
+                   npush(tps, dynamic_vars[i]);
                }
                break;
 
            case S_QUOTE:
                cp++;
                }
                break;
 
            case S_QUOTE:
                cp++;
-               npush(UChar(*cp));
+               npush(tps, UChar(*cp));
                cp++;
                break;
 
                cp++;
                break;
 
@@ -802,83 +897,95 @@ tparam_internal(const char *string, TPARM_DATA * data)
                    number = (number * 10) + (UChar(*cp) - '0');
                    cp++;
                }
                    number = (number * 10) + (UChar(*cp) - '0');
                    cp++;
                }
-               npush(number);
+               npush(tps, number);
                break;
 
            case '+':
                break;
 
            case '+':
-               npush(npop() + npop());
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x + y);
                break;
 
            case '-':
                break;
 
            case '-':
-               y = npop();
-               x = npop();
-               npush(x - y);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x - y);
                break;
 
            case '*':
                break;
 
            case '*':
-               npush(npop() * npop());
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x * y);
                break;
 
            case '/':
                break;
 
            case '/':
-               y = npop();
-               x = npop();
-               npush(y ? (x / y) : 0);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, y ? (x / y) : 0);
                break;
 
            case 'm':
                break;
 
            case 'm':
-               y = npop();
-               x = npop();
-               npush(y ? (x % y) : 0);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, y ? (x % y) : 0);
                break;
 
            case 'A':
                break;
 
            case 'A':
-               y = npop();
-               x = npop();
-               npush(y && x);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, y && x);
                break;
 
            case 'O':
                break;
 
            case 'O':
-               y = npop();
-               x = npop();
-               npush(y || x);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, y || x);
                break;
 
            case '&':
                break;
 
            case '&':
-               npush(npop() & npop());
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x & y);
                break;
 
            case '|':
                break;
 
            case '|':
-               npush(npop() | npop());
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x | y);
                break;
 
            case '^':
                break;
 
            case '^':
-               npush(npop() ^ npop());
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x ^ y);
                break;
 
            case '=':
                break;
 
            case '=':
-               y = npop();
-               x = npop();
-               npush(x == y);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x == y);
                break;
 
            case '<':
                break;
 
            case '<':
-               y = npop();
-               x = npop();
-               npush(x < y);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x < y);
                break;
 
            case '>':
                break;
 
            case '>':
-               y = npop();
-               x = npop();
-               npush(x > y);
+               y = npop(tps);
+               x = npop(tps);
+               npush(tps, x > y);
                break;
 
            case '!':
                break;
 
            case '!':
-               npush(!npop());
+               x = npop(tps);
+               npush(tps, !x);
                break;
 
            case '~':
                break;
 
            case '~':
-               npush(~npop());
+               x = npop(tps);
+               npush(tps, ~x);
                break;
 
            case 'i':
                break;
 
            case 'i':
@@ -908,7 +1015,7 @@ tparam_internal(const char *string, TPARM_DATA * data)
                break;
 
            case 't':
                break;
 
            case 't':
-               x = npop();
+               x = npop(tps);
                if (!x) {
                    /* scan forward for %e or %; at level zero */
                    cp++;
                if (!x) {
                    /* scan forward for %e or %; at level zero */
                    cp++;
@@ -967,7 +1074,7 @@ tparam_internal(const char *string, TPARM_DATA * data)
        cp++;
     }                          /* endwhile (*cp) */
 
        cp++;
     }                          /* endwhile (*cp) */
 
-    get_space((size_t) 1);
+    get_space(tps, (size_t) 1);
     TPS(out_buff)[TPS(out_used)] = '\0';
 
     if (TPS(stack_ptr) && !_nc_tparm_err) {
     TPS(out_buff)[TPS(out_used)] = '\0';
 
     if (TPS(stack_ptr) && !_nc_tparm_err) {
@@ -986,22 +1093,23 @@ tparam_internal(const char *string, TPARM_DATA * data)
 NCURSES_EXPORT(char *)
 tparm(const char *string, ...)
 {
 NCURSES_EXPORT(char *)
 tparm(const char *string, ...)
 {
+    TPARM_STATE *tps = get_tparm_state(cur_term);
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
-    TPS(tname) = "tparm";
+    tps->tname = "tparm";
 #endif /* TRACE */
 
 #endif /* TRACE */
 
-    if (tparm_setup(string, &myData) == OK) {
+    if (tparm_setup(cur_term, string, &myData) == OK) {
        va_list ap;
 
        va_start(ap, string);
        tparm_copy_valist(&myData, TRUE, ap);
        va_end(ap);
 
        va_list ap;
 
        va_start(ap, string);
        tparm_copy_valist(&myData, TRUE, ap);
        va_end(ap);
 
-       result = tparam_internal(string, &myData);
+       result = tparam_internal(tps, string, &myData);
     }
     return result;
 }
     }
     return result;
 }
@@ -1020,15 +1128,16 @@ tparm(const char *string,
       TPARM_ARG a8,
       TPARM_ARG a9)
 {
       TPARM_ARG a8,
       TPARM_ARG a9)
 {
+    TPARM_STATE *tps = get_tparm_state(cur_term);
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
-    TPS(tname) = "tparm";
+    tps->tname = "tparm";
 #endif /* TRACE */
 
 #endif /* TRACE */
 
-    if (tparm_setup(string, &myData) == OK) {
+    if (tparm_setup(cur_term, string, &myData) == OK) {
 
        myData.param[0] = a1;
        myData.param[1] = a2;
 
        myData.param[0] = a1;
        myData.param[1] = a2;
@@ -1040,7 +1149,7 @@ tparm(const char *string,
        myData.param[7] = a8;
        myData.param[8] = a9;
 
        myData.param[7] = a8;
        myData.param[8] = a9;
 
-       result = tparam_internal(string, &myData);
+       result = tparam_internal(tps, string, &myData);
     }
     return result;
 }
     }
     return result;
 }
@@ -1050,22 +1159,23 @@ tparm(const char *string,
 NCURSES_EXPORT(char *)
 tiparm(const char *string, ...)
 {
 NCURSES_EXPORT(char *)
 tiparm(const char *string, ...)
 {
+    TPARM_STATE *tps = get_tparm_state(cur_term);
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
-    TPS(tname) = "tiparm";
+    tps->tname = "tiparm";
 #endif /* TRACE */
 
 #endif /* TRACE */
 
-    if (tparm_setup(string, &myData) == OK) {
+    if (tparm_setup(cur_term, string, &myData) == OK) {
        va_list ap;
 
        va_start(ap, string);
        tparm_copy_valist(&myData, FALSE, ap);
        va_end(ap);
 
        va_list ap;
 
        va_start(ap, string);
        tparm_copy_valist(&myData, FALSE, ap);
        va_end(ap);
 
-       result = tparam_internal(string, &myData);
+       result = tparam_internal(tps, string, &myData);
     }
     return result;
 }
     }
     return result;
 }
@@ -1076,15 +1186,16 @@ tiparm(const char *string, ...)
 NCURSES_EXPORT(char *)
 _nc_tiparm(int expected, const char *string, ...)
 {
 NCURSES_EXPORT(char *)
 _nc_tiparm(int expected, const char *string, ...)
 {
+    TPARM_STATE *tps = get_tparm_state(cur_term);
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
     TPARM_DATA myData;
     char *result = NULL;
 
     _nc_tparm_err = 0;
 #ifdef TRACE
-    TPS(tname) = "_nc_tiparm";
+    tps->tname = "_nc_tiparm";
 #endif /* TRACE */
 
 #endif /* TRACE */
 
-    if (tparm_setup(string, &myData) == OK
+    if (tparm_setup(cur_term, string, &myData) == OK
        && myData.num_actual <= expected
        && myData.tparm_type == 0) {
        va_list ap;
        && myData.num_actual <= expected
        && myData.tparm_type == 0) {
        va_list ap;
@@ -1093,7 +1204,18 @@ _nc_tiparm(int expected, const char *string, ...)
        tparm_copy_valist(&myData, FALSE, ap);
        va_end(ap);
 
        tparm_copy_valist(&myData, FALSE, ap);
        va_end(ap);
 
-       result = tparam_internal(string, &myData);
+       result = tparam_internal(tps, string, &myData);
     }
     return result;
 }
     }
     return result;
 }
+
+/*
+ * Improve tic's checks by resetting the terminfo "static variables" before
+ * calling functions which may update them.
+ */
+NCURSES_EXPORT(void)
+_nc_reset_tparm(TERMINAL *term)
+{
+    TPARM_STATE *tps = get_tparm_state(term);
+    memset(TPS(static_vars), 0, sizeof(TPS(static_vars)));
+}
index 80bbf63198a5595665618b510e2f3e7d052847c8..b8eb934357a3b0ce390c5b31748edf12ecbbbb0a 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2021 Thomas E. Dickey                                     *
  * Copyright 1998-2011,2015 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * Copyright 1998-2011,2015 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -40,7 +40,7 @@
 #define USE_TERMLIB 1
 #include <build.priv.h>
 
 #define USE_TERMLIB 1
 #include <build.priv.h>
 
-MODULE_ID("$Id: make_keys.c,v 1.22 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: make_keys.c,v 1.23 2021/08/18 20:55:25 tom Exp $")
 
 #include <names.c>
 
 
 #include <names.c>
 
@@ -128,11 +128,13 @@ main(int argc, char *argv[])
 {
     static const char *prefix[] =
     {
 {
     static const char *prefix[] =
     {
-       "#ifndef NCU_KEYS_H",
-       "#define NCU_KEYS_H 1",
+       "#ifndef _INIT_KEYTRY_H",
+       "#define _INIT_KEYTRY_H 1",
        "",
        "/* This file was generated by MAKE_KEYS */",
        "",
        "",
        "/* This file was generated by MAKE_KEYS */",
        "",
+       "#include <tic.h>",
+       "",
        "#if BROKEN_LINKER",
        "static",
        "#endif",
        "#if BROKEN_LINKER",
        "static",
        "#endif",
@@ -143,7 +145,7 @@ main(int argc, char *argv[])
     {
        "\t{ 0, 0} };",
        "",
     {
        "\t{ 0, 0} };",
        "",
-       "#endif /* NCU_KEYS_H */",
+       "#endif /* _INIT_KEYTRY_H */",
        0
     };
 
        0
     };
 
index 763ddd72d82e468a41e7556c589e4d1e586f43a1..cab4757019730a01838f1254aabe92f862267b9a 100644 (file)
@@ -51,7 +51,7 @@
 #define TRACE_NUM(n)           /* nothing */
 #endif
 
 #define TRACE_NUM(n)           /* nothing */
 #endif
 
-MODULE_ID("$Id: write_entry.c,v 1.117 2021/06/26 20:43:19 tom Exp $")
+MODULE_ID("$Id: write_entry.c,v 1.118 2021/08/15 20:07:11 tom Exp $")
 
 static int total_written;
 static int total_parts;
 
 static int total_written;
 static int total_parts;
@@ -190,7 +190,7 @@ make_db_root(const char *path)
 #else
        struct stat statbuf;
 
 #else
        struct stat statbuf;
 
-       if ((rc = stat(path, &statbuf)) < 0) {
+       if ((rc = stat(path, &statbuf)) == -1) {
            rc = mkdir(path
 #ifndef _NC_WINDOWS
                       ,0777
            rc = mkdir(path
 #ifndef _NC_WINDOWS
                       ,0777
@@ -442,7 +442,7 @@ _nc_write_entry(TERMTYPE2 *const tp)
     write_file(filename, tp);
 
     if (start_time == 0) {
     write_file(filename, tp);
 
     if (start_time == 0) {
-       if (stat(filename, &statbuf) < 0
+       if (stat(filename, &statbuf) == -1
            || (start_time = statbuf.st_mtime) == 0) {
            _nc_syserr_abort("error obtaining time from %s/%s",
                             _nc_tic_dir(0), filename);
            || (start_time = statbuf.st_mtime) == 0) {
            _nc_syserr_abort("error obtaining time from %s/%s",
                             _nc_tic_dir(0), filename);
index 20f9349bd6888445c32fe5f0f628e19b56101fdd..70a9859bd6810a220ca6b6fafe8b53530c5855d1 100644 (file)
@@ -85,7 +85,7 @@
 
 #include <ctype.h>
 
 
 #include <ctype.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.310 2021/02/06 14:24:38 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.311 2021/08/16 21:51:11 tom Exp $")
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
 
 /*
  * This define controls the line-breakout optimization.  Every once in a
@@ -1325,8 +1325,8 @@ TransformLine(NCURSES_SP_DCLx int const lineno)
                newPair = GetPair(newLine[n]);
                if (oldPair != newPair
                    && unColor(oldLine[n]) == unColor(newLine[n])) {
                newPair = GetPair(newLine[n]);
                if (oldPair != newPair
                    && unColor(oldLine[n]) == unColor(newLine[n])) {
-                   if (oldPair < SP_PARM->_pair_limit
-                       && newPair < SP_PARM->_pair_limit
+                   if (oldPair < SP_PARM->_pair_alloc
+                       && newPair < SP_PARM->_pair_alloc
                        && (isSamePair(SP_PARM->_color_pairs[oldPair],
                                       SP_PARM->_color_pairs[newPair]))) {
                        SetPair(oldLine[n], GetPair(newLine[n]));
                        && (isSamePair(SP_PARM->_color_pairs[oldPair],
                                       SP_PARM->_color_pairs[newPair]))) {
                        SetPair(oldLine[n], GetPair(newLine[n]));
index c8fb4d42466f1a9220234da094e5043065f12e13..76673da658455f317aba195f7f4a9a1d802f7460 100644 (file)
  * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
  */
 
  * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
  */
 
+#ifndef _WCWIDTH_H_incl
+#define _WCWIDTH_H_incl 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ncurses_cfg.h>
+#include <ncurses_dll.h>
+
 #include <wchar.h>
 
 struct interval {
 #include <wchar.h>
 
 struct interval {
@@ -310,3 +320,9 @@ NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *pwcs, size_t n)
 
   return width;
 }
 
   return width;
 }
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _WCWIDTH_H_incl 1 */
index 9032736c25d46b7ffff9889b9f79dfa564adfa87..fa2a466ca35ef154ec86352057b7a660212254fd 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210814) unstable; urgency=low
+ncurses6 (6.2+20210821) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Aug 2021 06:38:41 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 16 Aug 2021 03:57:50 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 9032736c25d46b7ffff9889b9f79dfa564adfa87..fa2a466ca35ef154ec86352057b7a660212254fd 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210814) unstable; urgency=low
+ncurses6 (6.2+20210821) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Aug 2021 06:38:41 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 16 Aug 2021 03:57:50 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 8d0f204bdeb193f359312ac61686b0a84ce82a72..f918251697e5e5e6cd915fe64dc79d48b09fee95 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210814) unstable; urgency=low
+ncurses6 (6.2+20210821) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Aug 2021 06:38:41 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 16 Aug 2021 03:57:50 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index d15df3db584f86d85c0b0011bd83ca8220e9fbfd..c1092a8244df72c8a60c50f5c171fd0d2687cf6a 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.472 2021/08/14 10:38:41 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.473 2021/08/21 14:10:10 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "2"\r
 !define VERSION_YYYY  "2021"\r
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "2"\r
 !define VERSION_YYYY  "2021"\r
-!define VERSION_MMDD  "0814"\r
+!define VERSION_MMDD  "0821"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index d9863de9c5432fc494b964814195e70e86d4bd91..2f4f6c52cd55d0d6f90b69a3c8c735e7f6ee21c9 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20210814
+Release: 20210821
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index cf08f55a8a3fc5fec341a487d63a1a38d7a31543..52dcf5140b353ad0ef0ecc1490dca42eba7753bb 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncurses.map,v 1.53 2021/06/26 20:31:59 tom Exp $
+# $Id: ncurses.map,v 1.54 2021/08/19 23:49:21 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -1210,6 +1210,7 @@ NCURSES_TINFO_6.2.20200212 {
 
 NCURSES_TINFO_6.2.current {
        global:
 
 NCURSES_TINFO_6.2.current {
        global:
+               _nc_reset_tparm;
                _nc_safe_fopen;
                _nc_safe_open3;
                _nc_tiparm;
                _nc_safe_fopen;
                _nc_safe_open3;
                _nc_tiparm;
index bc42d7297bc891e18838f32ab46626ad2fa04a2f..419322850a59e3185e6aa5c23afa477d243392ea 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20210814
+Release: 20210821
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index ae798071cb2e2307aab838502fff02aea3023bea..d2f6fbc1fd3b0760420660cf3c9c3732c864d2f8 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncurses.sym,v 1.36 2021/06/26 20:31:59 tom Exp $
+# $Id: ncurses.sym,v 1.37 2021/08/19 23:50:26 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -176,6 +176,7 @@ _nc_read_entry_source
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
+_nc_reset_tparm
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
index 6887edf794f4af9f120b70bbfb3f4f4599fe66b4..a1615b70d970eb48e70efee72dff8cca7bba3c30 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursest.map,v 1.51 2021/06/26 20:31:59 tom Exp $
+# $Id: ncursest.map,v 1.52 2021/08/19 23:49:21 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -489,6 +489,7 @@ NCURSES_TINFO_6.2.20200212 {
 
 NCURSES_TINFO_6.2.current {
        global:
 
 NCURSES_TINFO_6.2.current {
        global:
+               _nc_reset_tparm;
                _nc_safe_fopen;
                _nc_safe_open3;
                _nc_tiparm;
                _nc_safe_fopen;
                _nc_safe_open3;
                _nc_tiparm;
index d1c5781f2db4c9177219bc4bec4347f2da2fdd96..185d24890aa916351ca5521c273d1924f8cdcb19 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20210814
+Release: 20210821
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 53964f7be3c34be00e8ab0b0a75bf10e02518ee0..f50ce3d020c9da502ec7df82cd7cfe528b5ab971 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursest.sym,v 1.40 2021/06/26 20:36:37 tom Exp $
+# $Id: ncursest.sym,v 1.41 2021/08/19 23:50:26 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -183,6 +183,7 @@ _nc_read_entry_source
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
+_nc_reset_tparm
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
index 84b8ad3008f38d256dc58e74d68c981af1b7dc8c..7da7c8828d4cd6fd262164a831b0753b96493058 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursestw.map,v 1.54 2021/06/26 20:31:59 tom Exp $
+# $Id: ncursestw.map,v 1.55 2021/08/19 23:49:21 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -495,6 +495,7 @@ NCURSES_TINFO_6.2.20200212 {
 
 NCURSES_TINFO_6.2.current {
        global:
 
 NCURSES_TINFO_6.2.current {
        global:
+               _nc_reset_tparm;
                _nc_tiparm;
                _nc_safe_fopen;
                _nc_safe_open3;
                _nc_tiparm;
                _nc_safe_fopen;
                _nc_safe_open3;
index 2322b6909548d3e323dd851716c451093964fe47..1668f409d22ed020e3abc252adbb8d59e5bf3f44 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursestw.sym,v 1.40 2021/06/26 20:31:59 tom Exp $
+# $Id: ncursestw.sym,v 1.41 2021/08/19 23:50:26 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -183,6 +183,7 @@ _nc_read_entry_source
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
+_nc_reset_tparm
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
index 5d214cde8855d1601b30ee5c1e849ea14e000daf..94383b3ca470581f2b6dbcbc3072ad23a5de388c 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursesw.map,v 1.57 2021/06/26 20:31:59 tom Exp $
+# $Id: ncursesw.map,v 1.58 2021/08/19 23:49:21 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -489,6 +489,7 @@ NCURSES_TINFO_6.2.20200212 {
 
 NCURSES_TINFO_6.2.current {
        global:
 
 NCURSES_TINFO_6.2.current {
        global:
+               _nc_reset_tparm;
                _nc_tiparm;
                _nc_safe_fopen;
                _nc_safe_open3;
                _nc_tiparm;
                _nc_safe_fopen;
                _nc_safe_open3;
index 6fbc23689c0c72c205ed2e0744edc6bead8e5b1a..a17fd794804053b6073371a5e732b1e86884abce 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursesw.sym,v 1.39 2021/06/26 20:31:59 tom Exp $
+# $Id: ncursesw.sym,v 1.40 2021/08/19 23:50:26 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -172,6 +172,7 @@ _nc_read_entry_source
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
 _nc_read_file_entry
 _nc_read_termtype
 _nc_reset_input
+_nc_reset_tparm
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
 _nc_resolve_uses
 _nc_resolve_uses2
 _nc_retrace_attr_t
index 9c0c8155be070d4b67d3f4660af9df3f5df53401..68cf32bc183d5e921f4225386a1a308d67da867a 100644 (file)
@@ -40,7 +40,7 @@
 #include <termsort.h>          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
 #include <termsort.h>          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.187 2021/06/12 22:06:55 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.188 2021/08/15 20:00:48 tom Exp $")
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
@@ -85,7 +85,7 @@ static int indent = 8;
 /* cover various ports and variants of terminfo */
 #define V_ALLCAPS      0       /* all capabilities (SVr4, XSI, ncurses) */
 #define V_SVR1         1       /* SVR1, Ultrix */
 /* cover various ports and variants of terminfo */
 #define V_ALLCAPS      0       /* all capabilities (SVr4, XSI, ncurses) */
 #define V_SVR1         1       /* SVR1, Ultrix */
-#define V_HPUX         2       /* HP/UX */
+#define V_HPUX         2       /* HP-UX */
 #define V_AIX          3       /* AIX */
 #define V_BSD          4       /* BSD */
 
 #define V_AIX          3       /* AIX */
 #define V_BSD          4       /* BSD */
 
index 283201afb913b8687ee15bd769a3fc2156e367c3..4caa6b59dea4da5b89923520362ecf89a96ce1ac 100644 (file)
@@ -49,7 +49,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.296 2021/06/26 19:44:08 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.301 2021/08/21 00:24:45 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
 
 #define STDIN_NAME "<stdin>"
 
@@ -458,7 +458,7 @@ open_input(const char *filename, char *alt_file)
 
     if (!strcmp(filename, "-")) {
        fp = copy_input(stdin, STDIN_NAME, alt_file);
 
     if (!strcmp(filename, "-")) {
        fp = copy_input(stdin, STDIN_NAME, alt_file);
-    } else if (stat(filename, &sb) < 0) {
+    } else if (stat(filename, &sb) == -1) {
        fprintf(stderr, "%s: %s %s\n", _nc_progname, filename, strerror(errno));
        ExitProgram(EXIT_FAILURE);
     } else if ((mode = (sb.st_mode & S_IFMT)) == S_IFDIR
        fprintf(stderr, "%s: %s %s\n", _nc_progname, filename, strerror(errno));
        ExitProgram(EXIT_FAILURE);
     } else if ((mode = (sb.st_mode & S_IFMT)) == S_IFDIR
@@ -1922,19 +1922,63 @@ is_user_capability(const char *name)
     return result;
 }
 
     return result;
 }
 
+static bool
+line_capability(const char *name)
+{
+    bool result = FALSE;
+    static const char *table[] =
+    {
+       "csr",                  /* change_scroll_region          */
+       "clear",                /* clear_screen                  */
+       "ed",                   /* clr_eos                       */
+       "cwin",                 /* create_window                 */
+       "cup",                  /* cursor_address                */
+       "cud1",                 /* cursor_down                   */
+       "home",                 /* cursor_home                   */
+       "mrcup",                /* cursor_mem_address            */
+       "ll",                   /* cursor_to_ll                  */
+       "cuu1",                 /* cursor_up                     */
+       "dl1",                  /* delete_line                   */
+       "hd",                   /* down_half_line                */
+       "flash",                /* flash_screen                  */
+       "ff",                   /* form_feed                     */
+       "il1",                  /* insert_line                   */
+       "nel",                  /* newline                       */
+       "dl",                   /* parm_delete_line              */
+       "cud",                  /* parm_down_cursor              */
+       "indn",                 /* parm_index                    */
+       "il",                   /* parm_insert_line              */
+       "rin",                  /* parm_rindex                   */
+       "cuu",                  /* parm_up_cursor                */
+       "mc0",                  /* print_screen                  */
+       "vpa",                  /* row_address                   */
+       "ind",                  /* scroll_forward                */
+       "ri",                   /* scroll_reverse                */
+       "hu",                   /* up_half_line                  */
+    };
+    size_t n;
+    for (n = 0; n < SIZEOF(table); ++n) {
+       if (!strcmp(name, table[n])) {
+           result = TRUE;
+           break;
+       }
+    }
+    return result;
+}
+
 /*
  * Make a quick sanity check for the parameters which are used in the given
  * strings.  If there are no "%p" tokens, then there should be no other "%"
  * markers.
  */
 static void
 /*
  * Make a quick sanity check for the parameters which are used in the given
  * strings.  If there are no "%p" tokens, then there should be no other "%"
  * markers.
  */
 static void
-check_params(TERMTYPE2 *tp, const char *name, char *value, int extended)
+check_params(TERMTYPE2 *tp, const char *name, const char *value, int extended)
 {
     int expected = expected_params(name);
     int actual = 0;
     int n;
     bool params[1 + NUM_PARM];
 {
     int expected = expected_params(name);
     int actual = 0;
     int n;
     bool params[1 + NUM_PARM];
-    char *s = value;
+    const char *s = value;
 
 #ifdef set_top_margin_parm
     if (!strcmp(name, "smgbp")
 
 #ifdef set_top_margin_parm
     if (!strcmp(name, "smgbp")
@@ -2000,10 +2044,11 @@ check_params(TERMTYPE2 *tp, const char *name, char *value, int extended)
      * may not have been fully translated.  Also, tparm does its own analysis.
      * Report differences here.
      */
      * may not have been fully translated.  Also, tparm does its own analysis.
      * Report differences here.
      */
+    _nc_reset_tparm(NULL);
     if (actual >= 0) {
        char *p_is_s[NUM_PARM];
        int popcount;
     if (actual >= 0) {
        char *p_is_s[NUM_PARM];
        int popcount;
-       int analyzed = _nc_tparm_analyze(value, p_is_s, &popcount);
+       int analyzed = _nc_tparm_analyze(NULL, value, p_is_s, &popcount);
        if (analyzed < popcount) {
            analyzed = popcount;
        }
        if (analyzed < popcount) {
            analyzed = popcount;
        }
@@ -2021,54 +2066,34 @@ check_params(TERMTYPE2 *tp, const char *name, char *value, int extended)
                _nc_warning("tparm analyzed %d parameters for %s, expected %d",
                            analyzed, name, actual);
            }
                _nc_warning("tparm analyzed %d parameters for %s, expected %d",
                            analyzed, name, actual);
            }
+       } else if (expected > 0
+                  && actual == expected
+                  && guess_tparm_type(expected, p_is_s) == Numbers) {
+           int limit = 1;
+
+           if (!strcmp(name, "setf")
+               || !strcmp(name, "setb")
+               || !strcmp(name, "setaf")
+               || !strcmp(name, "setab")) {
+               if ((limit = max_colors) > 256)
+                   limit = 256;
+           } else if (line_capability(name)) {
+               limit = 24;
+           } else if (is_user_capability(name) < 0) {
+               limit = 80;
+           }
+           for (n = 0; n < limit; ++n) {
+               _nc_reset_tparm(NULL);
+               (void) TPARM_9(value, n, n, n, n, n, n, n, n, n);
+               if (_nc_tparm_err)
+                   _nc_warning("problem%s in tparm(%s, %d, ...)",
+                               (_nc_tparm_err == 1) ? "" : "s",
+                               name, n);
+           }
        }
     }
 }
 
        }
     }
 }
 
-static bool
-line_capability(const char *name)
-{
-    bool result = FALSE;
-    static const char *table[] =
-    {
-       "csr",                  /* change_scroll_region          */
-       "clear",                /* clear_screen                  */
-       "ed",                   /* clr_eos                       */
-       "cwin",                 /* create_window                 */
-       "cup",                  /* cursor_address                */
-       "cud1",                 /* cursor_down                   */
-       "home",                 /* cursor_home                   */
-       "mrcup",                /* cursor_mem_address            */
-       "ll",                   /* cursor_to_ll                  */
-       "cuu1",                 /* cursor_up                     */
-       "dl1",                  /* delete_line                   */
-       "hd",                   /* down_half_line                */
-       "flash",                /* flash_screen                  */
-       "ff",                   /* form_feed                     */
-       "il1",                  /* insert_line                   */
-       "nel",                  /* newline                       */
-       "dl",                   /* parm_delete_line              */
-       "cud",                  /* parm_down_cursor              */
-       "indn",                 /* parm_index                    */
-       "il",                   /* parm_insert_line              */
-       "rin",                  /* parm_rindex                   */
-       "cuu",                  /* parm_up_cursor                */
-       "mc0",                  /* print_screen                  */
-       "vpa",                  /* row_address                   */
-       "ind",                  /* scroll_forward                */
-       "ri",                   /* scroll_reverse                */
-       "hu",                   /* up_half_line                  */
-    };
-    size_t n;
-    for (n = 0; n < SIZEOF(table); ++n) {
-       if (!strcmp(name, table[n])) {
-           result = TRUE;
-           break;
-       }
-    }
-    return result;
-}
-
 /*
  * Check for DEC VT100 private mode for reverse video.
  */
 /*
  * Check for DEC VT100 private mode for reverse video.
  */
@@ -2206,8 +2231,9 @@ check_1_infotocap(const char *name, NCURSES_CONST char *value, int count)
        next += strlen(next) + 1;
     }
 
        next += strlen(next) + 1;
     }
 
+    _nc_reset_tparm(NULL);
     expect = tparm_type(name);
     expect = tparm_type(name);
-    nparam = _nc_tparm_analyze(value, p_is_s, &ignored);
+    nparam = _nc_tparm_analyze(NULL, value, p_is_s, &ignored);
     actual = guess_tparm_type(nparam, p_is_s);
 
     if (expect != actual) {
     actual = guess_tparm_type(nparam, p_is_s);
 
     if (expect != actual) {
@@ -2215,6 +2241,7 @@ check_1_infotocap(const char *name, NCURSES_CONST char *value, int count)
        actual = Other;
     }
 
        actual = Other;
     }
 
+    _nc_reset_tparm(NULL);
     switch (actual) {
     case Num_Str:
        result = TPARM_2(value, numbers[1], strings[2]);
     switch (actual) {
     case Num_Str:
        result = TPARM_2(value, numbers[1], strings[2]);
@@ -2403,8 +2430,8 @@ check_infotocap(TERMTYPE2 *tp, int i, const char *value)
            || !strcmp(name, "setb")
            || !strcmp(name, "setaf")
            || !strcmp(name, "setab")) {
            || !strcmp(name, "setb")
            || !strcmp(name, "setaf")
            || !strcmp(name, "setab")) {
-           if ((limit = max_colors) > 16)
-               limit = 16;
+           if ((limit = max_colors) > 256)
+               limit = 256;
        }
        for (count = 0; count < limit; ++count) {
            char *ti_check = check_1_infotocap(name, ti_value, count);
        }
        for (count = 0; count < limit; ++count) {
            char *ti_check = check_1_infotocap(name, ti_value, count);
index 027fab9c8fbbe9f465477443788fdeae77c8fc1b..fe82d47235f5b3c0d103d4648f8f480ac487d772 100644 (file)
@@ -47,7 +47,7 @@
 #include <transform.h>
 #include <tty_settings.h>
 
 #include <transform.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: tput.c,v 1.90 2021/04/18 17:18:19 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.91 2021/08/21 00:24:45 tom Exp $")
 
 #define PUTS(s)                fputs(s, stdout)
 
 
 #define PUTS(s)                fputs(s, stdout)
 
@@ -278,7 +278,7 @@ tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
            case Other:
                /* FALLTHRU */
            default:
            case Other:
                /* FALLTHRU */
            default:
-               (void) _nc_tparm_analyze(s, p_is_s, &ignored);
+               (void) _nc_tparm_analyze(NULL, s, p_is_s, &ignored);
 #define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
                s = TPARM_9(s,
                            myParam(1),
 #define myParam(n) (p_is_s[n - 1] != 0 ? ((TPARM_ARG) strings[n]) : numbers[n])
                s = TPARM_9(s,
                            myParam(1),
index aecd342ca8334681c34637448595f8cb05ae870d..fdc8611aaf6d3862dd47cc9d56352889ccb2d6eb 100644 (file)
@@ -30,7 +30,7 @@
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
- * $Id: ditto.c,v 1.51 2021/04/17 17:39:43 tom Exp $
+ * $Id: ditto.c,v 1.52 2021/08/15 20:07:11 tom Exp $
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
@@ -182,7 +182,7 @@ open_tty(char *path)
 #else
     struct stat sb;
 
 #else
     struct stat sb;
 
-    if (stat(path, &sb) < 0)
+    if (stat(path, &sb) == -1)
        failed(path);
     if ((sb.st_mode & S_IFMT) != S_IFCHR) {
        errno = ENOTTY;
        failed(path);
     if ((sb.st_mode & S_IFMT) != S_IFCHR) {
        errno = ENOTTY;