From 8890c8f28a1db5995ef17f52a7d8c0b9cf574210 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 8 Dec 2019 02:13:02 +0000 Subject: [PATCH 1/1] ncurses 6.1 - patch 20191207 + fix a few warnings for test-package builds + add curses_trace(), to replace trace(). --- Ada95/package/debian/compat | 2 +- Ada95/package/debian/control | 2 +- NEWS | 6 +- VERSION | 2 +- dist.mk | 4 +- doc/html/man/adacurses6-config.1.html | 2 +- doc/html/man/captoinfo.1m.html | 2 +- doc/html/man/clear.1.html | 2 +- doc/html/man/curs_trace.3x.html | 139 +++++++++++++++++--------- doc/html/man/form.3x.html | 2 +- doc/html/man/infocmp.1m.html | 2 +- doc/html/man/infotocap.1m.html | 2 +- doc/html/man/menu.3x.html | 2 +- doc/html/man/ncurses.3x.html | 2 +- doc/html/man/ncurses6-config.1.html | 2 +- doc/html/man/panel.3x.html | 2 +- doc/html/man/tabs.1.html | 2 +- doc/html/man/terminfo.5.html | 2 +- doc/html/man/tic.1m.html | 2 +- doc/html/man/toe.1m.html | 2 +- doc/html/man/tput.1.html | 2 +- doc/html/man/tset.1.html | 2 +- include/curses.tail | 5 +- include/term_entry.h | 6 +- include/tic.h | 4 +- man/curs_trace.3x | 113 ++++++++++++++++----- ncurses/base/lib_freeall.c | 6 +- ncurses/curses.priv.h | 4 +- ncurses/tinfo/entries.c | 4 +- ncurses/trace/lib_trace.c | 22 +++- package/debian-mingw/changelog | 4 +- package/debian-mingw/compat | 2 +- package/debian-mingw64/changelog | 4 +- package/debian-mingw64/compat | 2 +- package/debian/changelog | 4 +- package/debian/compat | 2 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.map | 3 +- package/ncurses.spec | 2 +- package/ncurses.sym | 3 +- package/ncursest.map | 3 +- package/ncursest.spec | 2 +- package/ncursest.sym | 3 +- package/ncursestw.map | 3 +- package/ncursestw.sym | 3 +- package/ncursesw.map | 3 +- package/ncursesw.sym | 3 +- test/demo_menus.c | 8 +- test/hashtest.c | 6 +- test/lrtest.c | 8 +- test/ncurses.c | 15 ++- test/package/debian-mingw/compat | 2 +- test/package/debian-mingw/control | 2 +- test/package/debian-mingw64/compat | 2 +- test/package/debian-mingw64/control | 2 +- test/package/debian/compat | 2 +- test/package/debian/control | 4 +- test/padview.c | 6 +- test/test.priv.h | 8 +- test/testcurs.c | 4 +- test/testscanw.c | 6 +- test/view.c | 17 ++-- test/worm.c | 8 +- 64 files changed, 318 insertions(+), 185 deletions(-) diff --git a/Ada95/package/debian/compat b/Ada95/package/debian/compat index 7f8f011e..ec635144 100644 --- a/Ada95/package/debian/compat +++ b/Ada95/package/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/Ada95/package/debian/control b/Ada95/package/debian/control index 00a2e49a..030adb17 100644 --- a/Ada95/package/debian/control +++ b/Ada95/package/debian/control @@ -9,7 +9,7 @@ Homepage: https://invisible-island.net/adacurses/ Package: adacurses Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: AdaCurses - Ada95 binding for ncurses +Description: Ada95 binding for ncurses This package installs as "adacurses" to avoid conflict with other packages. This is the Ada95 binding from the ncurses distribution. . diff --git a/NEWS b/NEWS index 589465f2..b6414f80 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3412 2019/11/30 22:27:28 tom Exp $ +-- $Id: NEWS,v 1.3415 2019/12/07 23:36:25 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,10 @@ 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. +20191207 + + fix a few warnings for test-package builds + + add curses_trace(), to replace trace(). + 20191130 + add portability section to curs_getcchar manpage (prompted by discussion with Nick Black). diff --git a/VERSION b/VERSION index 91680bf7..10b83589 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20191130 +5:0:10 6.1 20191207 diff --git a/dist.mk b/dist.mk index 66f6af10..c0e1e231 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1317 2019/11/30 14:52:31 tom Exp $ +# $Id: dist.mk,v 1.1318 2019/12/07 10:19:49 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 1 -NCURSES_PATCH = 20191130 +NCURSES_PATCH = 20191207 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/doc/html/man/adacurses6-config.1.html b/doc/html/man/adacurses6-config.1.html index ec53fe18..08ab84a5 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -125,7 +125,7 @@

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index f981ad11..1b004380 100644
--- a/doc/html/man/captoinfo.1m.html
+++ b/doc/html/man/captoinfo.1m.html
@@ -198,7 +198,7 @@
 

SEE ALSO

        infocmp(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index 53a70776..1358cdd6 100644
--- a/doc/html/man/clear.1.html
+++ b/doc/html/man/clear.1.html
@@ -148,7 +148,7 @@
 

SEE ALSO

        tput(1), terminfo(5)
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/curs_trace.3x.html b/doc/html/man/curs_trace.3x.html
index ebd47f86..77ecbcce 100644
--- a/doc/html/man/curs_trace.3x.html
+++ b/doc/html/man/curs_trace.3x.html
@@ -1,6 +1,6 @@
 
 
 
@@ -46,15 +46,15 @@
 
 
 

NAME

-       trace, _tracef, _traceattr, _traceattr2, _tracecchar_t, _tracecchar_t2,
-       _tracechar, _tracechtype, _tracechtype2, _nc_tracebits, _tracedump,
-       _tracemouse - curses debugging routines
+       curses_trace, trace, _tracef, _traceattr, _traceattr2, _tracecchar_t,
+       _tracecchar_t2, _tracechar, _tracechtype, _tracechtype2, _nc_tracebits,
+       _tracedump, _tracemouse - curses debugging routines
 
 
 

SYNOPSIS

        #include <curses.h>
 
-       void trace(const unsigned int param);
+       unsigned curses_trace(const unsigned param);
 
        void _tracef(const char *format, ...);
 
@@ -70,46 +70,64 @@
        char *_nc_tracebits(void);
        char *_tracemouse(const MEVENT *event);
 
+       /* deprecated */
+       void trace(const unsigned int param);
+
 
 

DESCRIPTION

-       The  trace  routines  are  used for debugging the ncurses libraries, as
-       well as applications which use the ncurses libraries.  These  functions
-       are  normally available only with the debugging library e.g., libncurs-
-       es_g.a, but may be compiled into any model (shared, static, profile) by
-       defining  the  symbol  TRACE.   Additionally,  some  functions are only
-       available with the wide-character configuration of the libraries.
+       The curses trace routines are used for debugging the ncurses libraries,
+       as well as applications which use the ncurses libraries.  Some  limita-
+       tions apply:
+
+       o   Aside from curses_trace, the other functions are normally available
+           only with the debugging library e.g., libncurses_g.a.
+
+           All of the trace functions may be compiled into any model  (shared,
+           static, profile) by defining the symbol TRACE.
+
+       o   Additionally,  the  functions  which use cchar_t are only available
+           with the wide-character configuration of the libraries.
 
 
 

Functions

        The principal parts of this interface are
 
-       o   trace, which selectively enables different tracing features, and
+       o   curses_trace, which selectively enables different tracing features,
+           and
 
        o   _tracef, which writes formatted data to the trace file.
 
-       Calling trace with a nonzero parameter creates the file  trace  in  the
-       current  directory  for output.  If the file already exists, no tracing
-       is done.
+           The other functions either return a pointer to a string-area (allo-
+           cated by the corresponding function), or return no value  (such  as
+           _tracedump,  which  implements  the  screen dump for TRACE_UPDATE).
+           The caller should not free these strings, since the  allocation  is
+           reused on successive calls.  To work around the problem of a single
+           string-area per  function,  some  use  a  buffer-number  parameter,
+           telling the library to allocate additional string-areas.
+
+       The curses_trace function is always available, whether or not the other
+       trace functions are available:
+
+       o   If tracing is available, calling curses_trace with a nonzero param-
+           eter updates the trace mask, and returns the previous trace mask.
 
-       The other functions either return a pointer to a string-area (allocated
-       by the corresponding function), or return no value (such as _tracedump,
-       which implements the screen dump for TRACE_UPDATE).  The caller  should
-       not  free  these  strings, since the allocation is reused on successive
-       calls.  To work around the problem of a single  string-area  per  func-
-       tion,  some use a buffer-number parameter, telling the library to allo-
-       cate additional string-areas.
+           When the trace mask is nonzero, ncurses creates the file "trace" in
+           the current directory for output.  If the file already  exists,  no
+           tracing is done.
+
+       o   If tracing is not available, curses_trace returns zero (0).
 
 
 

Trace Parameter

-       The trace parameter is  formed  by  OR'ing  values  from  the  list  of
+       The  trace  parameter  is  formed  by  OR'ing  values  from the list of
        TRACE_xxx definitions in <curses.h>.  These include:
 
        TRACE_DISABLE
             turn off tracing by passing a zero parameter.
 
-            The  library flushes the output file, but retains an open file-de-
-            scriptor to the trace file so that it can resume tracing later  if
-            a nonzero parameter is passed to the trace function.
+            The library flushes the output file, but retains an open  file-de-
+            scriptor  to the trace file so that it can resume tracing later if
+            a nonzero parameter is passed to the curses_trace function.
 
        TRACE_TIMES
             trace user and system times of updates.
@@ -127,11 +145,11 @@
             trace all character outputs.
 
        TRACE_ORDINARY
-            trace  all  update  actions.   The old and new screen contents are
+            trace all update actions.  The old and  new  screen  contents  are
             written to the trace file for each refresh.
 
        TRACE_CALLS
-            trace all curses calls.  The parameters for each call are  traced,
+            trace  all curses calls.  The parameters for each call are traced,
             as well as return values.
 
        TRACE_VIRTPUT
@@ -158,14 +176,14 @@
        TRACE_MAXIMUM
             maximum trace level, enables all of the separate trace features.
 
-       Some  tracing  features  are  enabled  whenever  the trace parameter is
-       nonzero.  Some features overlap.  The specific  names  are  used  as  a
+       Some tracing features are enabled whenever the  curses_trace  parameter
+       is  nonzero.   Some features overlap.  The specific names are used as a
        guideline.
 
 
 

Initialization

-       These  functions  check  the NCURSES_TRACE environment variable, to set
-       the tracing feature as if trace was called:
+       These functions check the NCURSES_TRACE environment  variable,  to  set
+       the tracing feature as if curses_trace was called:
 
            filter, initscr, new_prescr, newterm, nofilter, restartterm,
            ripoffline, setupterm, slk_init, tgetent, use_env,
@@ -173,38 +191,65 @@
 
 
 

Command-line Utilities

-       The command-line utilities such as  tic(1)  provide  a  verbose  option
-       which  extends  the  set  of messages written using the trace function.
-       Both of these (-v and trace) use the same variable (_nc_tracing), which
-       determines the messages which are written.
-
-       Because  the  command-line  utilities may call initialization functions
-       such as setupterm, tgetent or use_extended_names, some of their  debug-
-       ging  output may be directed to the trace file if the NCURSES_TRACE en-
+       The  command-line  utilities  such  as  tic(1) provide a verbose option
+       which extends the set of messages written using the curses_trace  func-
+       tion.   Both  of  these  (-v  and  curses_trace)  use the same variable
+       (_nc_tracing), which determines the messages which are written.
+
+       Because the command-line utilities may  call  initialization  functions
+       such  as setupterm, tgetent or use_extended_names, some of their debug-
+       ging output may be directed to the trace file if the NCURSES_TRACE  en-
        vironment variable is set:
 
        o   messages produced in the utility are written to the standard error.
 
        o   messages produced by the underlying library are written to trace.
 
-       If ncurses is built without tracing, none of the latter  are  produced,
+       If  ncurses  is built without tracing, none of the latter are produced,
        and fewer diagnostics are provided by the command-line utilities.
 
 
 

RETURN VALUE

-       Routines  which return a value are designed to be used as parameters to
+       Routines which return a value are designed to be used as parameters  to
        the _tracef routine.
 
 
 

PORTABILITY

-       These functions are not part of the XSI interface.  Some  other  curses
-       implementations  are  known to have similar, undocumented features, but
-       they are not compatible with ncurses.
+       These  functions  are not part of the XSI interface.  Some other curses
+       implementations are known to have similar features, but  they  are  not
+       compatible with ncurses:
+
+       o   SVr4  provided  traceon  and traceoff, to control whether debugging
+           information was written to the "trace" file.  While  the  functions
+           were  always  available, this feature was only enabled if DEBUG was
+           defined when building the library.
+
+           The SVr4 tracing feature is undocumented.
+
+       o   PDCurses provides traceon and traceoff, which (like SVr4)  are  al-
+           ways  available, and enable tracing to the "trace" file only when a
+           debug-library is built.
 
-       A few functions are not provided when symbol versioning is used:
+           PDCurses has a short description of these functions,  with  a  note
+           that  they are not present in X/Open Curses, ncurses or NetBSD.  It
+           does not mention SVr4, but the functions'  inclusion  in  a  header
+           file section labeled "Quasi-standard" hints at the origin.
+
+       o   NetBSD  does  not  provide functions for enabling/disabling traces.
+           It  uses  environment   variables   CURSES_TRACE_MASK   and   CURS-
+           ES_TRACE_FILE  to  determine  what is traced, and where the results
+           are written.  This is available only when a debug-library is built.
+
+           The NetBSD tracing feature is undocumented.
+
+       A few ncurses functions are not  provided  when  symbol  versioning  is
+       used:
 
            _nc_tracebits, _tracedump, _tracemouse
 
+       The  original  trace routine was deprecated because it often conflicted
+       with application names.
+
 
 

SEE ALSO

        curses(3x).
diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
index 2024a71e..917df445 100644
--- a/doc/html/man/form.3x.html
+++ b/doc/html/man/form.3x.html
@@ -246,7 +246,7 @@
        curses(3x)  and  related  pages  whose names begin "form_" for detailed
        descriptions of the entry points.
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
index 4a407d89..62d84873 100644
--- a/doc/html/man/infocmp.1m.html
+++ b/doc/html/man/infocmp.1m.html
@@ -512,7 +512,7 @@
 
        https://invisible-island.net/ncurses/tctest.html
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 

AUTHOR

diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
index 3aa5f275..7ccc743d 100644
--- a/doc/html/man/infotocap.1m.html
+++ b/doc/html/man/infotocap.1m.html
@@ -90,7 +90,7 @@
 

SEE ALSO

        curses(3x), tic(1m), infocmp(1m), terminfo(5)
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 

AUTHOR

diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
index af724a3c..6bd6e683 100644
--- a/doc/html/man/menu.3x.html
+++ b/doc/html/man/menu.3x.html
@@ -221,7 +221,7 @@
        curses(3x)  and  related  pages  whose names begin "menu_" for detailed
        descriptions of the entry points.
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
index 7386b7e1..2f792e7e 100644
--- a/doc/html/man/ncurses.3x.html
+++ b/doc/html/man/ncurses.3x.html
@@ -59,7 +59,7 @@
        method of updating  character  screens  with  reasonable  optimization.
        This  implementation  is  "new  curses"  (ncurses)  and is the approved
        replacement for 4.4BSD classic curses,  which  has  been  discontinued.
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
        The  ncurses  library emulates the curses library of System V Release 4
        UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
index a5ae6016..eb222cad 100644
--- a/doc/html/man/ncurses6-config.1.html
+++ b/doc/html/man/ncurses6-config.1.html
@@ -112,7 +112,7 @@
 

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
index 02b6a31e..60ffea23 100644
--- a/doc/html/man/panel.3x.html
+++ b/doc/html/man/panel.3x.html
@@ -204,7 +204,7 @@
 

SEE ALSO

        curses(3x), curs_variables(3x),
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 

AUTHOR

diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
index 24481d01..82bcf4e0 100644
--- a/doc/html/man/tabs.1.html
+++ b/doc/html/man/tabs.1.html
@@ -205,7 +205,7 @@
 

SEE ALSO

        tset(1), infocmp(1m), curses(3x), terminfo(5).
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index 44be6e63..6d485950 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -103,7 +103,7 @@
        have, by specifying how to perform screen operations, and by specifying
        padding requirements and initialization sequences.
 
-       This manual describes ncurses version 6.1 (patch 20191130).
+       This manual describes ncurses version 6.1 (patch 20191207).
 
 
 

Terminfo Entry Syntax

diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index 9f668c0e..afb04dda 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -460,7 +460,7 @@
        infocmp(1m),   captoinfo(1m),   infotocap(1m),   toe(1m),   curses(3x),
        term(5).  terminfo(5).  user_caps(5).
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 

AUTHOR

diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index 4af0db2f..d4944f7b 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -170,7 +170,7 @@
        tic(1m), infocmp(1m), captoinfo(1m),  infotocap(1m),  curses(3x),  ter-
        minfo(5).
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index 2a787002..65758db9 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -522,7 +522,7 @@
 

SEE ALSO

        clear(1), stty(1), tabs(1), tset(1), terminfo(5), curs_termcap(3x).
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index 2ea928cf..8be2c86a 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -389,7 +389,7 @@
        csh(1),  sh(1),  stty(1),   curs_terminfo(3x),   tty(4),   terminfo(5),
        ttys(5), environ(7)
 
-       This describes ncurses version 6.1 (patch 20191130).
+       This describes ncurses version 6.1 (patch 20191207).
 
 
 
diff --git a/include/curses.tail b/include/curses.tail
index 831a8f4c..b44b3d0e 100644
--- a/include/curses.tail
+++ b/include/curses.tail
@@ -1,4 +1,4 @@
-/* $Id: curses.tail,v 1.23 2016/02/13 16:37:45 tom Exp $ */
+/* $Id: curses.tail,v 1.24 2019/12/07 16:10:32 tom Exp $ */
 /*
  * vile:cmode:
  * This file is part of ncurses, designed to be appended after curses.h.in
@@ -142,7 +142,8 @@ extern NCURSES_EXPORT(char *) _tracecchar_t2 (int, const cchar_t *);
 #define _tracech_t		_tracechtype
 #define _tracech_t2		_tracechtype2
 #endif
-extern NCURSES_EXPORT(void) trace (const unsigned int);
+extern NCURSES_EXPORT(void) trace (const unsigned) GCC_DEPRECATED("use curses_trace");
+extern NCURSES_EXPORT(unsigned) curses_trace (const unsigned);
 
 /* trace masks */
 #define TRACE_DISABLE	0x0000	/* turn off tracing */
diff --git a/include/term_entry.h b/include/term_entry.h
index 1571b17f..513bd97d 100644
--- a/include/term_entry.h
+++ b/include/term_entry.h
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +32,7 @@
  *     and: Thomas E. Dickey                        1998-on                 *
  ****************************************************************************/
 
-/* $Id: term_entry.h,v 1.57 2018/05/26 13:50:53 tom Exp $ */
+/* $Id: term_entry.h,v 1.58 2019/12/07 16:11:15 tom Exp $ */
 
 /*
  *	term_entry.h -- interface to entry-manipulation code
@@ -208,7 +208,7 @@ extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
 #endif /* NCURSES_INTERNALS */
 
 /*
- * These entrypoints are used by tack.
+ * These entrypoints were used by tack before 1.08.
  */
 
 #undef  NCURSES_TACK_1_08
diff --git a/include/tic.h b/include/tic.h
index 66252aec..f878df09 100644
--- a/include/tic.h
+++ b/include/tic.h
@@ -33,7 +33,7 @@
  ****************************************************************************/
 
 /*
- * $Id: tic.h,v 1.79 2019/07/20 20:19:54 tom Exp $
+ * $Id: tic.h,v 1.80 2019/12/07 16:05:22 tom Exp $
  *	tic.h - Global variables and structures for the terminfo compiler.
  */
 
@@ -361,7 +361,7 @@ extern NCURSES_EXPORT(int) _nc_tic_written (void);
 #endif /* NCURSES_INTERNALS */
 
 /*
- * These entrypoints are used by tack.
+ * These entrypoints were used by tack before 1.08.
  */
 
 #undef  NCURSES_TACK_1_08
diff --git a/man/curs_trace.3x b/man/curs_trace.3x
index 792b7e95..186601c9 100644
--- a/man/curs_trace.3x
+++ b/man/curs_trace.3x
@@ -1,5 +1,5 @@
 .\"***************************************************************************
-.\" Copyright (c) 2000-2016,2017 Free Software Foundation, Inc.              *
+.\" Copyright (c) 2000-2017,2019 Free Software Foundation, Inc.              *
 .\"                                                                          *
 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
 .\" copy of this software and associated documentation files (the            *
@@ -26,7 +26,11 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_trace.3x,v 1.19 2017/11/18 23:47:37 tom Exp $
+.\" $Id: curs_trace.3x,v 1.20 2019/12/07 18:55:02 tom Exp $
+.ie \n(.g .ds `` \(lq
+.el       .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el       .ds '' ''
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
@@ -35,6 +39,7 @@
 .na
 .hy 0
 .SH NAME
+\fBcurses_trace\fR,
 \fBtrace\fR,
 \fB_tracef\fR,
 \fB_traceattr\fR,
@@ -52,7 +57,7 @@
 .SH SYNOPSIS
 \fB#include \fR
 .sp
-\fBvoid trace(const unsigned int \fP\fIparam\fP\fB);\fR
+\fBunsigned curses_trace(const unsigned \fP\fIparam\fP\fB);\fR
 .sp
 \fBvoid _tracef(const char *\fP\fIformat\fP\fB, ...);\fR
 .sp
@@ -75,34 +80,54 @@
 \fBchar *_nc_tracebits(void);\fR
 .br
 \fBchar *_tracemouse(const MEVENT *\fP\fIevent\fP\fB);\fR
+.sp
+/* deprecated */
+.br
+\fBvoid trace(const unsigned int \fP\fIparam\fP\fB);\fR
 .SH DESCRIPTION
-The \fBtrace\fR routines are used for debugging the ncurses libraries,
+The \fIcurses trace\fR routines are used for debugging the ncurses libraries,
 as well as applications which use the ncurses libraries.
-These functions are normally available only with the debugging library
-e.g., \fIlibncurses_g.a\fR, but may be compiled into any model (shared, static,
+Some limitations apply:
+.bP
+Aside from \fBcurses_trace\fP,
+the other functions are normally available only with the debugging library
+e.g., \fIlibncurses_g.a\fR.
+.IP
+All of the trace functions may be compiled into any model (shared, static,
 profile) by defining the symbol \fBTRACE\fR.
-Additionally, some functions are only available with the wide-character
-configuration of the libraries.
+.bP
+Additionally, the functions which use \fBcchar_t\fP
+are only available with the wide-character configuration of the libraries.
 .SS Functions
 The principal parts of this interface are
 .bP
-\fBtrace\fR, which selectively enables different tracing features, and
+\fBcurses_trace\fR, which selectively enables different tracing features, and
 .bP
 \fB_tracef\fR, which writes formatted data to the \fItrace\fR file.
-.PP
-Calling \fBtrace\fR with a nonzero parameter creates the file \fBtrace\fR
-in the current directory for output.
-If the file already exists, no tracing is done.
-.PP
+.IP
 The other functions either return a pointer to a string-area
-(allocated by the corresponding function),
-or return no value (such as \fB_tracedump\fP, which implements the
-screen dump for \fBTRACE_UPDATE\fP).
-The caller should not free these
-strings, since the allocation is reused on successive calls.
+(allocated by the corresponding function), or return no value
+(such as \fB_tracedump\fP,
+which implements the screen dump for \fBTRACE_UPDATE\fP).
+The caller should not free these strings,
+since the allocation is reused on successive calls.
 To work around the problem of a single string-area per function,
 some use a buffer-number parameter, telling the library to allocate
 additional string-areas.
+.PP
+The \fBcurses_trace\fR function is always available,
+whether or not the other trace functions are available:
+.bP
+If tracing is available,
+calling \fBcurses_trace\fR with a nonzero parameter
+updates the trace mask,
+and returns the previous trace mask.
+.IP
+When the trace mask is nonzero,
+ncurses creates the file \*(``trace\*('' in the current directory for output.
+If the file already exists, no tracing is done.
+.bP
+If tracing is not available, \fBcurses_trace\fP returns zero (0).
 .SS Trace Parameter
 The trace parameter is formed by OR'ing
 values from the list of \fBTRACE_\fP\fIxxx\fR definitions in \fB\fR.
@@ -114,7 +139,7 @@ turn off tracing by passing a zero parameter.
 The library flushes the output file,
 but retains an open file-descriptor to the trace file
 so that it can resume tracing later if a nonzero parameter is passed
-to the \fBtrace\fP function.
+to the \fBcurses_trace\fP function.
 .TP 5
 .B TRACE_TIMES
 trace user and system times of updates.
@@ -164,13 +189,13 @@ trace changes to video attributes and colors.
 .B TRACE_MAXIMUM
 maximum trace level, enables all of the separate trace features.
 .PP
-Some tracing features are enabled whenever the \fBtrace\fR parameter
+Some tracing features are enabled whenever the \fBcurses_trace\fR parameter
 is nonzero.
 Some features overlap.
 The specific names are used as a guideline.
 .SS Initialization
 These functions check the \fBNCURSES_TRACE\fP environment variable,
-to set the tracing feature as if \fBtrace\fP was called:
+to set the tracing feature as if \fBcurses_trace\fP was called:
 .RS 4
 .PP
 .na
@@ -194,8 +219,8 @@ use_tioctl
 .SS Command-line Utilities
 .PP
 The command-line utilities such as \fBtic\fP(1) provide a verbose option
-which extends the set of messages written using the \fBtrace\fP function.
-Both of these (\fB\-v\fP and \fBtrace\fP)
+which extends the set of messages written using the \fBcurses_trace\fP function.
+Both of these (\fB\-v\fP and \fBcurses_trace\fP)
 use the same variable (\fB_nc_tracing\fP),
 which determines the messages which are written.
 .PP
@@ -216,15 +241,49 @@ to the \fB_tracef\fR routine.
 .SH PORTABILITY
 These functions are not part of the XSI interface.
 Some other curses implementations are known to
-have similar, undocumented features,
-but they are not compatible with ncurses.
+have similar features,
+but they are not compatible with ncurses:
+.bP
+SVr4 provided \fBtraceon\fP and \fBtraceoff\fP,
+to control whether debugging information was written
+to the \*(``trace\*('' file.
+While the functions were always available,
+this feature was only enabled
+if \fBDEBUG\fP was defined when building the library.
+.IP
+The SVr4 tracing feature is undocumented.
+.bP
+PDCurses provides \fBtraceon\fP and \fBtraceoff\fP,
+which (like SVr4) are always available,
+and enable tracing
+to the \*(``trace\*('' file
+only when a debug-library is built.
+.IP
+PDCurses has a short description of these functions,
+with a note that they are not present in X/Open Curses,
+ncurses or NetBSD.
+It does not mention SVr4,
+but the functions' inclusion in a header file section
+labeled \*(``Quasi-standard\*('' hints at the origin.
+.bP
+NetBSD does not provide functions for enabling/disabling traces.
+It uses environment variables
+\fBCURSES_TRACE_MASK\fP and
+\fBCURSES_TRACE_FILE\fP to determine what is traced,
+and where the results are written.
+This is available only when a debug-library is built.
+.IP
+The NetBSD tracing feature is undocumented.
 .PP
-A few functions are not provided when symbol versioning is used:
+A few ncurses functions are not provided when symbol versioning is used:
 .RS 4
 .PP
 _nc_tracebits,
 _tracedump,
 _tracemouse
 .RE
+.PP
+The original \fBtrace\fP routine was deprecated because
+it often conflicted with application names.
 .SH SEE ALSO
 \fBcurses\fR(3X).
diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c
index 75c3ec3e..d2d5870e 100644
--- a/ncurses/base/lib_freeall.c
+++ b/ncurses/base/lib_freeall.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -39,7 +39,7 @@
 extern int malloc_errfd;	/* FIXME */
 #endif
 
-MODULE_ID("$Id: lib_freeall.c,v 1.69 2018/03/01 15:02:12 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.70 2019/12/07 20:28:03 tom Exp $")
 
 /*
  * Free all ncurses data.  This is used for testing only (there's no practical
@@ -150,7 +150,7 @@ NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
     NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
     NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
 #ifdef TRACE
-    trace(0);			/* close trace file, freeing its setbuf */
+    curses_trace(0);		/* close trace file, freeing its setbuf */
     {
 	static va_list fake;
 	free(_nc_varargs("?", fake));
diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
index f619c5c9..5c9edb42 100644
--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.625 2019/07/28 18:32:05 tom Exp $
+ * $Id: curses.priv.h,v 1.626 2019/12/07 20:08:06 tom Exp $
  *
  *	curses.priv.h
  *
@@ -1771,7 +1771,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
 	if ((_nc_tracing & TRACE_MAXIMUM) == 0) { \
 	    int t = _nc_getenv_num("NCURSES_TRACE"); \
 	    if (t >= 0) \
-		trace((unsigned) t); \
+		curses_trace((unsigned) t); \
 	}
 #else
 #define START_TRACE() /* nothing */
diff --git a/ncurses/tinfo/entries.c b/ncurses/tinfo/entries.c
index 0f86cab3..219ec3d1 100644
--- a/ncurses/tinfo/entries.c
+++ b/ncurses/tinfo/entries.c
@@ -37,7 +37,7 @@
 
 #include 
 
-MODULE_ID("$Id: entries.c,v 1.27 2019/03/09 23:41:08 tom Exp $")
+MODULE_ID("$Id: entries.c,v 1.28 2019/12/07 20:28:55 tom Exp $")
 
 /****************************************************************************
  *
@@ -148,7 +148,7 @@ _nc_leaks_tinfo(void)
 
 #ifdef TRACE
     T((T_RETURN("")));
-    trace(0);
+    curses_trace(0);
     _nc_trace_buf(-1, (size_t) 0);
 #endif
 
diff --git a/ncurses/trace/lib_trace.c b/ncurses/trace/lib_trace.c
index 717c7da1..7e2ca854 100644
--- a/ncurses/trace/lib_trace.c
+++ b/ncurses/trace/lib_trace.c
@@ -47,7 +47,7 @@
 
 #include 
 
-MODULE_ID("$Id: lib_trace.c,v 1.92 2019/03/23 23:47:16 tom Exp $")
+MODULE_ID("$Id: lib_trace.c,v 1.94 2019/12/07 22:32:36 tom Exp $")
 
 NCURSES_EXPORT_VAR(unsigned) _nc_tracing = 0; /* always define this */
 
@@ -91,10 +91,14 @@ NCURSES_EXPORT_VAR(long) _nc_outchars = 0;
 #define MyPath		_nc_globals.trace_fname
 #define MyLevel		_nc_globals.trace_level
 #define MyNested	_nc_globals.nested_tracef
+#endif /* TRACE */
 
-NCURSES_EXPORT(void)
-trace(const unsigned int tracelevel)
+NCURSES_EXPORT(unsigned)
+curses_trace(unsigned tracelevel)
 {
+    unsigned result;
+#if defined(TRACE)
+    result = _nc_tracing;
     if ((MyFP == 0) && tracelevel) {
 	MyInit = TRUE;
 	if (MyFD >= 0) {
@@ -146,6 +150,18 @@ trace(const unsigned int tracelevel)
 	_nc_tracing = tracelevel;
 	_tracef("tracelevel=%#x", tracelevel);
     }
+#else
+    (void) tracelevel;
+    result = 0;
+#endif
+    return result;
+}
+
+#if defined(TRACE)
+NCURSES_EXPORT(void)
+trace(const unsigned int tracelevel)
+{
+    curses_trace(tracelevel);
 }
 
 static void
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index 13ce4d8b..8c43494d 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20191130) unstable; urgency=low
+ncurses6 (6.1+20191207) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 30 Nov 2019 09:52:31 -0500
+ -- Thomas E. Dickey   Sat, 07 Dec 2019 05:19:49 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw/compat b/package/debian-mingw/compat
index 7f8f011e..ec635144 100644
--- a/package/debian-mingw/compat
+++ b/package/debian-mingw/compat
@@ -1 +1 @@
-7
+9
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index 13ce4d8b..8c43494d 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20191130) unstable; urgency=low
+ncurses6 (6.1+20191207) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 30 Nov 2019 09:52:31 -0500
+ -- Thomas E. Dickey   Sat, 07 Dec 2019 05:19:49 -0500
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw64/compat b/package/debian-mingw64/compat
index 7f8f011e..ec635144 100644
--- a/package/debian-mingw64/compat
+++ b/package/debian-mingw64/compat
@@ -1 +1 @@
-7
+9
diff --git a/package/debian/changelog b/package/debian/changelog
index b89024b7..acf2e78e 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20191130) unstable; urgency=low
+ncurses6 (6.1+20191207) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sat, 30 Nov 2019 09:52:31 -0500
+ -- Thomas E. Dickey   Sat, 07 Dec 2019 05:19:49 -0500
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
diff --git a/package/debian/compat b/package/debian/compat
index 7f8f011e..ec635144 100644
--- a/package/debian/compat
+++ b/package/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index c47423d6..f5e45769 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.363 2019/11/30 14:52:31 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.364 2019/12/07 10:19:49 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "1"
 !define VERSION_YYYY  "2019"
-!define VERSION_MMDD  "1130"
+!define VERSION_MMDD  "1207"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index ed7b91f5..40172e69 100644
--- a/package/mingw-ncurses.spec
+++ b/package/mingw-ncurses.spec
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.1
-Release: 20191130
+Release: 20191207
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.map b/package/ncurses.map
index 85230f6c..06a18738 100644
--- a/package/ncurses.map
+++ b/package/ncurses.map
@@ -1,4 +1,4 @@
-# $Id: ncurses.map,v 1.47 2019/05/04 22:35:46 tom Exp $
+# $Id: ncurses.map,v 1.48 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -1198,6 +1198,7 @@ NCURSES_TINFO_6.1.current {
 		_nc_find_user_entry;
 		_nc_fmt_funcptr;
 		_nc_wacs_width;
+		curses_trace;
 	local:
 		_*;
 } NCURSES_TINFO_6.1.20171230;
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 3f20cce3..9aebd1c4 100644
--- a/package/ncurses.spec
+++ b/package/ncurses.spec
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.1
-Release: 20191130
+Release: 20191207
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncurses.sym b/package/ncurses.sym
index 76e6c0f2..33ea3176 100644
--- a/package/ncurses.sym
+++ b/package/ncurses.sym
@@ -1,4 +1,4 @@
-# $Id: ncurses.sym,v 1.33 2019/05/04 21:54:44 tom Exp $
+# $Id: ncurses.sym,v 1.34 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -295,6 +295,7 @@ current_item
 curs_set
 curs_set_sp
 curscr
+curses_trace
 curses_version
 data_ahead
 data_behind
diff --git a/package/ncursest.map b/package/ncursest.map
index 838ee7cf..2f0ebf41 100644
--- a/package/ncursest.map
+++ b/package/ncursest.map
@@ -1,4 +1,4 @@
-# $Id: ncursest.map,v 1.45 2019/05/04 22:36:26 tom Exp $
+# $Id: ncursest.map,v 1.46 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -483,6 +483,7 @@ NCURSES_TINFO_6.1.current {
 		_nc_find_user_entry;
 		_nc_fmt_funcptr;
 		_nc_wacs_width;
+		curses_trace;
 	local:
 		_*;
 } NCURSES_TINFO_6.1.20171230;
diff --git a/package/ncursest.spec b/package/ncursest.spec
index b3881b01..ee17e3b5 100644
--- a/package/ncursest.spec
+++ b/package/ncursest.spec
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.1
-Release: 20191130
+Release: 20191207
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/package/ncursest.sym b/package/ncursest.sym
index f9ba0dde..e137cde4 100644
--- a/package/ncursest.sym
+++ b/package/ncursest.sym
@@ -1,4 +1,4 @@
-# $Id: ncursest.sym,v 1.37 2019/05/04 22:29:26 tom Exp $
+# $Id: ncursest.sym,v 1.38 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -304,6 +304,7 @@ current_field
 current_item
 curs_set
 curs_set_sp
+curses_trace
 curses_version
 data_ahead
 data_behind
diff --git a/package/ncursestw.map b/package/ncursestw.map
index 836c64a2..247df944 100644
--- a/package/ncursestw.map
+++ b/package/ncursestw.map
@@ -1,4 +1,4 @@
-# $Id: ncursestw.map,v 1.47 2019/05/04 22:36:56 tom Exp $
+# $Id: ncursestw.map,v 1.48 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -489,6 +489,7 @@ NCURSES_TINFO_6.1.current {
 		_nc_find_user_entry;
 		_nc_fmt_funcptr;
 		_nc_wacs_width;
+		curses_trace;
 	local:
 		_*;
 } NCURSES_TINFO_6.1.20171230;
diff --git a/package/ncursestw.sym b/package/ncursestw.sym
index f5d1ca45..ab655d49 100644
--- a/package/ncursestw.sym
+++ b/package/ncursestw.sym
@@ -1,4 +1,4 @@
-# $Id: ncursestw.sym,v 1.36 2019/05/04 22:29:12 tom Exp $
+# $Id: ncursestw.sym,v 1.37 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -320,6 +320,7 @@ current_field
 current_item
 curs_set
 curs_set_sp
+curses_trace
 curses_version
 data_ahead
 data_behind
diff --git a/package/ncursesw.map b/package/ncursesw.map
index 6474c689..356d6c9b 100644
--- a/package/ncursesw.map
+++ b/package/ncursesw.map
@@ -1,4 +1,4 @@
-# $Id: ncursesw.map,v 1.50 2019/05/04 22:37:14 tom Exp $
+# $Id: ncursesw.map,v 1.51 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -483,6 +483,7 @@ NCURSES_TINFO_6.1.current {
 		_nc_find_user_entry;
 		_nc_fmt_funcptr;
 		_nc_wacs_width;
+		curses_trace;
 	local:
 		_*;
 } NCURSES_TINFO_6.1.20171230;
diff --git a/package/ncursesw.sym b/package/ncursesw.sym
index 65f09c96..6c254d03 100644
--- a/package/ncursesw.sym
+++ b/package/ncursesw.sym
@@ -1,4 +1,4 @@
-# $Id: ncursesw.sym,v 1.35 2019/05/04 21:54:38 tom Exp $
+# $Id: ncursesw.sym,v 1.36 2019/12/07 18:03:20 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -308,6 +308,7 @@ current_item
 curs_set
 curs_set_sp
 curscr
+curses_trace
 curses_version
 data_ahead
 data_behind
diff --git a/test/demo_menus.c b/test/demo_menus.c
index 857dfd62..76573233 100644
--- a/test/demo_menus.c
+++ b/test/demo_menus.c
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: demo_menus.c,v 1.69 2019/08/24 21:41:50 tom Exp $
+ * $Id: demo_menus.c,v 1.70 2019/12/07 18:06:12 tom Exp $
  *
  * Demonstrate a variety of functions from the menu library.
  * Thomas Dickey - 2005/4/9
@@ -139,7 +139,7 @@ wGetchar(WINDOW *win)
 	} else {
 	    _nc_tracing = save_trace;
 	}
-	trace(_nc_tracing);
+	curses_trace(_nc_tracing);
 	if (_nc_tracing)
 	    Trace(("TOGGLE-TRACING ON"));
     }
@@ -631,7 +631,7 @@ perform_trace_menu(int cmd)
 		    newtrace |= td->mask;
 		}
 	    }
-	    trace(newtrace);
+	    curses_trace(newtrace);
 	    Trace(("trace level interactively set to %s", tracetrace(_nc_tracing)));
 
 	    MvWPrintw(status, 1, 0,
@@ -1016,7 +1016,7 @@ main(int argc, char *argv[])
 #endif /* HAVE_RIPOFFLINE */
 #ifdef TRACE
 	case 't':
-	    trace((unsigned) strtoul(optarg, 0, 0));
+	    curses_trace((unsigned) strtoul(optarg, 0, 0));
 	    break;
 #endif
 	default:
diff --git a/test/hashtest.c b/test/hashtest.c
index 9a3300b2..e11348d8 100644
--- a/test/hashtest.c
+++ b/test/hashtest.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2017,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -30,7 +30,7 @@
  *
  * Generate timing statistics for vertical-motion optimization.
  *
- * $Id: hashtest.c,v 1.34 2017/09/30 15:42:53 tom Exp $
+ * $Id: hashtest.c,v 1.35 2019/12/07 18:07:04 tom Exp $
  */
 
 #include 
@@ -222,7 +222,7 @@ main(int argc, char *argv[])
 	test_optimize = TRUE;
     }
 #if USE_TRACE
-    trace(TRACE_TIMES);
+    curses_trace(TRACE_TIMES);
 #endif
 
     InitAndCatch(initscr(), finish);
diff --git a/test/lrtest.c b/test/lrtest.c
index ae47b4e7..0215c2a4 100644
--- a/test/lrtest.c
+++ b/test/lrtest.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2010,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2017,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -34,7 +34,7 @@
  * This can't be part of the ncurses test-program, because ncurses rips off the
  * bottom line to do labels.
  *
- * $Id: lrtest.c,v 1.24 2017/09/04 11:28:19 tom Exp $
+ * $Id: lrtest.c,v 1.25 2019/12/07 18:07:04 tom Exp $
  */
 
 #include 
@@ -148,9 +148,9 @@ main(
 		nodelay(stdscr, TRUE);
 #ifdef TRACE
 	    else if (ch == 'T')
-		trace(0);
+		curses_trace(0);
 	    else if (ch == 't')
-		trace(TRACE_CALLS | TRACE_ICALLS | TRACE_UPDATE);
+		curses_trace(TRACE_CALLS | TRACE_ICALLS | TRACE_UPDATE);
 #endif
 #ifdef KEY_RESIZE
 	    else if (ch == KEY_RESIZE) {
diff --git a/test/ncurses.c b/test/ncurses.c
index b896bc4f..c813123a 100644
--- a/test/ncurses.c
+++ b/test/ncurses.c
@@ -40,7 +40,7 @@ AUTHOR
    Author: Eric S. Raymond  1993
            Thomas E. Dickey (beginning revision 1.27 in 1996).
 
-$Id: ncurses.c,v 1.519 2019/09/22 19:12:40 tom Exp $
+$Id: ncurses.c,v 1.520 2019/12/07 19:04:52 tom Exp $
 
 ***************************************************************************/
 
@@ -210,7 +210,7 @@ wGetchar(WINDOW *win)
 	} else {
 	    _nc_tracing = save_trace;
 	}
-	trace(_nc_tracing);
+	curses_trace(_nc_tracing);
 	if (_nc_tracing)
 	    Trace(("TOGGLE-TRACING ON"));
     }
@@ -344,7 +344,7 @@ wGet_wchar(WINDOW *win, wint_t *result)
 	} else {
 	    _nc_tracing = save_trace;
 	}
-	trace(_nc_tracing);
+	curses_trace(_nc_tracing);
 	if (_nc_tracing)
 	    Trace(("TOGGLE-TRACING ON"));
     }
@@ -3734,7 +3734,6 @@ show_box_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
     MvAddCh(LINES / 2, 0,        colored_chtype(ACS_LTEE,  attr, pair));
     MvAddCh(LINES / 2, COLS - 1, colored_chtype(ACS_RTEE,  attr, pair));
     /* *INDENT-ON* */
-
 }
 
 static int
@@ -4282,7 +4281,6 @@ show_wbox_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
     (void) mvadd_wch(LINES / 2,   0,        MERGE_ATTR(0, WACS_LTEE));
     (void) mvadd_wch(LINES / 2,   COLS - 1, MERGE_ATTR(0, WACS_RTEE));
     /* *INDENT-ON* */
-
 }
 
 #undef MERGE_ATTR
@@ -4355,7 +4353,6 @@ show_utf8_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
     n = SHOW_UTF8(n, "WACS_S7",		"\342\216\274");
     (void) SHOW_UTF8(n, "WACS_S9",	"\342\216\275");
     /* *INDENT-ON* */
-
 }
 
 /* display the wide-ACS character set */
@@ -6345,7 +6342,7 @@ trace_set(bool recur GCC_UNUSED)
     for (ip = menu_items(m); *ip; ip++)
 	if (item_value(*ip))
 	    newtrace |= t_tbl[item_index(*ip)].mask;
-    trace(newtrace);
+    curses_trace(newtrace);
     Trace(("trace level interactively set to %s", tracetrace(_nc_tracing)));
 
     MvPrintw(LINES - 2, 0,
@@ -7992,10 +7989,10 @@ main(int argc, char *argv[])
 #ifdef TRACE
     /* enable debugging */
 #if !USE_LIBMENU
-    trace(save_trace);
+    curses_trace(save_trace);
 #else
     if (!isatty(fileno(stdin)))
-	trace(save_trace);
+	curses_trace(save_trace);
 #endif /* USE_LIBMENU */
 #endif /* TRACE */
 
diff --git a/test/package/debian-mingw/compat b/test/package/debian-mingw/compat
index 7f8f011e..ec635144 100644
--- a/test/package/debian-mingw/compat
+++ b/test/package/debian-mingw/compat
@@ -1 +1 @@
-7
+9
diff --git a/test/package/debian-mingw/control b/test/package/debian-mingw/control
index 9bd26219..64bd01b1 100644
--- a/test/package/debian-mingw/control
+++ b/test/package/debian-mingw/control
@@ -9,7 +9,7 @@ Homepage: https://invisible-island.net/ncurses/ncurses-examples.html
 Package: mingw32-ncurses-examples
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: ncurses-examples - example/test programs from ncurses
+Description: example/test programs from ncurses
  These are the example/test programs from the ncurses distribution.
  .
  This package is used for testing ABI 6 with the MinGW 32-bit port.
diff --git a/test/package/debian-mingw64/compat b/test/package/debian-mingw64/compat
index 7f8f011e..ec635144 100644
--- a/test/package/debian-mingw64/compat
+++ b/test/package/debian-mingw64/compat
@@ -1 +1 @@
-7
+9
diff --git a/test/package/debian-mingw64/control b/test/package/debian-mingw64/control
index bda22836..c22f262a 100644
--- a/test/package/debian-mingw64/control
+++ b/test/package/debian-mingw64/control
@@ -9,7 +9,7 @@ Homepage: https://invisible-island.net/ncurses/ncurses-examples.html
 Package: mingw64-ncurses-examples
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: ncurses-examples - example/test programs from ncurses
+Description: example/test programs from ncurses
  These are the example/test programs from the ncurses distribution.
  .
  This package is used for testing ABI 6 with the MinGW 64-bit port.
diff --git a/test/package/debian/compat b/test/package/debian/compat
index 7f8f011e..ec635144 100644
--- a/test/package/debian/compat
+++ b/test/package/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/test/package/debian/control b/test/package/debian/control
index 19180b58..d7647b3f 100644
--- a/test/package/debian/control
+++ b/test/package/debian/control
@@ -9,7 +9,7 @@ Homepage: https://invisible-island.net/ncurses/ncurses-examples.html
 Package: ncurses-examples
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: ncurses-examples - example/test programs from ncurses
+Description: example/test programs from ncurses
  These are the example/test programs from the ncurses distribution.
  .
  This package installs in "bin/ncurses-examples" to avoid conflict with other
@@ -18,7 +18,7 @@ Description: ncurses-examples - example/test programs from ncurses
 Package: ncursest-examples
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: ncurses-examples - example/test programs from ncurses
+Description: example/test programs from ncurses
  These are the example/test programs from the ncurses distribution, using
  the thread configuration.
  .
diff --git a/test/padview.c b/test/padview.c
index 7bc136d5..60f800ff 100644
--- a/test/padview.c
+++ b/test/padview.c
@@ -28,7 +28,7 @@
 /*
  * clone of view.c, using pads
  *
- * $Id: padview.c,v 1.14 2019/07/13 20:41:47 tom Exp $
+ * $Id: padview.c,v 1.15 2019/12/07 18:06:12 tom Exp $
  */
 
 #include 
@@ -324,11 +324,11 @@ main(int argc, char *argv[])
 		int tvalue = (int) strtol(optarg, &next, 0);
 		if (tvalue < 0 || (next != 0 && *next != 0))
 		    usage();
-		trace((unsigned) tvalue);
+		curses_trace((unsigned) tvalue);
 	    }
 	    break;
 	case 't':
-	    trace(TRACE_CALLS);
+	    curses_trace(TRACE_CALLS);
 	    break;
 #endif
 	default:
diff --git a/test/test.priv.h b/test/test.priv.h
index b9c5dc65..7814b959 100644
--- a/test/test.priv.h
+++ b/test/test.priv.h
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.182 2019/04/20 20:15:39 tom Exp $ */
+/* $Id: test.priv.h,v 1.183 2019/12/07 19:03:20 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
@@ -976,9 +976,9 @@ extern int TABSIZE;
 #endif
 
 #if !HAVE_STRSTR
-extern char * _nc_strstr (const char *, const char *);
+extern char *_nc_strstr(const char *, const char *);
 #define strstr(a,b) _nc_strstr((a),(b))
-#endif	/* !HAVE_STRSTR */
+#endif /* !HAVE_STRSTR */
 
 /* Use this to quiet gcc's -Wwrite-strings warnings, but accommodate SVr4
  * curses which doesn't have const parameters declared (so far) in the places
@@ -1129,7 +1129,7 @@ extern char *tgoto(char *, int, int);	/* available, but not prototyped */
 	if ((_nc_tracing & TRACE_MAXIMUM) == 0) { \
 	    int t = _nc_getenv_num("NCURSES_TRACE"); \
 	    if (t >= 0) \
-		trace((unsigned) t); \
+		curses_trace((unsigned) t); \
 	}
 extern unsigned _nc_tracing;
 extern int _nc_getenv_num(const char *);
diff --git a/test/testcurs.c b/test/testcurs.c
index fd3431ce..ab7e1718 100644
--- a/test/testcurs.c
+++ b/test/testcurs.c
@@ -6,7 +6,7 @@
  *  wrs(5/28/93) -- modified to be consistent (perform identically) with either
  *                  PDCurses or under Unix System V, R4
  *
- * $Id: testcurs.c,v 1.53 2017/12/23 21:38:26 tom Exp $
+ * $Id: testcurs.c,v 1.54 2019/12/07 18:06:12 tom Exp $
  */
 
 #include 
@@ -59,7 +59,7 @@ initTest(WINDOW **win)
     PDC_debug("initTest called\n");
 #endif
 #ifdef TRACE
-    trace(TRACE_MAXIMUM);
+    curses_trace(TRACE_MAXIMUM);
 #endif
     initscr();
 #ifdef PDCDEBUG
diff --git a/test/testscanw.c b/test/testscanw.c
index 79589c20..96758f14 100644
--- a/test/testscanw.c
+++ b/test/testscanw.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2002,2006 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2006,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
  * Date:  1997/03/17
  * From:  bayern@morpheus.cis.yale.edu
  *
- * $Id: testscanw.c,v 1.11 2006/04/01 19:08:03 tom Exp $
+ * $Id: testscanw.c,v 1.12 2019/12/07 18:07:04 tom Exp $
  */
 #include 
 
@@ -47,7 +47,7 @@ main(int argc, char *argv[])
     echo();
 
 #if 0
-    trace(TRACE_UPDATE | TRACE_CALLS);
+    curses_trace(TRACE_UPDATE | TRACE_CALLS);
 #endif
     while (argc > 1) {
 	if (isdigit(UChar(*argv[1])))
diff --git a/test/view.c b/test/view.c
index 2772a277..eb7786e1 100644
--- a/test/view.c
+++ b/test/view.c
@@ -51,7 +51,7 @@
  * scroll operation worked, and the refresh() code only had to do a
  * partial repaint.
  *
- * $Id: view.c,v 1.136 2019/01/27 00:52:06 tom Exp $
+ * $Id: view.c,v 1.137 2019/12/07 19:03:07 tom Exp $
  */
 
 #include 
@@ -88,7 +88,7 @@ failed(const char *msg)
 }
 
 static int
-ch_len(NCURSES_CH_T * src)
+ch_len(NCURSES_CH_T *src)
 {
     int result = 0;
 #if USE_WIDEC_SUPPORT
@@ -299,11 +299,13 @@ read_file(const char *filename)
     }
     width = (width + 1) * 5;
     my_win = newwin(2, width, 0, 0);
-    if (my_win == 0)
+    if (my_win == 0) {
 	failed("cannot allocate temporary window");
+    }
 
-    if ((vec_lines = typeCalloc(NCURSES_CH_T *, (size_t) num_lines + 2)) == 0)
+    if ((vec_lines = typeCalloc(NCURSES_CH_T *, (size_t) num_lines + 2)) == 0) {
 	failed("cannot allocate line-vector #2");
+    }
 
     /*
      * Use the curses library for rendering, including tab-conversion.  This
@@ -348,8 +350,9 @@ read_file(const char *filename)
 	    x = width - 1;
 	wmove(my_win, 0, 0);
 	/* "x + 1" works with standard curses; some implementations are buggy */
-	if ((vec_lines[k] = typeCalloc(NCURSES_CH_T, x + width + 1)) == 0)
+	if ((vec_lines[k] = typeCalloc(NCURSES_CH_T, x + width + 1)) == 0) {
 	    failed("cannot allocate line-vector #3");
+	}
 #if USE_WIDEC_SUPPORT
 	win_wchnstr(my_win, vec_lines[k], x);
 #else
@@ -450,11 +453,11 @@ main(int argc, char *argv[])
 		int tvalue = (int) strtol(optarg, &next, 0);
 		if (tvalue < 0 || (next != 0 && *next != 0))
 		    usage();
-		trace((unsigned) tvalue);
+		curses_trace((unsigned) tvalue);
 	    }
 	    break;
 	case 't':
-	    trace(TRACE_CALLS);
+	    curses_trace(TRACE_CALLS);
 	    break;
 #endif
 	default:
diff --git a/test/worm.c b/test/worm.c
index 8cac9e22..d618e3bb 100644
--- a/test/worm.c
+++ b/test/worm.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -52,7 +52,7 @@
   traces will be dumped.  The program stops and waits for one character of
   input at the beginning and end of the interval.
 
-  $Id: worm.c,v 1.79 2018/07/21 21:40:00 tom Exp $
+  $Id: worm.c,v 1.80 2019/12/07 19:04:09 tom Exp $
 */
 
 #include 
@@ -608,10 +608,10 @@ main(int argc, char *argv[])
 #ifdef TRACE
 	    if (trace_start || trace_end) {
 		if (generation == trace_start) {
-		    trace(TRACE_CALLS);
+		    curses_trace(TRACE_CALLS);
 		    get_input();
 		} else if (generation == trace_end) {
-		    trace(0);
+		    curses_trace(0);
 		    get_input();
 		}
 
-- 
2.44.0