From 0eedaa5673ff8181abe51e3a6fadca3820f90c46 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 24 Sep 2023 00:19:47 +0000 Subject: [PATCH] ncurses 6.4 - patch 20230923 + improve formatting of manpages (patches by Branden Robinson). + amend change to delscreen() to limit the windows which it creates to just those associated with the screen (report by Frederic Boiteux, cf: 20220813). --- NEWS | 8 +- 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_color.3x.html | 34 ++-- doc/html/man/curs_getyx.3x.html | 16 +- doc/html/man/curs_inopts.3x.html | 48 ++--- doc/html/man/curs_legacy.3x.html | 12 +- doc/html/man/curs_memleaks.3x.html | 10 +- doc/html/man/curs_mouse.3x.html | 135 +++++++------- doc/html/man/curs_opaque.3x.html | 20 +- doc/html/man/curs_pad.3x.html | 18 +- doc/html/man/curs_print.3x.html | 18 +- doc/html/man/curs_slk.3x.html | 84 ++++----- doc/html/man/curs_terminfo.3x.html | 124 ++++++------ doc/html/man/curs_touch.3x.html | 14 +- doc/html/man/curs_trace.3x.html | 8 +- doc/html/man/curs_util.3x.html | 41 ++-- doc/html/man/define_key.3x.html | 30 +-- doc/html/man/form.3x.html | 2 +- doc/html/man/infocmp.1m.html | 2 +- doc/html/man/infotocap.1m.html | 2 +- doc/html/man/key_defined.3x.html | 18 +- doc/html/man/keybound.3x.html | 22 +-- doc/html/man/keyok.3x.html | 18 +- doc/html/man/menu.3x.html | 2 +- doc/html/man/ncurses.3x.html | 16 +- doc/html/man/ncurses6-config.1.html | 2 +- doc/html/man/new_pair.3x.html | 22 +-- doc/html/man/panel.3x.html | 12 +- doc/html/man/resizeterm.3x.html | 38 ++-- doc/html/man/scr_dump.5.html | 20 +- doc/html/man/tabs.1.html | 2 +- doc/html/man/terminfo.5.html | 2 +- doc/html/man/tic.1m.html | 2 +- doc/html/man/toe.1m.html | 2 +- doc/html/man/tput.1.html | 2 +- doc/html/man/tset.1.html | 2 +- man/curs_color.3x | 259 +++++++++++++------------- man/curs_getyx.3x | 60 +++--- man/curs_inopts.3x | 210 ++++++++++----------- man/curs_legacy.3x | 66 ++++--- man/curs_memleaks.3x | 53 +++--- man/curs_mouse.3x | 143 +++++++------- man/curs_opaque.3x | 72 +++---- man/curs_pad.3x | 113 ++++++----- man/curs_print.3x | 26 +-- man/curs_slk.3x | 188 +++++++++---------- man/curs_terminfo.3x | 146 +++++++-------- man/curs_touch.3x | 48 ++--- man/curs_trace.3x | 25 +-- man/curs_util.3x | 70 ++++--- man/define_key.3x | 27 +-- man/key_defined.3x | 16 +- man/keybound.3x | 22 +-- man/keyok.3x | 18 +- man/manhtml.aliases | 3 +- man/ncurses.3x | 10 +- man/new_pair.3x | 24 +-- man/panel.3x | 6 +- man/resizeterm.3x | 118 ++++++------ man/scr_dump.5 | 12 +- misc/magic | 4 +- ncurses/base/vsscanf.c | 11 +- ncurses/curses.priv.h | 14 +- ncurses/report_offsets.c | 15 +- ncurses/tinfo/trim_sgr0.c | 12 +- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- test/ditto.c | 14 +- 77 files changed, 1292 insertions(+), 1355 deletions(-) diff --git a/NEWS b/NEWS index fdcd7860..bd488aca 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.4001 2023/09/17 22:41:20 tom Exp $ +-- $Id: NEWS,v 1.4004 2023/09/23 23:48:03 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,12 @@ 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. +20230923 + + improve formatting of manpages (patches by Branden Robinson). + + amend change to delscreen() to limit the windows which it creates to + just those associated with the screen (report by Frederic Boiteux, + cf: 20220813). + 20230918 + new tarball/errata (report by Sven Joachim). diff --git a/VERSION b/VERSION index 0a90ac36..4fa26f6d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.4 20230918 +5:0:10 6.4 20230923 diff --git a/dist.mk b/dist.mk index fedcbbd7..0c503d68 100644 --- a/dist.mk +++ b/dist.mk @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1566 2023/09/18 07:33:33 tom Exp $ +# $Id: dist.mk,v 1.1567 2023/09/23 09:27:19 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -38,7 +38,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 4 -NCURSES_PATCH = 20230918 +NCURSES_PATCH = 20230923 # 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 91809abe..21826623 100644 --- a/doc/html/man/adacurses6-config.1.html +++ b/doc/html/man/adacurses6-config.1.html @@ -126,7 +126,7 @@

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index 3b966d49..fb6dfcae 100644
--- a/doc/html/man/captoinfo.1m.html
+++ b/doc/html/man/captoinfo.1m.html
@@ -190,7 +190,7 @@
 

SEE ALSO

        infocmp(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 

AUTHOR

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

SEE ALSO

        tput(1), xterm(1), terminfo(5).
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/doc/html/man/curs_color.3x.html b/doc/html/man/curs_color.3x.html
index e914aedb..44b161ef 100644
--- a/doc/html/man/curs_color.3x.html
+++ b/doc/html/man/curs_color.3x.html
@@ -27,19 +27,19 @@
   * sale, use or other dealings in this Software without prior written       *
   * authorization.                                                           *
   ****************************************************************************
-  * @Id: curs_color.3x,v 1.77 2023/09/16 23:34:43 tom Exp @
+  * @Id: curs_color.3x,v 1.82 2023/09/23 22:24:15 tom Exp @
 -->
 
 
 
 
 
-curs_color 3x 2023-09-16 ncurses 6.4 Library calls
+curs_color 3x 2023-09-23 ncurses 6.4 Library calls
 
 
 
 
-

curs_color 3x 2023-09-16 ncurses 6.4 Library calls

+

curs_color 3x 2023-09-23 ncurses 6.4 Library calls

 curs_color(3x)                   Library calls                  curs_color(3x)
 
@@ -63,17 +63,17 @@
 
        int init_pair(short pair, short f, short b);
        int init_color(short color, short r, short g, short b);
-       /* extensions */
+       /* extensions */
        int init_extended_pair(int pair, int f, int b);
        int init_extended_color(int color, int r, int g, int b);
 
        int color_content(short color, short *r, short *g, short *b);
        int pair_content(short pair, short *f, short *b);
-       /* extensions */
+       /* extensions */
        int extended_color_content(int color, int *r, int *g, int *b);
        int extended_pair_content(int pair, int *f, int *b);
 
-       /* extensions */
+       /* extensions */
        void reset_color_pairs(void);
 
        int COLOR_PAIR(int n);
@@ -83,7 +83,7 @@
 

DESCRIPTION

 
 

Overview

-       curses supports color attributes on terminals with that capability.  To
+       curses supports color attributes on terminals with that capability.  To
        use  these  routines  start_color  must  be called, usually right after
        initscr.  Colors are always used in pairs (referred to as color-pairs).
        A  color-pair  consists  of  a  foreground color (for characters) and a
@@ -103,7 +103,7 @@
 
 
 

Color Rendering

-       The  curses  library  combines  these  inputs  to  produce  the  actual
+       The  curses  library  combines  these  inputs  to  produce  the  actual
        foreground and background colors shown on the screen:
 
        o   per-character video attributes (e.g., via waddch),
@@ -120,32 +120,32 @@
        The background character is a special case:  it  includes  a  character
        value, just as if it were passed to waddch.
 
-       The  curses library does the actual work of combining these color pairs
+       The  curses library does the actual work of combining these color pairs
        in an internal function called from waddch:
 
        o   If the parameter passed to waddch is blank, and it uses the special
            color pair 0,
 
-           o   curses next checks the window attribute.
+           o   curses next checks the window attribute.
 
-           o   If  the window attribute does not use color pair 0, curses uses
+           o   If  the window attribute does not use color pair 0, curses uses
                the color pair from the window attribute.
 
-           o   Otherwise, curses uses the background character.
+           o   Otherwise, curses uses the background character.
 
        o   If the parameter passed to waddch is not blank, or it does not  use
-           the  special  color  pair 0, curses prefers the color pair from the
+           the  special  color  pair 0, curses prefers the color pair from the
            parameter, if it  is  nonzero.   Otherwise,  it  tries  the  window
            attribute next, and finally the background character.
 
-       Some  curses  functions  such  as  wprintw  call  waddch.  Those do not
+       Some  curses  functions  such  as  wprintw  call  waddch.  Those do not
        combine its parameter with a color pair.  Consequently those calls  use
        only the window attribute or the background character.
 
 
 

CONSTANTS

        In <curses.h> the following macros are defined.  These are the standard
-       colors (ISO-6429).  curses also assumes that COLOR_BLACK is the default
+       colors (ISO-6429).  curses also assumes that COLOR_BLACK is the default
        background color for all terminals.
 
              COLOR_BLACK
@@ -413,7 +413,7 @@
 
 
 

NOTES

-       In  the  ncurses  implementation,  there is a separate color activation
+       In  the  ncurses  implementation,  there is a separate color activation
        flag, color palette, color  pairs  table,  and  associated  COLORS  and
        COLOR_PAIRS  counts  for  each  screen;  the  start_color function only
        affects the current screen.   The  SVr4/XSI  interface  is  not  really
@@ -525,7 +525,7 @@
 
 
 
-ncurses 6.4                       2023-09-16                    curs_color(3x)
+ncurses 6.4                       2023-09-23                    curs_color(3x)
 

AUTHOR

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

SEE ALSO

        infocmp(1m), tic(1m), curses(3x), terminfo(5)
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 

AUTHOR

diff --git a/doc/html/man/key_defined.3x.html b/doc/html/man/key_defined.3x.html
index a2f601a0..1512b4e9 100644
--- a/doc/html/man/key_defined.3x.html
+++ b/doc/html/man/key_defined.3x.html
@@ -28,19 +28,19 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey 2003
-  * @Id: key_defined.3x,v 1.20 2023/09/16 23:38:39 tom Exp @
+  * @Id: key_defined.3x,v 1.26 2023/09/23 22:49:51 tom Exp @
 -->
 
 
 
 
 
-key_defined 3x 2023-09-16 ncurses 6.4 Library calls
+key_defined 3x 2023-09-23 ncurses 6.4 Library calls
 
 
 
 
-

key_defined 3x 2023-09-16 ncurses 6.4 Library calls

+

key_defined 3x 2023-09-23 ncurses 6.4 Library calls

 key_defined(3x)                  Library calls                 key_defined(3x)
 
@@ -58,7 +58,7 @@
 
 
 

DESCRIPTION

-       This  is an extension to the curses library.  It permits an application
+       This  is an extension to the curses library.  It permits an application
        to determine if a string is currently bound to any keycode.
 
 
@@ -69,21 +69,21 @@
 
 
 

PORTABILITY

-       This routine is specific to ncurses.  It was not supported  on  Version
+       This routine is specific to ncurses.  It was not supported  on  Version
        7,  BSD  or  System V implementations.  It is recommended that any code
-       depending on them be conditioned using NCURSES_VERSION.
+       depending on them be conditioned using NCURSES_VERSION.
 
 
 

SEE ALSO

-       define_key(3x).
+       define_key(3x)
 
 
 

AUTHOR

-       Thomas Dickey.
+       Thomas Dickey
 
 
 
-ncurses 6.4                       2023-09-16                   key_defined(3x)
+ncurses 6.4                       2023-09-23                   key_defined(3x)
 

SEE ALSO

        curses(3x)
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/doc/html/man/new_pair.3x.html b/doc/html/man/new_pair.3x.html
index b2c0d209..ce4adc31 100644
--- a/doc/html/man/new_pair.3x.html
+++ b/doc/html/man/new_pair.3x.html
@@ -28,19 +28,19 @@
   * authorization.                                                           *
   ****************************************************************************
   * Author: Thomas E. Dickey
-  * @Id: new_pair.3x,v 1.30 2023/09/16 23:38:39 tom Exp @
+  * @Id: new_pair.3x,v 1.36 2023/09/23 22:37:46 tom Exp @
 -->
 
 
 
 
 
-new_pair 3x 2023-09-16 ncurses 6.4 Library calls
+new_pair 3x 2023-09-23 ncurses 6.4 Library calls
 
 
 
 
-

new_pair 3x 2023-09-16 ncurses 6.4 Library calls

+

new_pair 3x 2023-09-23 ncurses 6.4 Library calls

 new_pair(3x)                     Library calls                    new_pair(3x)
 
@@ -61,7 +61,7 @@
 
 
 

DESCRIPTION

-       These functions are an extension to the curses library.  They permit an
+       These functions are an extension to the curses library.  They permit an
        application   to   dynamically   allocate   a   color  pair  using  the
        foreground/background colors rather than  assign  a  fixed  color  pair
        number, and return an unused pair to the pool.
@@ -75,7 +75,7 @@
            it.  That is, the foreground and background colors are applied as a
            pair.
 
-       o   Color pairs are the  curses  library's  way  of  managing  a  color
+       o   Color pairs are the  curses  library's  way  of  managing  a  color
            palette  on  a terminal.  If the library does not keep track of the
            combinations of colors which are displayed, it will be inefficient.
 
@@ -122,7 +122,7 @@
        All of the color pairs are allocated from a  table  of  possible  color
        pairs.   The  size  of  the  table  is determined by the terminfo pairs
        capability.  The table is shared with  init_pair;  in  fact  alloc_pair
-       calls  init_pair after updating the ncurses library's fast index to the
+       calls  init_pair after updating the ncurses library's fast index to the
        colors versus color pairs.
 
 
@@ -151,21 +151,21 @@
 
 
 

PORTABILITY

-       These routines are specific to ncurses.  They  were  not  supported  on
+       These routines are specific to ncurses.  They  were  not  supported  on
        Version 7, BSD or System V implementations.  It is recommended that any
-       code depending on them be conditioned using NCURSES_VERSION.
+       code depending on them be conditioned using NCURSES_VERSION.
 
 
 

SEE ALSO

-       curs_color(3x).
+       curs_color(3x)
 
 
 

AUTHOR

-       Thomas Dickey.
+       Thomas Dickey
 
 
 
-ncurses 6.4                       2023-09-16                      new_pair(3x)
+ncurses 6.4                       2023-09-23                      new_pair(3x)
 

SEE ALSO

        infocmp(1m), tset(1), curses(3x), terminfo(5).
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/doc/html/man/terminfo.5.html b/doc/html/man/terminfo.5.html
index 0578da6e..c1f2ea72 100644
--- a/doc/html/man/terminfo.5.html
+++ b/doc/html/man/terminfo.5.html
@@ -105,7 +105,7 @@
        have, by specifying how to perform screen operations, and by specifying
        padding requirements and initialization sequences.
 
-       This manual describes ncurses version 6.4 (patch 20230917).
+       This manual describes ncurses version 6.4 (patch 20230923).
 
 
 

Terminfo Entry Syntax

diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
index 54ad85bb..065b6d58 100644
--- a/doc/html/man/tic.1m.html
+++ b/doc/html/man/tic.1m.html
@@ -475,7 +475,7 @@
        captoinfo(1m),   infocmp(1m),   infotocap(1m),   toe(1m),   curses(3x),
        term(5).  terminfo(5).  user_caps(5).
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 

AUTHOR

diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
index 6a334303..f28c0c54 100644
--- a/doc/html/man/toe.1m.html
+++ b/doc/html/man/toe.1m.html
@@ -171,7 +171,7 @@
        captoinfo(1m),   infocmp(1m),   infotocap(1m),   tic(1m),   curses(3x),
        terminfo(5).
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
index 42064ad5..60726515 100644
--- a/doc/html/man/tput.1.html
+++ b/doc/html/man/tput.1.html
@@ -545,7 +545,7 @@
 

SEE ALSO

        clear(1), stty(1), tabs(1), tset(1), curs_termcap(3x), terminfo(5).
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
index 4b07fc2d..06aad9cd 100644
--- a/doc/html/man/tset.1.html
+++ b/doc/html/man/tset.1.html
@@ -392,7 +392,7 @@
        csh(1),  sh(1),  stty(1),   curs_terminfo(3x),   tty(4),   terminfo(5),
        ttys(5), environ(7)
 
-       This describes ncurses version 6.4 (patch 20230917).
+       This describes ncurses version 6.4 (patch 20230923).
 
 
 
diff --git a/man/curs_color.3x b/man/curs_color.3x
index 744ad385..6b1e5bac 100644
--- a/man/curs_color.3x
+++ b/man/curs_color.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_color.3x,v 1.77 2023/09/16 23:34:43 tom Exp $
-.TH curs_color 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_color.3x,v 1.82 2023/09/23 22:24:15 tom Exp $
+.TH curs_color 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -55,112 +55,103 @@
 \fB\%PAIR_NUMBER\fP \-
 manipulate terminal colors with \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBint start_color(void);\fP
-.sp
+.PP
 \fBbool has_colors(void);\fP
-.br
 \fBbool can_change_color(void);\fP
-.sp
+.PP
 \fBint init_pair(short \fIpair\fB, short \fIf\fB, short \fIb\fB);\fR
-.br
 \fBint init_color(short \fIcolor\fB, short \fIr\fB, short \fIg\fB, short \fIb\fB);\fR
-.br
-/* extensions */
-.br
+\fI/* extensions */\fP
 \fBint init_extended_pair(int \fIpair\fB, int \fIf\fB, int \fIb\fB);\fR
-.br
 \fBint init_extended_color(int \fIcolor\fB, int \fIr\fB, int \fIg\fB, int \fIb\fB);\fR
-.sp
+.PP
 \fBint color_content(short \fIcolor\fB, short *\fIr\fB, short *\fIg\fB, short *\fIb\fB);\fR
-.br
 \fBint pair_content(short \fIpair\fB, short *\fIf\fB, short *\fIb\fB);\fR
-.br
-/* extensions */
-.br
+\fI/* extensions */\fP
 \fBint extended_color_content(int \fIcolor\fB, int *\fIr\fB, int *\fIg\fB, int *\fIb\fB);\fR
-.br
 \fBint extended_pair_content(int \fIpair\fB, int *\fIf\fB, int *\fIb\fB);\fR
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
 \fBvoid reset_color_pairs(void);\fP
-.sp
+.PP
 \fBint COLOR_PAIR(int \fIn\fB);\fR
-.br
 \fBPAIR_NUMBER(\fIattrs\fB);\fR
+.fi
 .SH DESCRIPTION
 .SS Overview
-\fBcurses\fP supports color attributes on terminals with that capability.
-To use these routines \fBstart_color\fP must be called, usually right after
-\fBinitscr\fP.
+\fIcurses\fP supports color attributes on terminals with that capability.
+To use these routines \fB\%start_color\fP must be called, usually right after
+\fB\%initscr\fP.
 Colors are always used in pairs (referred to as color-pairs).
 A color-pair consists of a foreground color (for characters) and a background
 color (for the blank field on which the characters are displayed).
-A programmer initializes a color-pair with the routine \fBinit_pair\fP.
-After it has been initialized, \fBCOLOR_PAIR\fP(\fIn\fP)
+A programmer initializes a color-pair with the routine \fB\%init_pair\fP.
+After it has been initialized, \fB\%COLOR_PAIR\fP(\fIn\fP)
 can be used to convert the pair to a video attribute.
 .PP
 If a terminal is capable of redefining colors, the programmer can use the
-routine \fBinit_color\fP to change the definition of a color.
-The routines \fBhas_colors\fP and \fBcan_change_color\fP
+routine \fB\%init_color\fP to change the definition of a color.
+The routines \fB\%has_colors\fP and \fB\%can_change_color\fP
 return \fBTRUE\fP or \fBFALSE\fP,
 depending on whether the terminal has color capabilities and whether the
 programmer can change the colors.
-The routine \fBcolor_content\fP allows a
+The routine \fB\%color_content\fP allows a
 programmer to extract the amounts of red, green, and blue components in an
 initialized color.
-The routine \fBpair_content\fP allows a programmer to find
+The routine \fB\%pair_content\fP allows a programmer to find
 out how a given color-pair is currently defined.
 .SS Color Rendering
-The \fBcurses\fP library combines these inputs to produce the
+The \fIcurses\fP library combines these inputs to produce the
 actual foreground and background colors shown on the screen:
 .bP
-per-character video attributes (e.g., via \fBwaddch\fP),
+per-character video attributes (e.g., via \fB\%waddch\fP),
 .bP
-the window attribute (e.g., by \fBwattrset\fP), and
+the window attribute (e.g., by \fB\%wattrset\fP), and
 .bP
-the background character (e.g., \fBwbkgdset\fP).
+the background character (e.g., \fB\%wbkgdset\fP).
 .PP
 Per-character and window attributes are usually set by a parameter containing
 video attributes including a color pair value.
-Some functions such as \fBwattr_set\fP use a separate parameter which
+Some functions such as \fB\%wattr_set\fP use a separate parameter which
 is the color pair number.
 .PP
 The background character is a special case: it includes a character value,
-just as if it were passed to \fBwaddch\fP.
+just as if it were passed to \fB\%waddch\fP.
 .PP
-The \fBcurses\fP library does the actual work of combining these color
-pairs in an internal function called from \fBwaddch\fP:
+The \fIcurses\fP library does the actual work of combining these color
+pairs in an internal function called from \fB\%waddch\fP:
 .bP
-If the parameter passed to \fBwaddch\fP is \fIblank\fP,
+If the parameter passed to \fB\%waddch\fP is \fIblank\fP,
 and it uses the special color pair 0,
 .RS
 .bP
-\fBcurses\fP next checks the window attribute.
+\fIcurses\fP next checks the window attribute.
 .bP
 If the window attribute does not use color pair 0,
-\fBcurses\fP uses the color pair from the window attribute.
+\fIcurses\fP uses the color pair from the window attribute.
 .bP
-Otherwise, \fBcurses\fP uses the background character.
+Otherwise, \fIcurses\fP uses the background character.
 .RE
 .bP
-If the parameter passed to \fBwaddch\fP is \fInot blank\fP,
+If the parameter passed to \fB\%waddch\fP is \fInot blank\fP,
 or it does not use the special color pair 0,
-\fBcurses\fP prefers the color pair from the parameter,
+\fIcurses\fP prefers the color pair from the parameter,
 if it is nonzero.
 Otherwise, it tries the window attribute next, and finally the
 background character.
 .PP
-Some \fBcurses\fP functions such as \fBwprintw\fP call \fBwaddch\fP.
+Some \fIcurses\fP functions such as \fB\%wprintw\fP call \fB\%waddch\fP.
 Those do not combine its parameter with a color pair.
 Consequently those calls use only the window attribute or
 the background character.
 .SH CONSTANTS
-In \fB\fP the following macros are defined.
+In \fB\%\fP the following macros are defined.
 These are the standard colors (ISO-6429).
-\fBcurses\fP also assumes that \fBCOLOR_BLACK\fP is the default
+\fIcurses\fP also assumes that \fB\%COLOR_BLACK\fP is the default
 background color for all terminals.
 .PP
 .nf
@@ -178,38 +169,38 @@ Some terminals support more than the eight (8) \*(``ANSI\*('' colors.
 There are no standard names for those additional colors.
 .SH VARIABLES
 .SS COLORS
-is initialized by \fBstart_color\fP to the maximum number of colors
+is initialized by \fB\%start_color\fP to the maximum number of colors
 the terminal can support.
 .SS COLOR_PAIRS
-is initialized by \fBstart_color\fP to the maximum number of color pairs
+is initialized by \fB\%start_color\fP to the maximum number of color pairs
 the terminal can support.
 .SH FUNCTIONS
 .SS start_color
-The \fBstart_color\fP routine requires no arguments.
+The \fB\%start_color\fP routine requires no arguments.
 It must be called if the programmer wants to use colors, and before any other
 color manipulation routine is called.
-It is good practice to call this routine right after \fBinitscr\fP.
-\fBstart_color\fP does this:
+It is good practice to call this routine right after \fB\%initscr\fP.
+\fB\%start_color\fP does this:
 .bP
-It initializes two global variables, \fBCOLORS\fP and
-\fBCOLOR_PAIRS\fP (respectively defining the maximum number of colors
+It initializes two global variables, \fB\%COLORS\fP and
+\fB\%COLOR_PAIRS\fP (respectively defining the maximum number of colors
 and color-pairs the terminal can support).
 .bP
-It initializes the special color pair \fB0\fP to the default foreground
+It initializes the special color pair \fB\%0\fP to the default foreground
 and background colors.
 No other color pairs are initialized.
 .bP
 It restores the colors on the terminal to the values
 they had when the terminal was just turned on.
 .bP
-If the terminal supports the \fBinitc\fP (\fBinitialize_color\fP) capability,
-\fBstart_color\fP
+If the terminal supports the \fBinitc\fP (\fB\%initialize_color\fP) capability,
+\fB\%start_color\fP
 initializes its internal table representing the
 red, green, and blue components of the color palette.
 .IP
 The components depend on whether the terminal uses
 CGA (aka \*(``ANSI\*('') or
-HLS (i.e., the \fBhls\fP (\fBhue_lightness_saturation\fP) capability is set).
+HLS (i.e., the \fBhls\fP (\fB\%hue_lightness_saturation\fP) capability is set).
 The table is initialized first for eight basic colors
 (black, red, green, yellow, blue, magenta, cyan, and white),
 using weights that depend upon the CGA/HLS choice.
@@ -224,28 +215,28 @@ but with weights of \fB1000\fP.
 SVr4 uses a similar scheme, but uses \fB1000\fP
 for the components of the initial eight colors.
 .IP
-\fBstart_color\fP does not attempt to set the terminal's color palette
+\fB\%start_color\fP does not attempt to set the terminal's color palette
 to match its built-in table.
-An application may use \fBinit_color\fP to alter the internal table
+An application may use \fB\%init_color\fP to alter the internal table
 along with the terminal's color.
 .PP
 These limits apply to color values and color pairs.
 Values outside these limits are not legal, and may result in a runtime error:
 .bP
-\fBCOLORS\fP corresponds to the terminal database's \fBmax_colors\fP capability,
-(see \fBterminfo\fP(\*n)).
+\fBCOLORS\fP corresponds to the terminal database's \fB\%max_colors\fP capability,
+(see \fB\%terminfo\fP(\*n)).
 .bP
-color values are expected to be in the range \fB0\fP to \fBCOLORS\-1\fP,
-inclusive (including \fB0\fP and \fBCOLORS\-1\fP).
+color values are expected to be in the range \fB0\fP to \fB\%COLORS\-1\fP,
+inclusive (including \fB0\fP and \fB\%COLORS\-1\fP).
 .bP
 a special color value \fB\-1\fP is used in certain extended functions
-to denote the \fIdefault color\fP (see \fBuse_default_colors\fP(3X)).
+to denote the \fIdefault color\fP (see \fB\%use_default_colors\fP(3X)).
 .bP
-\fBCOLOR_PAIRS\fP corresponds to
-the terminal database's \fBmax_pairs\fP capability,
-(see \fBterminfo\fP(\*n)).
+\fB\%COLOR_PAIRS\fP corresponds to
+the terminal database's \fB\%max_pairs\fP capability,
+(see \fB\%terminfo\fP(\*n)).
 .bP
-legal color pair values are in the range \fB1\fP to \fBCOLOR_PAIRS\-1\fP,
+legal color pair values are in the range \fB1\fP to \fB\%COLOR_PAIRS\-1\fP,
 inclusive.
 .bP
 color pair \fB0\fP is special; it denotes \*(``no color\*(''.
@@ -254,27 +245,27 @@ Color pair \fB0\fP is assumed to be white on black,
 but is actually whatever the terminal implements before color is initialized.
 It cannot be modified by the application.
 .SS has_colors
-The \fBhas_colors\fP routine requires no arguments.
+The \fB\%has_colors\fP routine requires no arguments.
 It returns \fBTRUE\fP if
 the terminal can manipulate colors; otherwise, it returns \fBFALSE\fP.
 This routine facilitates writing terminal-independent programs.
 For example, a programmer can use it to decide
 whether to use color or some other video attribute.
 .SS can_change_color
-The \fBcan_change_color\fP routine requires no arguments.
+The \fB\%can_change_color\fP routine requires no arguments.
 It returns \fBTRUE\fP if the terminal supports colors
 and can change their definitions;
 other, it returns \fBFALSE\fP.
 This routine facilitates writing terminal-independent programs.
 .SS init_pair
-The \fBinit_pair\fP routine changes the definition of a color-pair.
+The \fB\%init_pair\fP routine changes the definition of a color-pair.
 It takes three arguments:
 the number of the color-pair to be changed, the foreground
 color number, and the background color number.
 For portable applications:
 .bP
 The first argument must be a legal color pair value.
-If default colors are used (see \fBuse_default_colors\fP(3X))
+If default colors are used (see \fB\%use_default_colors\fP(3X))
 the upper limit is adjusted to allow for extra pairs which use
 a default color in foreground and/or background.
 .bP
@@ -285,42 +276,42 @@ the screen is refreshed and all occurrences of that color-pair
 are changed to the new definition.
 .PP
 As an extension, ncurses allows you to set color pair \fB0\fP via
-the \fBassume_default_colors\fP(3X) routine, or to specify the use of
+the \fB\%assume_default_colors\fP(3X) routine, or to specify the use of
 default colors (color number \fB\-1\fP) if you first invoke the
-\fBuse_default_colors\fP(3X) routine.
+\fB\%use_default_colors\fP(3X) routine.
 .SS init_extended_pair
-Because \fBinit_pair\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%init_pair\fP uses signed \fBshort\fPs for its parameters,
 that limits color-pairs and color-values
 to 32767 on modern hardware.
-The extension \fBinit_extended_pair\fP uses \fBint\fPs
+The extension \fB\%init_extended_pair\fP uses \fBint\fPs
 for the color-pair and color-value,
 allowing a larger number of colors to be supported.
 .SS init_color
-The \fBinit_color\fP routine changes the definition of a color.
+The \fB\%init_color\fP routine changes the definition of a color.
 It takes four arguments:
 the number of the color to be changed followed by three RGB values
 (for the amounts of red, green, and blue components).
 .bP
 The first argument must be a legal color value;
 default colors are not allowed here.
-(See the section \fBColors\fP for the default color index.)
+(See the section \fB\%Colors\fP for the default color index.)
 .bP
 Each of the last three arguments
 must be a value in the range \fB0\fP through \fB1000\fP.
 .PP
-When \fBinit_color\fP is used, all
+When \fB\%init_color\fP is used, all
 occurrences of that color on the screen immediately change to the new
 definition.
 .SS init_extended_color
-Because \fBinit_color\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%init_color\fP uses signed \fBshort\fPs for its parameters,
 that limits color-values and their red, green, and blue components
 to 32767 on modern hardware.
-The extension \fBinit_extended_color\fP uses \fBint\fPs
+The extension \fB\%init_extended_color\fP uses \fBint\fPs
 for the color value and
 for setting the red, green, and blue components,
 allowing a larger number of colors to be supported.
 .SS color_content
-The \fBcolor_content\fP routine gives programmers a way to find the intensity
+The \fB\%color_content\fP routine gives programmers a way to find the intensity
 of the red, green, and blue (RGB) components in a color.
 It requires four arguments: the color number, and three addresses
 of \fBshort\fRs for storing
@@ -328,57 +319,57 @@ the information about the amounts of red, green, and blue components in the
 given color.
 .bP
 The first argument must be a legal color value, i.e.,
-\fB0\fP through \fBCOLORS\-1\fP, inclusive.
+\fB0\fP through \fB\%COLORS\-1\fP, inclusive.
 .bP
 The values that are stored at the addresses pointed to by the
 last three arguments are in the range
 \fB0\fP (no component) through \fB1000\fP
 (maximum amount of component), inclusive.
 .SS extended_color_content
-Because \fBcolor_content\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%color_content\fP uses signed \fBshort\fPs for its parameters,
 that limits color-values and their red, green, and blue components
 to 32767 on modern hardware.
-The extension \fBextended_color_content\fP uses \fBint\fPs
+The extension \fB\%extended_color_content\fP uses \fBint\fPs
 for the color value and
 for returning the red, green, and blue components,
 allowing a larger number of colors to be supported.
 .SS pair_content
-The \fBpair_content\fP routine allows programmers to find out what colors a
+The \fB\%pair_content\fP routine allows programmers to find out what colors a
 given color-pair consists of.
 It requires three arguments: the color-pair
 number, and two addresses of \fBshort\fRs for storing the foreground and the
 background color numbers.
 .bP
 The first argument must be a legal color value,
-i.e., in the range \fB1\fP through \fBCOLOR_PAIRS\-1\fP, inclusive.
+i.e., in the range \fB1\fP through \fB\%COLOR_PAIRS\-1\fP, inclusive.
 .bP
 The values that are stored at the addresses pointed
 to by the second and third arguments are in the
-range \fB0\fP through \fBCOLORS\fP, inclusive.
+range \fB0\fP through \fB\%COLORS\fP, inclusive.
 .SS extended_pair_content
-Because \fBpair_content\fP uses signed \fBshort\fPs for its parameters,
+Because \fB\%pair_content\fP uses signed \fBshort\fPs for its parameters,
 that limits color-pair and color-values to 32767 on modern hardware.
-The extension \fBextended_pair_content\fP uses \fBint\fPs
+The extension \fB\%extended_pair_content\fP uses \fBint\fPs
 for the color pair and
 for returning the foreground and background colors,
 allowing a larger number of colors to be supported.
 .SS reset_color_pairs
-The extension \fBreset_color_pairs\fP tells ncurses to discard all
-of the color-pair information which was set with \fBinit_pair\fP.
+The extension \fB\%reset_color_pairs\fP tells ncurses to discard all
+of the color-pair information which was set with \fB\%init_pair\fP.
 It also touches the current- and standard-screens, allowing an application to
 switch color palettes rapidly.
 .SS PAIR_NUMBER
-\fBPAIR_NUMBER(\fIattrs\fR) extracts the color
+\fB\%PAIR_NUMBER(\fIattrs\fR) extracts the color
 value from its \fIattrs\fP parameter and returns it as a color pair number.
 .SS COLOR_PAIR
-Its inverse \fBCOLOR_PAIR(\fIn\fB)\fR converts a color pair number
+Its inverse \fB\%COLOR_PAIR(\fIn\fB)\fR converts a color pair number
 to an attribute.
 Attributes can hold color pairs in the range 0 to 255.
 If you need a color pair larger than that, you must use functions
-such as \fBattr_set\fP (which pass the color pair as a separate parameter)
-rather than the legacy functions such as \fBattrset\fP.
+such as \fB\%attr_set\fP (which pass the color pair as a separate parameter)
+rather than the legacy functions such as \fB\%attrset\fP.
 .SH RETURN VALUE
-The routines \fBcan_change_color\fP and \fBhas_colors\fP return \fBTRUE\fP
+The routines \fB\%can_change_color\fP and \fB\%has_colors\fP return \fBTRUE\fP
 or \fBFALSE\fP.
 .PP
 All other routines return the integer \fBERR\fP upon failure and an \fBOK\fP
@@ -389,24 +380,24 @@ X/Open defines no error conditions.
 SVr4 does document some error conditions which apply in general:
 .bP
 This implementation will return \fBERR\fP on attempts to
-use color values outside the range \fB0\fP to \fBCOLORS\fP\-1
+use color values outside the range \fB0\fP to \fB\%COLORS\fP\-1
 (except for the default colors extension),
-or use color pairs outside the range \fB0\fP to \fBCOLOR_PAIRS\-1\fP.
+or use color pairs outside the range \fB0\fP to \fB\%COLOR_PAIRS\-1\fP.
 .IP
-Color values used in \fBinit_color\fP must be
+Color values used in \fB\%init_color\fP must be
 in the range \fB0\fP to \fB1000\fP.
 .IP
 An error is returned from all functions
 if the terminal has not been initialized.
 .IP
-An error is returned from secondary functions such as \fBinit_pair\fP
-if \fBstart_color\fP was not called.
+An error is returned from secondary functions such as \fB\%init_pair\fP
+if \fB\%start_color\fP was not called.
 .bP
 SVr4 does much the same, except that
-it returns \fBERR\fP from \fBpair_content\fP if the pair was not initialized
-using \fBinit_pairs\fP
+it returns \fBERR\fP from \fB\%pair_content\fP if the pair was not initialized
+using \fB\%init_pairs\fP
 and
-it returns \fBERR\fP from \fBcolor_content\fP
+it returns \fBERR\fP from \fB\%color_content\fP
 if the terminal does not support changing colors.
 .IP
 This implementation does not return \fBERR\fP for either case.
@@ -414,19 +405,19 @@ This implementation does not return \fBERR\fP for either case.
 Specific functions make additional checks:
 .RS 3
 .TP 5
-\fBinit_color\fP
+\fB\%init_color\fP
 returns an error if the terminal does not support
-this feature, e.g., if the \fBinitialize_color\fP capability is absent
+this feature, e.g., if the \fB\%initialize_color\fP capability is absent
 from the terminal description.
 .TP 5
-\fBstart_color\fP
+\fB\%start_color\fP
 returns an error if the color table cannot be allocated.
 .RE
 .SH NOTES
-In the \fBncurses\fP implementation, there is a separate color activation flag,
+In the \fIncurses\fP implementation, there is a separate color activation flag,
 color palette, color pairs table,
-and associated \fBCOLORS\fP and \fBCOLOR_PAIRS\fP counts
-for each screen; the \fBstart_color\fP function only affects the current
+and associated \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP counts
+for each screen; the \fB\%start_color\fP function only affects the current
 screen.
 The SVr4/XSI interface is not really designed with this in mind, and
 historical implementations may use a single shared color palette.
@@ -435,7 +426,7 @@ Setting an implicit background color via a color pair affects only
 character cells that a character write operation explicitly touches.
 To change
 the background color used when parts of a window are blanked by erasing or
-scrolling operations, see \fBcurs_bkgd\fP(3X).
+scrolling operations, see \fB\%curs_bkgd\fP(3X).
 .PP
 Several caveats apply on older x86 machines
 (e.g., i386, i486) with VGA-compatible graphics:
@@ -456,13 +447,13 @@ SVr3.2 introduced color support to curses in 1987.
 SVr4 made internal changes,
 e.g., moving the storage for the color state
 from \fBSP\fP (the \fBSCREEN\fP structure)
-to \fBcur_term\fP (the \fBTERMINAL\fP structure),
+to \fB\%cur_term\fP (the \fB\%TERMINAL\fP structure),
 but provided the same set of library functions.
 .PP
 SVr4 curses limits the number of color pairs to 64,
 reserving color pair zero (0) as the terminal's initial uncolored state.
 This limit arises because the color pair information is a bitfield
-in the \fBchtype\fP data type (denoted by \fBA_COLOR\fP).
+in the \fB\%chtype\fP data type (denoted by \fB\%A_COLOR\fP).
 .PP
 Other implementations of curses had different limits:
 .bP
@@ -470,24 +461,24 @@ PCCurses (1987-1990) provided for only eight (8) colors.
 .bP
 PDCurses (1992-present) inherited the 8-color limitation from PCCurses,
 but changed this to 256 in version 2.5 (2001),
-along with changing \fBchtype\fP from 16-bits to 32-bits.
+along with changing \fB\%chtype\fP from 16-bits to 32-bits.
 .bP
 X/Open Curses (1992-present)
-added a new structure \fBcchar_t\fP to store the character,
+added a new structure \fB\%cchar_t\fP to store the character,
 attributes and color-pair values, allowing increased range of color-pairs.
 Both color-pairs and color-values used a signed \fBshort\fP,
 limiting values to 15 bits.
 .bP
-ncurses (1992-present) uses eight bits for \fBA_COLOR\fP in \fBchtype\fP values.
+ncurses (1992-present) uses eight bits for \fB\%A_COLOR\fP in \fB\%chtype\fP values.
 .IP
 Version 5.3 provided a wide-character interface (2002),
 but left color-pairs as part of the attributes-field.
 .IP
 Since version 6 (2015),
-ncurses uses a separate \fBint\fP for color-pairs in the \fBcchar_t\fP values.
+ncurses uses a separate \fBint\fP for color-pairs in the \fB\%cchar_t\fP values.
 When those color-pair values fit in 8 bits,
 ncurses allows color-pairs to be manipulated
-via the functions using \fBchtype\fP values.
+via the functions using \fB\%chtype\fP values.
 .bP
 NetBSD curses used 6 bits from
 2000 (when colors were first supported) until 2004.
@@ -495,7 +486,7 @@ At that point, NetBSD changed to use 10 bits.
 As of 2021, that size is unchanged.
 Like ncurses before version 6,
 the NetBSD color-pair information is stored in
-the attributes field of \fBcchar_t\fP, limiting the number of color-pairs
+the attributes field of \fB\%cchar_t\fP, limiting the number of color-pairs
 by the size of the bitfield.
 .SH PORTABILITY
 .SS Extensions
@@ -504,19 +495,19 @@ and are not found in SVr4 curses, 4.4BSD curses,
 or any other previous version of curses.
 .SS Standards
 This implementation satisfies XSI Curses's minimum maximums
-for \fBCOLORS\fP and \fBCOLOR_PAIRS\fP.
+for \fB\%COLORS\fP and \fB\%COLOR_PAIRS\fP.
 .PP
-The \fBinit_pair\fP routine accepts negative values of foreground
-and background color to support the \fBuse_default_colors\fP(3X) extension,
+The \fB\%init_pair\fP routine accepts negative values of foreground
+and background color to support the \fB\%use_default_colors\fP(3X) extension,
 but only if that routine has been first invoked.
 .PP
-The assumption that \fBCOLOR_BLACK\fP is the default
+The assumption that \fB\%COLOR_BLACK\fP is the default
 background color for all terminals can be modified using the
-\fBassume_default_colors\fP(3X) extension.
+\fB\%assume_default_colors\fP(3X) extension.
 .PP
 This implementation checks the pointers,
 e.g., for the values returned by
-\fBcolor_content\fP and \fBpair_content\fP,
+\fB\%color_content\fP and \fB\%pair_content\fP,
 and will treat those as optional parameters when null.
 .PP
 X/Open Curses does not specify a limit for the number of colors and
@@ -528,10 +519,10 @@ This implementation provides extended versions of those functions
 which use \fBshort\fP parameters,
 allowing applications to use larger color- and pair-numbers.
 .PP
-The \fBreset_color_pairs\fP function is an extension of ncurses.
+The \fB\%reset_color_pairs\fP function is an extension of ncurses.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_attr\fP(3X),
-\fBcurs_variables\fP(3X),
-\fBdefault_colors\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_attr\fP(3X),
+\fB\%curs_variables\fP(3X),
+\fB\%default_colors\fP(3X)
diff --git a/man/curs_getyx.3x b/man/curs_getyx.3x
index 05bce4f9..887b4c28 100644
--- a/man/curs_getyx.3x
+++ b/man/curs_getyx.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_getyx.3x,v 1.31 2023/09/16 23:37:03 tom Exp $
-.TH curs_getyx 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_getyx.3x,v 1.37 2023/09/23 22:10:55 tom Exp $
+.TH curs_getyx 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%getyx\fP,
 \fB\%getparyx\fP,
@@ -36,25 +36,24 @@
 \fB\%getmaxyx\fP \-
 get \fIcurses\fR cursor and window coordinates
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBvoid getyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBvoid getparyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBvoid getbegyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.br
 \fBvoid getmaxyx(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
+.fi
 .SH DESCRIPTION
-The \fBgetyx\fP macro places the current cursor position of the given window in
+The \fB\%getyx\fP macro places the current cursor position of the given window in
 the two integer variables \fIy\fP and \fIx\fP.
 .PP
-If \fIwin\fP is a subwindow, the \fBgetparyx\fP macro places the beginning
+If \fIwin\fP is a subwindow, the \fB\%getparyx\fP macro places the beginning
 coordinates of the subwindow relative to the parent window into two integer
 variables \fIy\fP and \fIx\fP.
 Otherwise, \fB\-1\fP is placed into \fIy\fP and \fIx\fP.
 .PP
-Like \fBgetyx\fP, the \fBgetbegyx\fP and \fBgetmaxyx\fP macros store
+Like \fB\%getyx\fP, the \fB\%getbegyx\fP and \fB\%getmaxyx\fP macros store
 the current beginning coordinates and size of the specified window.
 .SH RETURN VALUE
 The return values of these macros are undefined (i.e.,
@@ -64,38 +63,39 @@ All of these interfaces are macros.
 A "\fB&\fP" is not necessary before the variables \fIy\fP and \fIx\fP.
 .SH PORTABILITY
 The
-\fBgetyx\fP,
-\fBgetparyx\fP,
-\fBgetbegyx\fP and
-\fBgetmaxyx\fP
+\fB\%getyx\fP,
+\fB\%getparyx\fP,
+\fB\%getbegyx\fP and
+\fB\%getmaxyx\fP
 macros are described in the XSI Curses standard, Issue 4.
 .PP
 This implementation also provides functions
-\fBgetbegx\fP,
-\fBgetbegy\fP,
-\fBgetcurx\fP,
-\fBgetcury\fP,
-\fBgetmaxx\fP,
-\fBgetmaxy\fP,
-\fBgetparx\fP and
-\fBgetpary\fP
-for compatibility with older versions of curses.
+\fB\%getbegx\fP,
+\fB\%getbegy\fP,
+\fB\%getcurx\fP,
+\fB\%getcury\fP,
+\fB\%getmaxx\fP,
+\fB\%getmaxy\fP,
+\fB\%getparx\fP and
+\fB\%getpary\fP
+for compatibility with older versions of \fIcurses\fP;
+see \fB\%curs_legacy\fP(3X).
 .PP
 Although X/Open Curses does not address this,
-many implementations provide members of the WINDOW structure
+many implementations provide members of the \fB\%WINDOW\fP structure
 containing values corresponding to these macros.
-For best portability, do not rely on using the data in WINDOW,
-since some implementations make WINDOW opaque (do not allow
+For best portability, do not rely on using the data in \fB\%WINDOW\fP,
+since some implementations make \fB\%WINDOW\fP opaque (do not allow
 direct use of its members).
 .PP
 Besides the problem of opaque structures,
 the data stored in like-named members may not have like-values in
 different implementations.
-For example, the WINDOW._maxx and WINDOW._maxy values in ncurses
+For example, the \fB\%WINDOW._maxx\fP and \fB\%WINDOW._maxy\fP values in \fIncurses\fP
 have (at least since release 1.8.1) differed by one from some
 other implementations.
-The difference is hidden by means of the macro \fBgetmaxyx\fP.
+The difference is hidden by means of the macro \fB\%getmaxyx\fP.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_legacy\fP(3X),
-\fBcurs_opaque\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_legacy\fP(3X),
+\fB\%curs_opaque\fP(3X)
diff --git a/man/curs_inopts.3x b/man/curs_inopts.3x
index 8e9b9863..56a9b1e7 100644
--- a/man/curs_inopts.3x
+++ b/man/curs_inopts.3x
@@ -28,8 +28,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_inopts.3x,v 1.47 2023/09/16 23:37:03 tom Exp $
-.TH curs_inopts 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_inopts.3x,v 1.54 2023/09/23 22:24:15 tom Exp $
+.TH curs_inopts 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -60,58 +60,44 @@
 \fB\%typeahead\fP \-
 get and set \fIcurses\fR terminal input options
 .SH SYNOPSIS
+.nf
 \fB#include \fP
 .PP
 \fBint cbreak(void);\fP
-.br
 \fBint nocbreak(void);\fP
-.sp
+.PP
 \fBint echo(void);\fP
-.br
 \fBint noecho(void);\fP
-.sp
+.PP
 \fBint intrflush(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint keypad(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint meta(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint nodelay(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.br
 \fBint notimeout(WINDOW *\fIwin\fB, bool \fIbf\fB);\fR
-.sp
+.PP
 \fBint nl(void);\fP
-.br
 \fBint nonl(void);\fP
-.sp
+.PP
 \fBint raw(void);\fP
-.br
 \fBint noraw(void);\fP
-.sp
+.PP
 \fBvoid qiflush(void);\fP
-.br
 \fBvoid noqiflush(void);\fP
-.sp
+.PP
 \fBint halfdelay(int \fItenths\fB);\fR
-.br
 \fBvoid timeout(int \fIdelay\fB);\fR
-.br
 \fBvoid wtimeout(WINDOW *\fIwin\fB, int \fIdelay\fB);\fR
-.sp
+.PP
 \fBint typeahead(int \fIfd\fB);\fR
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
 \fBint is_cbreak(void);\fP
-.br
 \fBint is_echo(void);\fP
-.br
 \fBint is_nl(void);\fP
-.br
 \fBint is_raw(void);\fP
-.br
+.fi
 .SH DESCRIPTION
-The \fBncurses\fP library provides several functions which let an application
+The \fIncurses\fP library provides several functions which let an application
 change the way input from the terminal is handled.
 Some are global, applying to all windows.
 Others apply only to a specific window.
@@ -123,51 +109,51 @@ is needed.
 .SS cbreak/nocbreak
 Normally, the tty driver buffers typed characters until a newline or carriage
 return is typed.
-The \fBcbreak\fP routine disables line buffering and
+The \fB\%cbreak\fP routine disables line buffering and
 erase/kill character-processing (interrupt and flow control characters are
 unaffected), making characters typed by the user immediately available to the
 program.
-The \fBnocbreak\fP routine returns the terminal to normal (cooked)
+The \fB\%nocbreak\fP routine returns the terminal to normal (cooked)
 mode.
 .PP
-Initially the terminal may or may not be in \fBcbreak\fP mode, as the mode is
-inherited; therefore, a program should call \fBcbreak\fP or \fBnocbreak\fP
+Initially the terminal may or may not be in \fB\%cbreak\fP mode, as the mode is
+inherited; therefore, a program should call \fB\%cbreak\fP or \fB\%nocbreak\fP
 explicitly.
-Most interactive programs using \fBcurses\fP set the \fBcbreak\fP
+Most interactive programs using \fIcurses\fP set the \fB\%cbreak\fP
 mode.
-Note that \fBcbreak\fP overrides \fBraw\fP.
-[See \fBcurs_getch\fP(3X) for a
-discussion of how these routines interact with \fBecho\fP and \fBnoecho\fP.]
+Note that \fB\%cbreak\fP overrides \fBraw\fP.
+[See \fB\%curs_getch\fP(3X) for a
+discussion of how these routines interact with \fBecho\fP and \fB\%noecho\fP.]
 .\"
 .SS echo/noecho
-The \fBecho\fP and \fBnoecho\fP routines control whether characters typed by
-the user are echoed by \fBgetch\fP(3X) as they are typed.
+The \fBecho\fP and \fB\%noecho\fP routines control whether characters typed by
+the user are echoed by \fB\%getch\fP(3X) as they are typed.
 Echoing by the tty
-driver is always disabled, but initially \fBgetch\fP is in echo mode, so
+driver is always disabled, but initially \fB\%getch\fP is in echo mode, so
 characters typed are echoed.
 Authors of most interactive programs prefer to do
 their own echoing in a controlled area of the screen, or not to echo at all, so
-they disable echoing by calling \fBnoecho\fP.
-[See \fBcurs_getch\fP(3X) for a
-discussion of how these routines interact with \fBcbreak\fP and
-\fBnocbreak\fP.]
+they disable echoing by calling \fB\%noecho\fP.
+[See \fB\%curs_getch\fP(3X) for a
+discussion of how these routines interact with \fB\%cbreak\fP and
+\fB\%nocbreak\fP.]
 .\"
 .SS halfdelay
-The \fBhalfdelay\fP routine is used for half-delay mode, which is similar to
-\fBcbreak\fP mode in that characters typed by the user are immediately
+The \fB\%halfdelay\fP routine is used for half-delay mode, which is similar to
+\fB\%cbreak\fP mode in that characters typed by the user are immediately
 available to the program.
 However, after blocking for \fItenths\fP tenths of
 seconds, \fBERR\fP is returned if nothing has been typed.
 The value of \fItenths\fP
 must be a number between 1 and 255.
-Use \fBnocbreak\fP to leave half-delay
+Use \fB\%nocbreak\fP to leave half-delay
 mode.
 .\"
 .SS intrflush
-If the \fBintrflush\fP option is enabled (\fIbf\fP is \fBTRUE\fP), and an
+If the \fB\%intrflush\fP option is enabled (\fIbf\fP is \fBTRUE\fP), and an
 interrupt key is pressed on the keyboard (interrupt, break, quit), all output in
 the tty driver queue will be flushed, giving the effect of faster response to
-the interrupt, but causing \fBcurses\fP to have the wrong idea of what is on
+the interrupt, but causing \fIcurses\fP to have the wrong idea of what is on
 the screen.
 Disabling the option (\fIbf\fP is \fBFALSE\fP) prevents the
 flush.
@@ -175,24 +161,24 @@ The default for the option is inherited from the tty driver settings.
 The window argument is ignored.
 .\"
 .SS keypad
-The \fBkeypad\fP option enables the keypad of the user's terminal.
+The \fB\%keypad\fP option enables the keypad of the user's terminal.
 If
 enabled (\fIbf\fP is \fBTRUE\fP), the user can press a function key
-(such as an arrow key) and \fBwgetch\fP(3X) returns a single value
-representing the function key, as in \fBKEY_LEFT\fP.
+(such as an arrow key) and \fB\%wgetch\fP(3X) returns a single value
+representing the function key, as in \fB\%KEY_LEFT\fP.
 If disabled
-(\fIbf\fP is \fBFALSE\fP), \fBcurses\fP does not treat function keys
+(\fIbf\fP is \fBFALSE\fP), \fIcurses\fP does not treat function keys
 specially and the program has to interpret the escape sequences
 itself.
 If the keypad in the terminal can be turned on (made to
 transmit) and off (made to work locally), turning on this option
-causes the terminal keypad to be turned on when \fBwgetch\fP(3X) is
+causes the terminal keypad to be turned on when \fB\%wgetch\fP(3X) is
 called.
 The default value for keypad is \fBFALSE\fP.
 .\"
 .SS meta
 Initially, whether the terminal returns 7 or 8 significant bits on
-input depends on the control mode of the tty driver [see \fBtermios\fP(3)].
+input depends on the control mode of the tty driver [see \fB\%termios\fP(3)].
 To force 8 bits to be returned, invoke \fBmeta\fP(\fIwin\fP,
 \fBTRUE\fP); this is equivalent, under POSIX, to setting the CS8 flag
 on the terminal.
@@ -212,44 +198,44 @@ The \fBnl\fP and \fBnonl\fP routines control whether the underlying display
 device translates the return key into newline on input.
 .\"
 .SS nodelay
-The \fBnodelay\fP option causes \fBgetch\fP to be a non-blocking call.
-If no input is ready, \fBgetch\fP returns \fBERR\fP.
+The \fB\%nodelay\fP option causes \fB\%getch\fP to be a non-blocking call.
+If no input is ready, \fB\%getch\fP returns \fBERR\fP.
 If disabled
-(\fIbf\fP is \fBFALSE\fP), \fBgetch\fP waits until a key is pressed.
+(\fIbf\fP is \fBFALSE\fP), \fB\%getch\fP waits until a key is pressed.
 .SS notimeout
-When interpreting an escape sequence, \fBwgetch\fP(3X) sets a timer
+When interpreting an escape sequence, \fB\%wgetch\fP(3X) sets a timer
 while waiting for the next character.
-If \fBnotimeout(\fIwin\fR,
-\fBTRUE\fP) is called, then \fBwgetch\fP does not set a timer.
+If \fB\%notimeout(\fIwin\fR,
+\fBTRUE\fP) is called, then \fB\%wgetch\fP does not set a timer.
 The
 purpose of the timeout is to differentiate between sequences received
 from a function key and those typed by a user.
 .\"
 .SS raw/noraw
-The \fBraw\fP and \fBnoraw\fP routines place the terminal into or out of raw
+The \fBraw\fP and \fB\%noraw\fP routines place the terminal into or out of raw
 mode.
-Raw mode is similar to \fBcbreak\fP mode, in that characters typed are
+Raw mode is similar to \fB\%cbreak\fP mode, in that characters typed are
 immediately passed through to the user program.
 The differences are that in
 raw mode, the interrupt, quit, suspend, and flow control characters are all
 passed through uninterpreted, instead of generating a signal.
 The behavior of
 the BREAK key depends on other bits in the tty driver that are not set by
-\fBcurses\fP.
+\fIcurses\fP.
 .\"
 .SS qiflush/noqiflush
-When the \fBnoqiflush\fP routine is used, normal flush of input and
+When the \fB\%noqiflush\fP routine is used, normal flush of input and
 output queues associated with the \fBINTR\fP, \fBQUIT\fP and
-\fBSUSP\fP characters will not be done [see \fBtermios\fP(3)].
+\fBSUSP\fP characters will not be done [see \fB\%termios\fP(3)].
 When
-\fBqiflush\fP is called, the queues will be flushed when these control
+\fB\%qiflush\fP is called, the queues will be flushed when these control
 characters are read.
-You may want to call \fBnoqiflush\fP in a signal
+You may want to call \fB\%noqiflush\fP in a signal
 handler if you want output to continue as though the interrupt
 had not occurred, after the handler exits.
 .\"
 .SS timeout/wtimeout
-The \fBtimeout\fP and \fBwtimeout\fP routines set blocking or
+The \fB\%timeout\fP and \fB\%wtimeout\fP routines set blocking or
 non-blocking read for a given window.
 If \fIdelay\fP is negative,
 blocking read is used (i.e., waits indefinitely for
@@ -259,21 +245,21 @@ If \fIdelay\fP is zero, then non-blocking read is used
 If
 \fIdelay\fP is positive, then read blocks for \fIdelay\fP
 milliseconds, and returns \fBERR\fP if there is still no input.
-Hence, these routines provide the same functionality as \fBnodelay\fP,
+Hence, these routines provide the same functionality as \fB\%nodelay\fP,
 plus the additional capability of being able to block for only
 \fIdelay\fP milliseconds (where \fIdelay\fP is positive).
 .\"
 .SS typeahead
-The \fBcurses\fP library does \*(``line-breakout optimization\*(''
+The \fIcurses\fP library does \*(``line-breakout optimization\*(''
 by looking for typeahead periodically while updating the screen.
 If input is found, and it is coming from a tty,
 the current update is postponed until
-\fBrefresh\fP(3X) or \fBdoupdate\fP is called again.
+\fB\%refresh\fP(3X) or \fB\%doupdate\fP is called again.
 This allows faster response to commands typed in advance.
 Normally, the input FILE
-pointer passed to \fBnewterm\fP, or \fBstdin\fP in the case that
-\fBinitscr\fP was used, will be used to do this typeahead checking.
-The \fBtypeahead\fP routine specifies that the file descriptor
+pointer passed to \fB\%newterm\fP, or \fBstdin\fP in the case that
+\fB\%initscr\fP was used, will be used to do this typeahead checking.
+The \fB\%typeahead\fP routine specifies that the file descriptor
 \fIfd\fP is to be used to check for typeahead instead.
 If \fIfd\fP is
 \-1, then no typeahead checking is done.
@@ -291,7 +277,7 @@ Any function will also return an error if the terminal was not initialized.
 Also,
 .RS 3
 .TP 5
-\fBhalfdelay\fP
+\fB\%halfdelay\fP
 returns an error
 if its parameter is outside the range 1..255.
 .RE
@@ -317,64 +303,64 @@ if the flag is set,
 0
 if the flag is reset, or
 .TP 5
--1
-if the curses library was not initialized.
+\-1
+if the \fIcurses\fP library was not initialized.
 .PP
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
 They were not supported on Version 7, BSD or System V implementations.
-It is recommended that any code depending on ncurses extensions
+It is recommended that any code depending on \fIncurses\fP extensions
 be conditioned using NCURSES_VERSION.
 .SH PORTABILITY
 Except as noted in the section on extensions,
 these functions are described in the XSI Curses standard, Issue 4.
 .PP
-The ncurses library obeys the XPG4 standard and the historical practice of the
-AT&T curses implementations, in that the echo bit is cleared when curses
+The \fIncurses\fP library obeys the XPG4 standard and the historical practice of the
+AT&T \fIcurses\fP implementations, in that the echo bit is cleared when \fIcurses\fP
 initializes the terminal state.
-BSD curses differed from this slightly; it
+BSD \fIcurses\fP differed from this slightly; it
 left the echo bit on at initialization, but the BSD \fBraw\fP call turned it
 off as a side-effect.
-For best portability, set \fBecho \fPor \fBnoecho\fP explicitly
+For best portability, set \fBecho \fPor \fB\%noecho\fP explicitly
 just after initialization, even if your program remains in cooked mode.
 .PP
 The XSI Curses standard is ambiguous on the question of whether \fBraw\fP
 should disable the CRLF translations controlled by \fBnl\fP and \fBnonl\fP.
-BSD curses did turn off these translations; AT&T curses (at least as late as
+BSD \fIcurses\fP did turn off these translations; AT&T \fIcurses\fP (at least as late as
 SVr1) did not.
 We chose to do so, on the theory that a programmer requesting
 raw input wants a clean (ideally 8-bit clean) connection that the operating
 system will not alter.
 .PP
-When \fBkeypad\fP is first enabled,
-ncurses loads the key-definitions for the current terminal description.
+When \fB\%keypad\fP is first enabled,
+\fIncurses\fP loads the key-definitions for the current terminal description.
 If the terminal description includes extended string capabilities,
 e.g., from using the \fB\-x\fP option of \fB@TIC@\fP,
-then ncurses also defines keys for the capabilities whose names
+then \fIncurses\fP also defines keys for the capabilities whose names
 begin with \*(``k\*(''.
 The corresponding keycodes are generated and (depending on previous
 loads of terminal descriptions) may differ from one execution of a
 program to the next.
-The generated keycodes are recognized by the \fBkeyname\fP function
+The generated keycodes are recognized by the \fB\%keyname\fP function
 (which will then return a name beginning with \*(``k\*('' denoting the
-terminfo capability name rather than \*(``K\*('', used for curses key-names).
-On the other hand, an application can use \fBdefine_key\fP to establish
+terminfo capability name rather than \*(``K\*('', used for \fIcurses\fP key-names).
+On the other hand, an application can use \fB\%define_key\fP to establish
 a specific keycode for a given string.
 This makes it possible for an application to check for an extended
-capability's presence with \fBtigetstr\fP,
+capability's presence with \fB\%tigetstr\fP,
 and reassign the keycode to match its own needs.
 .PP
-Low-level applications can use \fBtigetstr\fP to obtain the definition
+Low-level applications can use \fB\%tigetstr\fP to obtain the definition
 of any particular string capability.
-Higher-level applications which use the curses \fBwgetch\fP
+Higher-level applications which use the \fIcurses\fP \fB\%wgetch\fP
 and similar functions to return keycodes rely upon the order in which
 the strings are loaded.
 If more than one key definition has the same string value,
-then \fBwgetch\fP can return only one keycode.
-Most curses implementations (including ncurses)
+then \fB\%wgetch\fP can return only one keycode.
+Most \fIcurses\fP implementations (including \fIncurses\fP)
 load key definitions in the order
 defined by the array of string capability names.
 The last key to be loaded determines the keycode which will be returned.
-In ncurses, you may also have extended capabilities interpreted as
+In \fIncurses\fP, you may also have extended capabilities interpreted as
 key definitions.
 These are loaded after the predefined keys,
 and if a capability's value is the same as a previously-loaded
@@ -383,28 +369,28 @@ the later definition is the one used.
 .SH NOTES
 Note that
 \fBecho\fP,
-\fBnoecho\fP,
-\fBhalfdelay\fP,
-\fBintrflush\fP,
+\fB\%noecho\fP,
+\fB\%halfdelay\fP,
+\fB\%intrflush\fP,
 \fBmeta\fP,
 \fBnl\fP,
 \fBnonl\fP,
-\fBnodelay\fP,
-\fBnotimeout\fP,
-\fBnoqiflush\fP,
-\fBqiflush\fP,
-\fBtimeout\fP, and
-\fBwtimeout\fP may be macros.
+\fB\%nodelay\fP,
+\fB\%notimeout\fP,
+\fB\%noqiflush\fP,
+\fB\%qiflush\fP,
+\fB\%timeout\fP, and
+\fB\%wtimeout\fP may be macros.
 .PP
-The \fBnoraw\fP and \fBnocbreak\fP calls follow historical practice in that
+The \fB\%noraw\fP and \fB\%nocbreak\fP calls follow historical practice in that
 they attempt to restore to normal (\*(``cooked\*('') mode
 from raw and cbreak modes respectively.
 Mixing raw/noraw and cbreak/nocbreak calls leads to tty driver
 control states that are hard to predict or understand; it is not recommended.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_getch\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_util\fP(3X),
-\fBdefine_key\fP(3X),
-\fBtermios\fP(3)
+\fB\%curses\fP(3X),
+\fB\%curs_getch\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_util\fP(3X),
+\fB\%define_key\fP(3X),
+\fB\%termios\fP(3)
diff --git a/man/curs_legacy.3x b/man/curs_legacy.3x
index 86c0176f..233a2d06 100644
--- a/man/curs_legacy.3x
+++ b/man/curs_legacy.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_legacy.3x,v 1.22 2023/09/16 23:37:03 tom Exp $
-.TH curs_legacy 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_legacy.3x,v 1.27 2023/09/23 22:11:47 tom Exp $
+.TH curs_legacy 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
@@ -45,52 +45,50 @@
 \fB\%getpary\fP \-
 get \fIcurses\fR cursor and window coordinates or attributes (legacy)
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBint getattrs(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getbegx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getbegy(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getcurx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getcury(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getmaxx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getmaxy(const WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBint getparx(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint getpary(const WINDOW *\fIwin\fB);\fR
+.fi
 .SH DESCRIPTION
-These legacy functions are simpler to use than the X/Open Curses functions:
+These legacy functions are simpler to use than the X/Open \fIcurses\fP functions:
 .bP
-The \fBgetattrs\fP function returns the same attribute data as \fBwattr_get\fP.
+The \fB\%getattrs\fP function returns the same attribute data as \fB\%wattr_get\fP.
 .IP
-However, \fBgetattrs\fP returns an integer (actually a \fBchtype\fP),
-while \fBwattr_get\fP returns the current color pair in a separate parameter.
+However, \fB\%getattrs\fP returns an integer (actually a \fB\%chtype\fP),
+while \fB\%wattr_get\fP returns the current color pair in a separate parameter.
 In the wide-character library configuration,
-color pairs may not fit into a \fBchtype\fP,
-so \fBwattr_get\fP is the only way to obtain the color information.
+color pairs may not fit into a \fB\%chtype\fP,
+so \fB\%wattr_get\fP is the only way to obtain the color information.
 .IP
-Because \fBgetattrs\fP returns the attributes in a single parameter,
+Because \fB\%getattrs\fP returns the attributes in a single parameter,
 it would not be possible for an application to distinguish that from
 \fBERR\fP (a \fI-1\fP).
-If the window parameter is null, \fBgetattrs\fP returns \fBA_NORMAL\fP (zero).
+If the window parameter is null, \fB\%getattrs\fP returns \fB\%A_NORMAL\fP (zero).
 .bP
-The \fBgetbegy\fP and \fBgetbegx\fP functions return the same
-data as \fBgetbegyx\fP.
+The \fB\%getbegy\fP and \fB\%getbegx\fP functions return the same
+data as \fB\%getbegyx\fP.
 .bP
-The \fBgetcury\fP and \fBgetcurx\fP functions return the same
-data as \fBgetyx\fP.
+The \fB\%getcury\fP and \fB\%getcurx\fP functions return the same
+data as \fB\%getyx\fP.
 .bP
-The \fBgetmaxy\fP and \fBgetmaxx\fP functions return the same
-data as \fBgetmaxyx\fP.
+The \fB\%getmaxy\fP and \fB\%getmaxx\fP functions return the same
+data as \fB\%getmaxyx\fP.
 .bP
-The \fBgetpary\fP and \fBgetparx\fP functions return the same
-data as \fBgetparyx\fP.
+The \fB\%getpary\fP and \fB\%getparx\fP functions return the same
+data as \fB\%getparyx\fP.
 .SH RETURN VALUE
 Except as noted,
 these functions return an integer,
@@ -98,19 +96,19 @@ or \fBERR\fP if the window parameter is null.
 .SH NOTES
 All of these interfaces are provided as macros and functions.
 The macros are suppressed (and only the functions provided)
-when \fBNCURSES_OPAQUE\fP is defined.
-The standard forms such as \fBgetyx\fP must be implemented as macros,
+when \fB\%NCURSES_OPAQUE\fP is defined.
+The standard forms such as \fB\%getyx\fP must be implemented as macros,
 and (in this implementation) are defined in terms of the functions
 described here,
-to avoid reliance on internal details of the WINDOW structure.
+to avoid reliance on internal details of the \fB\%WINDOW\fP structure.
 .SH PORTABILITY
 These functions were supported on Version 7, BSD or System V implementations.
 None of those implementations checked the window parameter.
 .PP
-The \fBgetattrs\fP function and macro are defined to return a (signed) integer
+The \fB\%getattrs\fP function and macro are defined to return a (signed) integer
 for compatibility with those implementations
 although an unsigned type would have been more appropriate.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_getyx\fP(3X),
-\fBcurs_opaque\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_getyx\fP(3X),
+\fB\%curs_opaque\fP(3X)
diff --git a/man/curs_memleaks.3x b/man/curs_memleaks.3x
index c04598a9..18273731 100644
--- a/man/curs_memleaks.3x
+++ b/man/curs_memleaks.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_memleaks.3x,v 1.21 2023/09/16 23:37:03 tom Exp $
-.TH curs_memleaks 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_memleaks.3x,v 1.25 2023/09/23 21:07:59 tom Exp $
+.TH curs_memleaks 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -42,28 +42,25 @@
 \fB\%exit_terminfo\fP \-
 check for memory leaks in \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.br
 \fBvoid exit_curses(int \fIcode\fB);\fR
-.sp
+.PP
 \fB#include \fP
-.br
 \fBvoid exit_terminfo(int \fIcode\fB);\fR
-.sp
+.PP
 /* deprecated (intentionally not declared in curses.h or term.h) */
-.br
 \fBvoid _nc_freeall(void);\fP
-.br
 \fBvoid _nc_free_and_exit(int \fIcode\fB);\fR
-.br
 \fBvoid _nc_free_tinfo(int \fIcode\fB);\fR
+.fi
 .SH DESCRIPTION
 These functions are used to simplify analysis of memory leaks in the ncurses
 library.
 .PP
 Any implementation of curses must not free the memory associated with
-a screen, since (even after calling \fBendwin\fP(3X)), it must be available
-for use in the next call to \fBrefresh\fP(3X).
+a screen, since (even after calling \fB\%endwin\fP(3X)), it must be available
+for use in the next call to \fB\%refresh\fP(3X).
 There are also chunks of memory held for performance reasons.
 That makes it hard to analyze curses applications for memory leaks.
 When using the specially configured debugging version of the ncurses library,
@@ -73,28 +70,28 @@ simplifying the process of memory-leak checking.
 Some of the functions are named with a \*(``_nc_\*('' prefix
 because they are not intended for use in the non-debugging library:
 .TP 5
-\fB_nc_freeall\fP
+\fB\%_nc_freeall\fP
 This frees (almost) all of the memory allocated by ncurses.
 .TP 5
-\fB_nc_free_and_exit\fP
-This frees the memory allocated by ncurses (like \fB_nc_freeall\fP),
+\fB\%_nc_free_and_exit\fP
+This frees the memory allocated by ncurses (like \fB\%_nc_freeall\fP),
 and exits the program.
-It is preferred over \fB_nc_freeall\fP since some of that memory
+It is preferred over \fB\%_nc_freeall\fP since some of that memory
 may be required to keep the application running.
 Simply exiting (with the given exit-code) is safer.
 .TP 5
-\fB_nc_free_tinfo\fP
+\fB\%_nc_free_tinfo\fP
 Use this function if only the low-level terminfo functions (and
 corresponding library) are used.
-Like \fB_nc_free_and_exit\fP, it exits the program after freeing memory.
+Like \fB\%_nc_free_and_exit\fP, it exits the program after freeing memory.
 .PP
 The functions prefixed \*(``_nc\*('' are normally not available;
 they must be configured into the library
-at build time using the \fB\-\-disable-leaks\fP option.
+at build time using the \fB\%\-\-disable-leaks\fP option.
 That compiles-in code that frees memory that normally would not be freed.
 .PP
-The \fBexit_curses\fP and \fBexit_terminfo\fP functions
-call \fB_nc_free_and_exit\fP and \fB_nc_free_tinfo\fP if
+The \fB\%exit_curses\fP and \fB\%exit_terminfo\fP functions
+call \fB\%_nc_free_and_exit\fP and \fB\%_nc_free_tinfo\fP if
 the library is configured to support memory-leak checking.
 If the library is not configured to support memory-leak checking,
 they simply call \fBexit\fP.
@@ -107,18 +104,18 @@ nor do other implementations of curses provide a similar feature.
 In any implementation of X/Open Curses, an application can free part
 of the memory allocated by curses:
 .bP
-The portable part of \fBexit_curses\fP can be freed using \fBdelscreen\fP,
-passing the \fBSCREEN*\fP pointer returned by \fBnewterm\fP.
+The portable part of \fB\%exit_curses\fP can be freed using \fB\%delscreen\fP,
+passing the \fBSCREEN*\fP pointer returned by \fB\%newterm\fP.
 .IP
 In some implementations, there is a global variable \fBsp\fP
 which could be used, e.g., if the screen were only initialized
-using \fBinitscr\fP.
+using \fB\%initscr\fP.
 .bP
-The portable part of \fBexit_terminfo\fP can be freed using \fBdel_curterm\fP.
+The portable part of \fB\%exit_terminfo\fP can be freed using \fB\%del_curterm\fP.
 .IP
-In this case, there is a global variable \fBcur_term\fP which can be
+In this case, there is a global variable \fB\%cur_term\fP which can be
 used as parameter.
 .SH SEE ALSO
-\fBcurs_initscr\fP(3X),
-\fBcurs_terminfo\fP(3X).
-\fBcurses\fP(3X).
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_terminfo\fP(3X),
+\fB\%curses\fP(3X)
diff --git a/man/curs_mouse.3x b/man/curs_mouse.3x
index 31d128f3..8f40045c 100644
--- a/man/curs_mouse.3x
+++ b/man/curs_mouse.3x
@@ -28,8 +28,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_mouse.3x,v 1.71 2023/09/16 23:37:03 tom Exp $
-.TH curs_mouse 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_mouse.3x,v 1.78 2023/09/23 23:08:40 tom Exp $
+.TH curs_mouse 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -68,42 +68,39 @@
 \fB\%mouseinterval\fP \-
 get mouse events in \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include \fP
 .PP
 \fBtypedef unsigned long mmask_t;\fP
 .PP
-.nf
 \fBtypedef struct {\fP
 \fB    short id;         \fI/* ID to distinguish multiple devices */\fR
 \fB    int x, y, z;      \fI/* event coordinates */\fR
 \fB    mmask_t bstate;   \fI/* button state bits */\fR
 \fB} MEVENT;\fP
-.fi
 .PP
 \fBbool has_mouse(void);\fP
-.sp
+.PP
 \fBint getmouse(MEVENT *\fIevent\fB);\fR
-.br
 \fBint ungetmouse(MEVENT *\fIevent\fB);\fR
-.sp
+.PP
 \fBmmask_t mousemask(mmask_t \fInewmask\fB, mmask_t *\fIoldmask\fB);\fR
-.sp
+.PP
 \fBbool wenclose(const WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);\fR
-.sp
+.PP
 \fBbool mouse_trafo(int* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
-.br
 \fBbool wmouse_trafo(const WINDOW* \fIwin\fB,\fR
                   \fBint* \fIpY\fB, int* \fIpX\fB, bool \fIto_screen\fB);\fR
-.sp
+.PP
 \fBint mouseinterval(int \fIerval\fB);\fR
-.br
+.fi
 .SH DESCRIPTION
 These functions provide an interface to mouse events from
-\fBncurses\fP(3X).
-Mouse events are represented by \fBKEY_MOUSE\fP
-pseudo-key values in the \fBwgetch\fP(3X) input stream.
+\fB\%ncurses\fP(3X).
+Mouse events are represented by \fB\%KEY_MOUSE\fP
+pseudo-key values in the \fB\%wgetch\fP(3X) input stream.
 .SS mousemask
-To make mouse events visible, use the \fBmousemask\fP function.
+To make mouse events visible, use the \fB\%mousemask\fP function.
 This sets the mouse events to be reported.
 By default, no mouse events are reported.
 .bP
@@ -114,7 +111,7 @@ If the screen has not been initialized,
 or if the terminal does not support mouse-events,
 this function returns 0.
 .bP
-If \fIoldmask\fP is non-NULL,
+If \fIoldmask\fP is non-\fBNULL\fP,
 this function fills the indicated location with the previous value of the
 current screen's mouse event mask.
 .PP
@@ -125,10 +122,10 @@ Whether this happens is device-dependent.
 Here are the mouse event type masks which may be defined:
 .PP
 .TS
-l l
-_ _
-l l.
-\fBName\fP	\fBDescription\fP
+lB lB
+lB l .
+Name	Description
+_
 BUTTON1_PRESSED	mouse button 1 down
 BUTTON1_RELEASED	mouse button 1 up
 BUTTON1_CLICKED	mouse button 1 clicked
@@ -168,39 +165,39 @@ _
 .TE
 .SS getmouse
 Once a class of mouse events has been made visible in a window,
-calling the \fBwgetch\fP function on that window may return
-\fBKEY_MOUSE\fP as an indicator that a mouse event has been queued.
+calling the \fB\%wgetch\fP function on that window may return
+\fB\%KEY_MOUSE\fP as an indicator that a mouse event has been queued.
 To read the event data and pop the event off the queue, call
-\fBgetmouse\fP.
+\fB\%getmouse\fP.
 This function will return \fBOK\fP if a mouse event
 is actually visible in the given window, \fBERR\fP otherwise.
-When \fBgetmouse\fP returns \fBOK\fP, the data deposited as y and
+When \fB\%getmouse\fP returns \fBOK\fP, the data deposited as y and
 x in the event structure coordinates will be screen-relative character-cell
 coordinates.
 The returned state mask will have exactly one bit set to
 indicate the event type.
 The corresponding data in the queue is marked invalid.
-A subsequent call to \fBgetmouse\fP will retrieve the next older
+A subsequent call to \fB\%getmouse\fP will retrieve the next older
 item from the queue.
 .SS ungetmouse
-The \fBungetmouse\fP function behaves analogously to \fBungetch\fP.
+The \fB\%ungetmouse\fP function behaves analogously to \fB\%ungetch\fP.
 It pushes
-a \fBKEY_MOUSE\fP event onto the input queue, and associates with that event
+a \fB\%KEY_MOUSE\fP event onto the input queue, and associates with that event
 the given state data and screen-relative character-cell coordinates.
 .SS wenclose
-The \fBwenclose\fP function tests whether a given pair of screen-relative
+The \fB\%wenclose\fP function tests whether a given pair of screen-relative
 character-cell coordinates is enclosed by a given window, returning \fBTRUE\fP
 if it is and \fBFALSE\fP otherwise.
 It is useful for determining what subset of
 the screen windows enclose the location of a mouse event.
 .SS wmouse_trafo
-The \fBwmouse_trafo\fP function transforms a given pair of coordinates
+The \fB\%wmouse_trafo\fP function transforms a given pair of coordinates
 from stdscr-relative coordinates
 to coordinates relative to the given window or vice versa.
 The resulting stdscr-relative coordinates are not always identical
 to window-relative coordinates due to the mechanism to reserve lines on top
 or bottom of the screen for other purposes
-(see the \fBripoffline\fP and \fBslk_init\fP(3X) calls, for example).
+(see the \fB\%ripoffline\fP and \fB\%slk_init\fP(3X) calls, for example).
 .bP
 If the parameter \fIto_screen\fP is \fBTRUE\fP, the pointers
 \fIpY, pX\fP must reference the coordinates of a location
@@ -209,7 +206,7 @@ They are converted to window-relative coordinates and returned
 through the pointers.
 If the conversion was successful, the function returns \fBTRUE\fP.
 .bP
-If one of the parameters was NULL or the location is
+If one of the parameters was \fBNULL\fP or the location is
 not inside the window, \fBFALSE\fP is returned.
 .bP
 If \fIto_screen\fP is
@@ -219,38 +216,38 @@ They are converted to stdscr-relative coordinates if the
 window \fIwin\fP encloses this point.
 In this case the function returns \fBTRUE\fP.
 .bP
-If one of the parameters is NULL or the point is not inside the
+If one of the parameters is \fBNULL\fP or the point is not inside the
 window, \fBFALSE\fP is returned.
 The referenced coordinates
 are only replaced by the converted coordinates if the transformation was
 successful.
 .SS mouse_trafo
-The \fBmouse_trafo\fP function performs the same translation
-as \fBwmouse_trafo\fP,
+The \fB\%mouse_trafo\fP function performs the same translation
+as \fB\%wmouse_trafo\fP,
 using stdscr for \fIwin\fP.
 .SS mouseinterval
-The \fBmouseinterval\fP function sets the maximum time (in thousands of a
+The \fB\%mouseinterval\fP function sets the maximum time (in thousands of a
 second) that can elapse between press and release events for them to
 be recognized as a click.
-Use \fBmouseinterval(0)\fP to disable click resolution.
+Use \fB\%mouseinterval(0)\fP to disable click resolution.
 This function returns the previous interval value.
-Use \fBmouseinterval(\-1)\fP to obtain the interval without altering it.
+Use \fB\%mouseinterval(\-1)\fP to obtain the interval without altering it.
 The default is one sixth of a second.
 .SS has_mouse
-The \fBhas_mouse\fP function returns \fBTRUE\fP if the mouse driver has been
+The \fB\%has_mouse\fP function returns \fBTRUE\fP if the mouse driver has been
 successfully initialized.
 .PP
 Note that mouse events will be ignored when input is in cooked mode, and will
 cause an error beep when cooked mode is being simulated in a window by a
-function such as \fBgetstr\fP that expects a linefeed for input-loop
+function such as \fB\%getstr\fP that expects a linefeed for input-loop
 termination.
 .SH RETURN VALUE
-\fBgetmouse\fP and \fBungetmouse\fP
+\fB\%getmouse\fP and \fB\%ungetmouse\fP
 return the integer \fBERR\fP upon failure or \fBOK\fP
 upon successful completion:
 .RS 3
 .TP 5
-\fBgetmouse\fP
+\fB\%getmouse\fP
 returns an error.
 .bP
 If no mouse driver was initialized, or
@@ -261,26 +258,26 @@ current \fImousemask\fP.
 .bP
 It also returns an error if no more events remain in the queue.
 .TP 5
-\fBungetmouse\fP
+\fB\%ungetmouse\fP
 returns an error if the FIFO is full.
 .RE
 .PP
-\fBmousemask\fP
+\fB\%mousemask\fP
 returns the mask of reportable events.
 .PP
-\fBmouseinterval\fP
+\fB\%mouseinterval\fP
 returns the previous interval value, unless
 the terminal was not initialized.
 In that case, it returns the maximum interval value (166).
 .PP
-\fBwenclose\fP and \fBwmouse_trafo\fP
+\fB\%wenclose\fP and \fB\%wmouse_trafo\fP
 are boolean functions returning \fBTRUE\fP or \fBFALSE\fP depending
 on their test result.
 .SH PORTABILITY
-These calls were designed for \fBncurses\fP(3X), and are not found in SVr4
-curses, 4.4BSD curses, or any other previous version of curses.
+These calls were designed for \fIncurses\fP, and are not found in SVr4
+\fIcurses\fP, 4.4BSD \fIcurses\fP, or any other previous version of \fIcurses\fP.
 .PP
-SVr4 curses had support for the mouse in a variant of \fBxterm\fP(1).
+SVr4 \fIcurses\fP had support for the mouse in a variant of \fBxterm\fP(1).
 It is mentioned in a few places, but with no supporting documentation:
 .bP
 the \*(``libcurses\*('' manual page lists functions for this feature
@@ -304,20 +301,20 @@ mouse_info        minfo   Mi       Mouse status information
 req_mouse_pos     reqmp   RQ       Request mouse position report
 .NE
 .bP
-the interface made assumptions (as does ncurses) about the escape sequences
+the interface made assumptions (as does \fIncurses\fP) about the escape sequences
 sent to and received from the terminal.
 .IP
 For instance
-the SVr4 curses library used the \fBget_mouse\fP capability to tell the
+the SVr4 \fIcurses\fP library used the \fB\%get_mouse\fP capability to tell the
 terminal which mouse button events it should send,
 passing the mouse-button bit-mask to the terminal.
 Also, it could ask the terminal
-where the mouse was using the \fBreq_mouse_pos\fP capability.
+where the mouse was using the \fB\%req_mouse_pos\fP capability.
 .IP
-Those features required a terminal which had been modified to work with curses.
+Those features required a terminal which had been modified to work with \fIcurses\fP.
 They were not part of the X Consortium's xterm.
 .PP
-When developing the xterm mouse support for ncurses in September 1995,
+When developing the xterm mouse support for \fIncurses\fP in September 1995,
 Eric Raymond was uninterested in using the same interface due to its
 lack of documentation.
 Later, in 1998, Mark Hesseling provided support in
@@ -326,12 +323,12 @@ PDCurses, however, does not use video terminals,
 making it unnecessary to be concerned about compatibility with the
 escape sequences.
 .PP
-The feature macro \fBNCURSES_MOUSE_VERSION\fP is provided so the preprocessor
+The feature macro \fB\%NCURSES_MOUSE_VERSION\fP is provided so the preprocessor
 can be used to test whether these features are present.
-If the interface is changed, the value of \fBNCURSES_MOUSE_VERSION\fP will be
+If the interface is changed, the value of \fB\%NCURSES_MOUSE_VERSION\fP will be
 incremented.
-These values for \fBNCURSES_MOUSE_VERSION\fP may be
-specified when configuring ncurses:
+These values for \fB\%NCURSES_MOUSE_VERSION\fP may be
+specified when configuring \fIncurses\fP:
 .RS 3
 .TP 3
 1
@@ -344,10 +341,10 @@ removes the definitions for reserved events.
 The mask uses 29 bits.
 .RE
 .PP
-The order of the \fBMEVENT\fP structure members is not guaranteed.
+The order of the \fB\%MEVENT\fP structure members is not guaranteed.
 Additional fields may be added to the structure in the future.
 .PP
-Under \fBncurses\fP(3X), these calls are implemented using either
+Under \fIncurses\fP, these calls are implemented using either
 xterm's built-in mouse-tracking API or
 platform-specific drivers including
 .RS 3
@@ -361,7 +358,7 @@ OS/2 EMX
 .PP
 If you are using an unsupported configuration,
 mouse events will not be visible to
-\fBncurses\fP(3X) (and the \fBmousemask\fP function will always
+\fIncurses\fP (and the \fB\%mousemask\fP function will always
 return \fB0\fP).
 .PP
 If the terminfo entry contains a \fBXM\fP string,
@@ -385,37 +382,37 @@ It is intended
 for use with touch screens (which may be pressure-sensitive) or with
 3D-mice/trackballs/power gloves.
 .PP
-The \fBALL_MOUSE_EVENTS\fP class does not include \fBREPORT_MOUSE_POSITION\fP.
+The \fB\%ALL_MOUSE_EVENTS\fP class does not include \fB\%REPORT_MOUSE_POSITION\fP.
 They are distinct.
 For example, in xterm,
 wheel/scrolling mice send position reports as a sequence of
 presses of buttons 4 or 5 without matching button-releases.
 .SH BUGS
 Mouse events under xterm will not in fact be ignored during cooked mode,
-if they have been enabled by \fBmousemask\fP.
+if they have been enabled by \fB\%mousemask\fP.
 Instead, the xterm mouse
 report sequence will appear in the string read.
 .PP
 Mouse events under xterm will not be detected correctly in a window with
 its keypad bit off, since they are interpreted as a variety of function key.
-Your terminfo description should have \fBkmous\fP set to \*(``\\E[M\*(''
+Your terminfo description should have \fB\%kmous\fP set to \*(``\\E[M\*(''
 (the beginning of the response from xterm for mouse clicks).
-Other values for \fBkmous\fP are permitted,
+Other values for \fB\%kmous\fP are permitted,
 but under the same assumption,
 i.e., it is the beginning of the response.
 .PP
 Because there are no standard terminal responses that would serve to identify
-terminals which support the xterm mouse protocol, \fBncurses\fP assumes that
-if \fBkmous\fP is defined in the terminal description,
+terminals which support the xterm mouse protocol, \fIncurses\fP assumes that
+if \fB\%kmous\fP is defined in the terminal description,
 or if the terminal description's primary name or aliases
 contain the string \*(``xterm\*('',
 then the terminal may send mouse events.
-The \fBkmous\fP capability is checked first,
+The \fB\%kmous\fP capability is checked first,
 allowing the use of newer xterm mouse protocols
 such as xterm's private mode 1006.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_inopts\fP(3X),
-\fBcurs_kernel\fP(3X),
-\fBcurs_slk\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_inopts\fP(3X),
+\fB\%curs_kernel\fP(3X),
+\fB\%curs_slk\fP(3X),
+\fB\%curs_variables\fP(3X)
diff --git a/man/curs_opaque.3x b/man/curs_opaque.3x
index e7f8561d..6e13f7db 100644
--- a/man/curs_opaque.3x
+++ b/man/curs_opaque.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_opaque.3x,v 1.27 2023/09/16 23:37:03 tom Exp $
-.TH curs_opaque 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_opaque.3x,v 1.33 2023/09/23 22:59:48 tom Exp $
+.TH curs_opaque 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -51,101 +51,89 @@
 \fB\%wgetscrreg\fP \-
 obtain \fIcurses\fR window properties
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBbool is_cleared(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_idcok(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_idlok(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_immedok(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_keypad(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_leaveok(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_nodelay(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_notimeout(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_pad(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_scrollok(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_subwin(const WINDOW *\fIwin\fB);\fR
-.br
 \fBbool is_syncok(const WINDOW *\fIwin\fB);\fR
-.br
 \fBWINDOW * wgetparent(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint wgetdelay(const WINDOW *\fIwin\fB);\fR
-.br
 \fBint wgetscrreg(const WINDOW *\fIwin\fB, int *\fItop\fB, int *\fIbottom\fB);\fR
+.fi
 .SH DESCRIPTION
 This implementation provides functions which return properties
-set in the WINDOW structure, allowing it to be \*(``opaque\*('' if
-the symbol \fBNCURSES_OPAQUE\fP is defined:
+set in the \fB\%WINDOW\fP structure, allowing it to be \*(``opaque\*('' if
+the symbol \fB\%NCURSES_OPAQUE\fP is defined:
 .TP 5
 \fBis_cleared\fP
-returns the value set in \fBclearok\fP(3X)
+returns the value set in \fB\%clearok\fP(3X)
 .TP 5
 \fBis_idcok\fP
-returns the value set in \fBidcok\fP(3X)
+returns the value set in \fB\%idcok\fP(3X)
 .TP 5
 \fBis_idlok\fP
-returns the value set in \fBidlok\fP(3X)
+returns the value set in \fB\%idlok\fP(3X)
 .TP 5
 \fBis_immedok\fP
-returns the value set in \fBimmedok\fP(3X)
+returns the value set in \fB\%immedok\fP(3X)
 .TP 5
 \fBis_keypad\fP
-returns the value set in \fBkeypad\fP(3X)
+returns the value set in \fB\%keypad\fP(3X)
 .TP 5
 \fBis_leaveok\fP
-returns the value set in \fBleaveok\fP(3X)
+returns the value set in \fB\%leaveok\fP(3X)
 .TP 5
 \fBis_nodelay\fP
-returns the value set in \fBnodelay\fP(3X)
+returns the value set in \fB\%nodelay\fP(3X)
 .TP 5
 \fBis_notimeout\fP
-returns the value set in \fBnotimeout\fP(3X)
+returns the value set in \fB\%notimeout\fP(3X)
 .TP 5
 \fBis_pad\fP
 returns \fBTRUE\fP if the window is a pad
-i.e., created by \fBnewpad\fP(3X)
+i.e., created by \fB\%newpad\fP(3X)
 .TP 5
 \fBis_scrollok\fP
-returns the value set in \fBscrollok\fP(3X)
+returns the value set in \fB\%scrollok\fP(3X)
 .TP 5
 \fBis_subwin\fP
 returns \fBTRUE\fP if the window is a subwindow,
-i.e., created by \fBsubwin\fP(3X) or \fBderwin\fP(3X)
+i.e., created by \fB\%subwin\fP(3X) or \fB\%derwin\fP(3X)
 .TP 5
 \fBis_syncok\fP
-returns the value set in \fBsyncok\fP(3X)
+returns the value set in \fB\%syncok\fP(3X)
 .TP 5
 \fBwgetdelay\fP
-returns the delay timeout as set in \fBwtimeout\fP(3X).
+returns the delay timeout as set in \fB\%wtimeout\fP(3X).
 .TP 5
 \fBwgetparent\fP
-returns the parent WINDOW pointer for subwindows,
-or NULL for windows having no parent.
+returns the parent \fB\%WINDOW\fP pointer for subwindows,
+or \fBNULL\fP for windows having no parent.
 .TP 5
 \fBwgetscrreg\fP
 returns the top and bottom rows for the scrolling margin
-as set in \fBwsetscrreg\fP.
+as set in \fB\%wsetscrreg\fP(3X).
 .SH RETURN VALUE
 These functions all return \fBTRUE\fP or \fBFALSE\fP, except as noted.
 .SH NOTES
 Both a macro and a function are provided for each name.
 .SH PORTABILITY
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
 They were 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.
+It is recommended that any code depending on \fIncurses\fP extensions
+be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_inopts\fP(3X),
-\fBcurs_outopts\fP(3X),
-\fBcurs_window\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_inopts\fP(3X),
+\fB\%curs_outopts\fP(3X),
+\fB\%curs_window\fP(3X)
diff --git a/man/curs_pad.3x b/man/curs_pad.3x
index 28dbc7b7..2c58047c 100644
--- a/man/curs_pad.3x
+++ b/man/curs_pad.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_pad.3x,v 1.38 2023/09/16 23:37:03 tom Exp $
-.TH curs_pad 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_pad.3x,v 1.43 2023/09/23 22:49:51 tom Exp $
+.TH curs_pad 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
@@ -42,25 +42,22 @@
 \fB\%pecho_wchar\fP \-
 create and display \fIcurses\fR pads
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBWINDOW *newpad(int \fInlines\fB, int \fIncols\fB);\fR
-.br
 \fBWINDOW *subpad(WINDOW *\fIorig\fB, int \fInlines\fB, int \fIncols\fB,\fR
       \fBint \fIbegin_y\fB, int \fIbegin_x\fB);\fR
-.br
 \fBint prefresh(WINDOW *\fIpad\fB, int \fIpminrow\fB, int \fIpmincol\fB,\fR
       \fBint \fIsminrow\fB, int \fIsmincol\fB, int \fIsmaxrow\fB, int \fIsmaxcol\fB);\fR
-.br
 \fBint pnoutrefresh(WINDOW *\fIpad\fB, int \fIpminrow\fB, int \fIpmincol\fB,\fR
       \fBint \fIsminrow\fB, int \fIsmincol\fB, int \fIsmaxrow\fB, int \fIsmaxcol\fB);\fR
-.br
 \fBint pechochar(WINDOW *\fIpad\fB, chtype \fIch\fB);\fR
-.br
 \fBint pecho_wchar(WINDOW *\fIpad\fB, const cchar_t *\fIwch\fB);\fR
+.fi
 .SH DESCRIPTION
 .SS newpad
-The \fBnewpad\fP routine creates and returns a pointer to a new pad data
+The \fB\%newpad\fP routine creates and returns a pointer to a new pad data
 structure with the given number of lines, \fInlines\fP, and columns,
 \fIncols\fP.
 A pad is like a window, except that it is not restricted by the
@@ -72,25 +69,25 @@ Automatic refreshes of pads
 (e.g., from scrolling or echoing of input) do not occur.
 .PP
 It is not
-legal to call \fBwrefresh\fP with a \fIpad\fP as an argument; the routines
-\fBprefresh\fP or \fBpnoutrefresh\fP should be called instead.
+legal to call \fB\%wrefresh\fP with a \fIpad\fP as an argument; the routines
+\fB\%prefresh\fP or \fB\%pnoutrefresh\fP should be called instead.
 Note that these
 routines require additional parameters to specify the part of the pad to be
 displayed and the location on the screen to be used for the display.
 .SS subpad
-The \fBsubpad\fP routine creates and returns a pointer to a subwindow within a
+The \fB\%subpad\fP routine creates and returns a pointer to a subwindow within a
 pad with the given number of lines, \fInlines\fP, and columns, \fIncols\fP.
-Unlike \fBsubwin\fP, which uses screen coordinates, the window is at position
+Unlike \fB\%subwin\fP, which uses screen coordinates, the window is at position
 (\fIbegin\fR_\fIx\fB,\fR \fIbegin\fR_\fIy\fR) on the pad.
 The window is
 made in the middle of the window \fIorig\fP, so that changes made to one window
 affect both windows.
 During the use of this routine, it will often be
-necessary to call \fBtouchwin\fP or \fBtouchline\fP on \fIorig\fP before
-calling \fBprefresh\fP.
+necessary to call \fB\%touchwin\fP or \fB\%touchline\fP on \fIorig\fP before
+calling \fB\%prefresh\fP.
 .SS prefresh, pnoutrefresh
-The \fBprefresh\fP and \fBpnoutrefresh\fP routines are analogous to
-\fBwrefresh\fP and \fBwnoutrefresh\fP except that they relate to pads instead
+The \fB\%prefresh\fP and \fB\%pnoutrefresh\fP routines are analogous to
+\fB\%wrefresh\fP and \fB\%wnoutrefresh\fP except that they relate to pads instead
 of windows.
 The additional parameters are needed to indicate what part of the
 pad and screen are involved.
@@ -112,35 +109,35 @@ Negative values of
 \fIpminrow\fP, \fIpmincol\fP, \fIsminrow\fP, or \fIsmincol\fP are treated as if
 they were zero.
 .SS pechochar
-The \fBpechochar\fP routine is functionally equivalent to a call to \fBaddch\fP
-followed by a call to \fBrefresh\fP(3X),
-a call to \fBwaddch\fP followed by a call
-to \fBwrefresh\fP, or a call to \fBwaddch\fP followed by a call to
-\fBprefresh\fP.
+The \fB\%pechochar\fP routine is functionally equivalent to a call to \fB\%addch\fP
+followed by a call to \fB\%refresh\fP(3X),
+a call to \fB\%waddch\fP followed by a call
+to \fB\%wrefresh\fP, or a call to \fB\%waddch\fP followed by a call to
+\fB\%prefresh\fP.
 The knowledge that only a single character is being output is
 taken into consideration and, for non-control characters, a considerable
 performance gain might be seen by using these routines instead of their
 equivalents.
-In the case of \fBpechochar\fP, the last location of the pad on
-the screen is reused for the arguments to \fBprefresh\fP.
+In the case of \fB\%pechochar\fP, the last location of the pad on
+the screen is reused for the arguments to \fB\%prefresh\fP.
 .SS pecho_wchar
-The \fBpecho_wchar\fP function is the analogous wide-character
-form of \fBpechochar\fP.
+The \fB\%pecho_wchar\fP function is the analogous wide-character
+form of \fB\%pechochar\fP.
 It outputs one character to a pad and immediately refreshes the pad.
-It does this by a call to \fBwadd_wch\fP followed by a call to \fBprefresh\fP.
+It does this by a call to \fB\%wadd_wch\fP followed by a call to \fB\%prefresh\fP.
 .SH RETURN VALUE
 Routines that return an integer return \fBERR\fP upon failure and \fBOK\fP
 (SVr4 only specifies "an integer value other than \fBERR\fP") upon successful
 completion.
 .PP
-Routines that return pointers return \fBNULL\fP on error, and set \fBerrno\fP
-to \fBENOMEM\fP.
+Routines that return pointers return \fBNULL\fP on error, and set \fB\%errno\fP
+to \fB\%ENOMEM\fP.
 .PP
 X/Open does not define any error conditions.
 In this implementation
 .RS 3
 .TP 5
-\fBprefresh\fP and \fBpnoutrefresh\fP
+\fB\%prefresh\fP and \fB\%pnoutrefresh\fP
 return an error
 if the window pointer is null, or
 if the window is not really a pad or
@@ -150,19 +147,19 @@ if the minimum coordinates are greater than the maximum.
 \fBpechochar\fP
 returns an error
 if the window is not really a pad, and the associated call
-to \fBwechochar\fP returns an error.
+to \fB\%wechochar\fP returns an error.
 .TP 5
 \fBpecho_wchar\fP
 returns an error
 if the window is not really a pad, and the associated call
-to \fBwecho_wchar\fP returns an error.
+to \fB\%wecho_wchar\fP returns an error.
 .RE
 .SH NOTES
-Note that \fBpechochar\fP may be a macro.
+Note that \fB\%pechochar\fP may be a macro.
 .SH PORTABILITY
-BSD curses has no \fIpad\fP feature.
+BSD \fIcurses\fP has no \fIpad\fP feature.
 .PP
-SVr2 curses (1986) provided the \fBnewpad\fP and related functions,
+SVr2 \fIcurses\fP (1986) provided the \fB\%newpad\fP and related functions,
 documenting them in a single line each.
 SVr3 (1987) provided more extensive documentation.
 .PP
@@ -180,56 +177,56 @@ The two uses may be related.
 The XSI Curses standard, Issue 4 describes these functions,
 without significant change from the SVr3 documentation.
 It describes no error conditions.
-The behavior of \fBsubpad\fP if the parent window is not
+The behavior of \fB\%subpad\fP if the parent window is not
 a pad is undocumented,
 and is not checked by the vendor Unix implementations:
 .bP
-SVr4 curses sets a flag in the \fBWINDOW\fP structure in \fBnewpad\fP
+SVr4 \fIcurses\fP sets a flag in the \fB\%WINDOW\fP structure in \fB\%newpad\fP
 which tells if the window is a \fIpad\fP.
 .IP
 However, it uses this information only in
-\fBwaddch\fP (to decide if it should call \fBwrefresh\fP) and
-\fBwscrl\fP (to avoid scrolling a pad),
-and does not check in \fBwrefresh\fP to ensure that the pad
+\fB\%waddch\fP (to decide if it should call \fB\%wrefresh\fP) and
+\fB\%wscrl\fP (to avoid scrolling a pad),
+and does not check in \fB\%wrefresh\fP to ensure that the pad
 is refreshed properly.
 .bP
-Solaris X/Open Curses checks if a window is a pad in \fBwnoutrefresh\fP,
+Solaris X/Open Curses checks if a window is a pad in \fB\%wnoutrefresh\fP,
 returning \fBERR\fP in that case.
 .IP
 However, it only sets the flag for subwindows if the parent window is a pad.
-Its \fBnewpad\fP function does not set this information.
+Its \fB\%newpad\fP function does not set this information.
 Consequently, the check will never fail.
 .IP
-It makes no comparable check in \fBpnoutrefresh\fP,
+It makes no comparable check in \fB\%pnoutrefresh\fP,
 though interestingly enough, a comment in the source code
 states that the lack of a check was an MKS extension.
 .bP
-NetBSD 7 curses
-sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP,
-using this to help with the distinction between \fBwnoutrefresh\fP
-and \fBpnoutrefresh\fP.
+NetBSD 7 \fIcurses\fP
+sets a flag in the \fB\%WINDOW\fP structure for \fB\%newpad\fP and \fB\%subpad\fP,
+using this to help with the distinction between \fB\%wnoutrefresh\fP
+and \fB\%pnoutrefresh\fP.
 .IP
 It does not check for the case where a subwindow is created in
-a pad using \fBsubwin\fP or \fBderwin\fP.
+a pad using \fB\%subwin\fP or \fB\%derwin\fP.
 .IP
-The \fBdupwin\fP function returns a regular window when duplicating a pad.
-Likewise, \fBgetwin\fP always returns a window, even if the saved
+The \fB\%dupwin\fP function returns a regular window when duplicating a pad.
+Likewise, \fB\%getwin\fP always returns a window, even if the saved
 data was from a pad.
 .PP
 This implementation
 .bP
-sets a flag in the \fBWINDOW\fP structure for \fBnewpad\fP and \fBsubpad\fP,
+sets a flag in the \fB\%WINDOW\fP structure for \fB\%newpad\fP and \fB\%subpad\fP,
 .bP
-allows a \fBsubwin\fP or \fBderwin\fP call to succeed having a pad parent by
+allows a \fB\%subwin\fP or \fB\%derwin\fP call to succeed having a pad parent by
 forcing the subwindow to be a pad,
 .bP
-checks in both \fBwnoutrefresh\fP and \fBpnoutrefresh\fP to ensure
+checks in both \fB\%wnoutrefresh\fP and \fB\%pnoutrefresh\fP to ensure
 that pads and windows are handled distinctly, and
 .bP
-ensures that \fBdupwin\fP and \fBgetwin\fP treat
+ensures that \fB\%dupwin\fP and \fB\%getwin\fP treat
 pads versus windows consistently.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_touch\fP(3X),
-\fBcurs_addch\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_touch\fP(3X),
+\fB\%curs_addch\fP(3X)
diff --git a/man/curs_print.3x b/man/curs_print.3x
index 3325958e..a3a5b48b 100644
--- a/man/curs_print.3x
+++ b/man/curs_print.3x
@@ -27,20 +27,20 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_print.3x,v 1.25 2023/09/16 23:37:03 tom Exp $
-.TH curs_print 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_print.3x,v 1.31 2023/09/23 23:04:49 tom Exp $
+.TH curs_print 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%mcprint\fP \-
 write binary data to printer using \fIterminfo\fR capabilities
 .SH SYNOPSIS
 \fB#include \fP
-.sp
+.PP
 \fBint mcprint(char *\fIdata\fB, int \fIlen\fB);\fR
 .SH DESCRIPTION
 This function uses the \fBmc5p\fP or \fBmc4\fP and \fBmc5\fP capabilities,
 if they are present, to ship given data to a printer attached to the terminal.
 .PP
-Note that the \fBmcprint\fP code has no way to do flow control with the printer
+Note that the \fB\%mcprint\fP code has no way to do flow control with the printer
 or to know how much buffering it has.
 Your application is responsible for
 keeping the rate of writes to the printer below its continuous throughput rate
@@ -50,24 +50,26 @@ Dot-matrix printers and
 rule of thumb is to sleep for a second after shipping each 80-character line.
 .
 .SH RETURN VALUE
-The \fBmcprint\fP function returns \fBERR\fP if the write operation aborted
+The \fB\%mcprint\fP function returns \fBERR\fP if the write operation aborted
 for some reason.
-In this case, \fBerrno\fP will contain either an error associated
+In this case, \fB\%errno\fP will contain either an error associated
 with \fBwrite\fP(2) or one of the following:
 .TP 5
-ENODEV
+\fBENODEV\fP
 Capabilities for printer redirection do not exist.
 .TP 5
-ENOMEM
+\fBENOMEM\fP
 Couldn't allocate sufficient memory to buffer the printer write.
 .PP
-When \fBmcprint\fP succeeds, it returns the number of characters actually
+When \fB\%mcprint\fP succeeds, it returns the number of characters actually
 sent to the printer.
 .SH PORTABILITY
-The \fBmcprint\fP call was designed for \fBncurses\fP(3X), and is not found
-in SVr4 curses, 4.4BSD curses, or any other previous version of curses.
+The \fB\%mcprint\fP call was designed for \fIncurses\fP, and is not found
+in SVr4 \fIcurses\fP, 4.4BSD \fIcurses\fP, or any other previous version of \fIcurses\fP.
+It is recommended that any code depending on \fIncurses\fP extensions
+be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH BUGS
 Padding in the \fBmc5p\fP, \fBmc4\fP and \fBmc5\fP capabilities will not be
 interpreted.
 .SH SEE ALSO
-\fBcurses\fP(3X)
+\fB\%curses\fP(3X)
diff --git a/man/curs_slk.3x b/man/curs_slk.3x
index 50b477ac..2cdab792 100644
--- a/man/curs_slk.3x
+++ b/man/curs_slk.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_slk.3x,v 1.53 2023/09/16 23:37:03 tom Exp $
-.TH curs_slk 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_slk.3x,v 1.60 2023/09/23 22:49:51 tom Exp $
+.TH curs_slk 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -58,67 +58,55 @@
 \fB\%extended_slk_color\fP \-
 \fIcurses\fR soft label key routines
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBint slk_init(int \fIfmt\fB);\fR
-.sp
+.PP
 \fBint slk_set(int \fIlabnum\fB, const char *\fIlabel\fB, int \fIfmt\fB);\fR
-.br
 \fBint slk_wset(int \fIlabnum\fB, const wchar_t *\fIlabel\fB, int \fIfmt\fB);\fR
-.sp
+.PP
 \fBchar *slk_label(int \fIlabnum\fB);\fR
-.sp
+.PP
 \fBint slk_refresh(void);\fP
-.br
 \fBint slk_noutrefresh(void);\fP
-.br
 \fBint slk_clear(void);\fP
-.br
 \fBint slk_restore(void);\fP
-.br
 \fBint slk_touch(void);\fP
-.sp
+.PP
 \fBint slk_attron(const chtype \fIattrs\fB);\fR
-.br
 \fBint slk_attroff(const chtype \fIattrs\fB);\fR
-.br
 \fBint slk_attrset(const chtype \fIattrs\fB);\fR
-.br
 \fBint slk_attr_on(attr_t \fIattrs\fB, void* \fIopts\fB);\fR
-.br
 \fBint slk_attr_off(const attr_t \fIattrs\fB, void * \fIopts\fB);\fR
-.br
 \fBint slk_attr_set(const attr_t \fIattrs\fB, short \fIpair\fB, void* \fIopts\fB);\fR
-.br
-/* extension */
-.br
+\fI/* extension */\fP
 \fBattr_t slk_attr(void);\fP
-.sp
+.PP
 \fBint slk_color(short \fIpair\fB);\fR
-.br
-/* extension */
-.br
+\fI/* extension */\fP
 \fBint extended_slk_color(int \fIpair\fB);\fR
+.fi
 .SH DESCRIPTION
-The slk* functions manipulate the set of soft function-key labels that exist on
+The \fBslk\fP* functions manipulate the set of soft function-key labels that exist on
 many terminals.
 For those terminals that do not have soft labels,
-\fBcurses\fP takes over the bottom line of \fBstdscr\fP, reducing the size of
-\fBstdscr\fP and the variable \fBLINES\fP.
-\fBcurses\fP standardizes on eight
+\fIcurses\fP takes over the bottom line of \fB\%stdscr\fP, reducing the size of
+\fB\%stdscr\fP and the variable \fBLINES\fP.
+\fIcurses\fP standardizes on eight
 labels of up to eight characters each.
-In addition to this, the ncurses
+In addition to this, the \fIncurses\fP
 implementation supports a mode where it simulates 12 labels of up to five
 characters each.
 This is useful for PC-like enduser devices.
-ncurses simulates this mode by taking over up to two lines at
+\fIncurses\fP simulates this mode by taking over up to two lines at
 the bottom of the screen;
 it does not try to use any hardware support for this
 mode.
 .SS Initialization
-The \fBslk_init\fP routine must be called before \fBinitscr\fP or \fBnewterm\fP
+The \fB\%slk_init\fP routine must be called before \fB\%initscr\fP or \fB\%newterm\fP
 is called.
-If \fBinitscr\fP eventually uses a line from \fBstdscr\fP to
+If \fB\%initscr\fP eventually uses a line from \fB\%stdscr\fP to
 emulate the soft labels,
 then \fIfmt\fP determines how the labels are arranged on the screen:
 .RS 3
@@ -139,19 +127,19 @@ but in addition an index line is generated, helping the user to
 identify the key numbers easily.
 .RE
 .SS Labels
-The \fBslk_set\fP routine
-(and the \fBslk_wset\fP routine for the wide-character library)
+The \fB\%slk_set\fP routine
+(and the \fB\%slk_wset\fP routine for the wide-character library)
 has three parameters:
 .RS 3
 .TP 5
 .I labnum
 is the label number, from \fB1\fP to \fB8\fP
-(12 if \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP);
+(12 if \fIfmt\fP in \fB\%slk_init\fP is \fB2\fP or \fB3\fP);
 .TP
 .I label
 is be the string to put on the label,
 up to eight
-(five if \fIfmt\fP in \fBslk_init\fP is \fB2\fP or \fB3\fP)
+(five if \fIfmt\fP in \fB\%slk_init\fP is \fB2\fP or \fB3\fP)
 characters in length.
 A null string or a null pointer sets up a blank label.
 .TP
@@ -162,36 +150,36 @@ left-justified, centered, or right-justified, respectively, within the
 label.
 .RE
 .PP
-The \fBslk_label\fP routine returns the current label for label number
+The \fB\%slk_label\fP routine returns the current label for label number
 \fIlabnum\fP, with leading and trailing blanks stripped.
 .SS Screen updates
-The \fBslk_refresh\fP and \fBslk_noutrefresh\fP routines correspond to
-the \fBwrefresh\fP and \fBwnoutrefresh\fP routines.
+The \fB\%slk_refresh\fP and \fB\%slk_noutrefresh\fP routines correspond to
+the \fB\%wrefresh\fP and \fB\%wnoutrefresh\fP routines.
 .PP
-The \fBslk_clear\fP routine clears the soft labels from the screen.
+The \fB\%slk_clear\fP routine clears the soft labels from the screen.
 .PP
-The \fBslk_restore\fP routine restores the soft labels to the screen
-after a \fBslk_clear\fP has been performed.
+The \fB\%slk_restore\fP routine restores the soft labels to the screen
+after a \fB\%slk_clear\fP has been performed.
 .PP
-The \fBslk_touch\fP routine forces all the soft labels to be output
-the next time a \fBslk_noutrefresh\fP is performed.
+The \fB\%slk_touch\fP routine forces all the soft labels to be output
+the next time a \fB\%slk_noutrefresh\fP is performed.
 .SS Video attributes
 The
-\fBslk_attron\fP, \fBslk_attrset\fP, \fBslk_attroff\fP and \fBslk_attr\fP
+\fB\%slk_attron\fP, \fB\%slk_attrset\fP, \fB\%slk_attroff\fP and \fB\%slk_attr\fP
 routines correspond to
-\fBattron\fP, \fBattrset\fP, \fBattroff\fP and \fBattr_get\fP, respectively.
+\fB\%attron\fP, \fB\%attrset\fP, \fB\%attroff\fP and \fB\%attr_get\fP, respectively.
 They have an effect only if soft labels are simulated on the bottom line of
 the screen.
 The default highlight for soft keys is A_STANDOUT (as in
-System V curses, which does not document this fact).
+System V \fIcurses\fP, which does not document this fact).
 .SS Colors
-The \fBslk_color\fP routine corresponds to \fBcolor_set\fP.
+The \fB\%slk_color\fP routine corresponds to \fB\%color_set\fP.
 It has an effect only
 if soft labels are simulated on the bottom line of the screen.
 .PP
-Because \fBslk_color\fP accepts only \fBshort\fP (signed 16-bit integer) values,
+Because \fB\%slk_color\fP accepts only \fBshort\fP (signed 16-bit integer) values,
 this implementation provides
-\fBextended_slk_color\fP which accepts an integer value, e.g., 32-bits.
+\fB\%extended_slk_color\fP which accepts an integer value, e.g., 32-bits.
 .
 .SH RETURN VALUE
 These routines return \fBERR\fP upon failure
@@ -216,12 +204,12 @@ if the terminal or the softkeys were not initialized.
 \fBslk_attr_set\fP
 returns an error
 if the terminal or the softkeys were not initialized, or
-the color pair is outside the range 0..COLOR_PAIRS\-1.
+the color pair is outside the range 0..\fBCOLOR_PAIRS\fP\-1.
 .TP 5
 \fBslk_color\fP
 returns an error
 if the terminal or the softkeys were not initialized, or
-the color pair is outside the range 0..COLOR_PAIRS\-1.
+the color pair is outside the range 0..\fBCOLOR_PAIRS\fP\-1.
 .TP 5
 \fBslk_init\fP
 returns an error
@@ -239,65 +227,65 @@ memory for the labels cannot be allocated.
 .RE
 .SH HISTORY
 SVr3 introduced these functions:
-  slk_clear
-  slk_init
-  slk_label
-  slk_noutrefresh
-  slk_refresh
-  slk_restore
-  slk_set
-  slk_touch
+  \fBslk_clear\fP
+  \fBslk_init\fP
+  \fBslk_label\fP
+  \fBslk_noutrefresh\fP
+  \fBslk_refresh\fP
+  \fBslk_restore\fP
+  \fBslk_set\fP
+  \fBslk_touch\fP
 .PP
 SVr4 added these functions:
-  slk_attroff
-  slk_attron
-  slk_attrset
-  slk_start
+  \fBslk_attroff\fP
+  \fBslk_attron\fP
+  \fBslk_attrset\fP
+  \fBslk_start\fP
 .PP
-X/Open Curses added these:
-  slk_attr_off
-  slk_attr_on
-  slk_attr_set
-  slk_color
-  slk_wset
+X/Open \fIcurses\fP added these:
+  \fBslk_attr_off\fP
+  \fBslk_attr_on\fP
+  \fBslk_attr_set\fP
+  \fBslk_color\fP
+  \fBslk_wset\fP
 .SH EXTENSIONS
-X/Open Curses documents the \fIopts\fP argument as reserved for future use,
+X/Open \fIcurses\fP documents the \fIopts\fP argument as reserved for future use,
 saying that it must be null.
 This implementation
 uses that parameter in ABI 6 for the functions which have a color-pair
 parameter to support extended color pairs.
 .PP
-For  functions  which modify the color, e.g., \fBslk_attr_set\fP,
+For  functions  which modify the color, e.g., \fB\%slk_attr_set\fP,
 if \fIopts\fP is set it is treated as a pointer to \fBint\fP,
 and used to  set  the  color pair instead of the \fBshort\fP pair parameter.
 .SH NOTES
-Most applications would use \fBslk_noutrefresh\fP because a
-\fBwrefresh\fP is likely to follow soon.
+Most applications would use \fB\%slk_noutrefresh\fP because a
+\fB\%wrefresh\fP is likely to follow soon.
 .SH PORTABILITY
-The XSI Curses standard, Issue 4, described the soft-key functions,
-with some differences from SVr4 curses:
+The XSI \fIcurses\fP standard, Issue 4, described the soft-key functions,
+with some differences from SVr4 \fIcurses\fP:
 .bP
 It added functions like the SVr4
-attribute-manipulation functions \fBslk_attron\fP,
-\fBslk_attroff\fP, \fBslk_attrset\fP,
-but which use \fBattr_t\fP parameters (rather than \fBchtype\fP),
+attribute-manipulation functions \fB\%slk_attron\fP,
+\fB\%slk_attroff\fP, \fB\%slk_attrset\fP,
+but which use \fBattr_t\fP parameters (rather than \fB\%chtype\fP),
 along with a reserved \fIopts\fP parameter.
 .IP
 Two of these new functions (unlike the SVr4 functions) have no provision
-for color: \fBslk_attr_on\fP and \fBslk_attr_off\fP.
+for color: \fB\%slk_attr_on\fP and \fB\%slk_attr_off\fP.
 .IP
-The third function (\fBslk_attr_set\fP) has a color-pair parameter.
+The third function (\fB\%slk_attr_set\fP) has a color-pair parameter.
 .bP
 It added \fBconst\fP qualifiers to parameters (unnecessarily), and
 .bP
-It added \fBslk_color\fP.
+It added \fB\%slk_color\fP.
 .PP
-Although \fBslk_start\fP is declared in the curses header file,
+Although \fB\%slk_start\fP is declared in the \fIcurses\fP header file,
 it was not documented by SVr4 other than its presence in a list
 of libtermlib.so.1 symbols.
 Reading the source code (i.e., Illumos):
 .bP
-\fBslk_start\fP has two parameters:
+\fB\%slk_start\fP has two parameters:
 .RS
 .bP
 \fIng\fP (number of groups) and
@@ -307,29 +295,29 @@ Reading the source code (i.e., Illumos):
 .bP
 Soft-key groups are an array of \fIng\fP integers.
 .bP
-In SVr4, \fBslk_init\fP calls \fBslk_start\fP passing a null for \fIgp\fP.
-For this case, \fBslk_start\fP uses the number of groups \fIng\fP
-(3 for the 3-2-3 layout, 2 for the 4-4 layout) which \fBslk_init\fP provided.
+In SVr4, \fB\%slk_init\fP calls \fB\%slk_start\fP passing a null for \fIgp\fP.
+For this case, \fB\%slk_start\fP uses the number of groups \fIng\fP
+(3 for the 3-2-3 layout, 2 for the 4-4 layout) which \fB\%slk_init\fP provided.
 .IP
 If \fIng\fP is neither 2 or 3,
-\fBslk_start\fP checks the terminfo \fIfln\fP (label_format) capability,
+\fB\%slk_start\fP checks the terminfo \fBfln\fP (label_format) capability,
 interpreting that as a comma-separated list of numbers,
 e.g., \*(``3,2,3\*('' for the 3-2-3 layout.
 .IP
-Finally, if there is no \fIfln\fP capability, \fBslk_start\fP returns ERR.
+Finally, if there is no \fBfln\fP capability, \fB\%slk_start\fP returns \fBERR\fP.
 .bP
-If \fBslk_start\fP is given a non-null \fIgp\fP,
+If \fB\%slk_start\fP is given a non-null \fIgp\fP,
 it copies the \fIng\fP elements of the group of soft-keys, up to 16.
 .IP
-If there are more than 16 elements, \fBslk_start\fP returns an error.
+If there are more than 16 elements, \fB\%slk_start\fP returns an error.
 .bP
-The format codes \fB2\fP and \fB3\fP for \fBslk_init\fP
-were added by ncurses in 1996.
+The format codes \fB2\fP and \fB3\fP for \fB\%slk_init\fP
+were added by \fIncurses\fP in 1996.
 PDCurses 2.4 added this feature in 2001.
 .PP
-The function \fBslk_attr\fP was added by ncurses in 1996.
+The function \fB\%slk_attr\fP was added by \fIncurses\fP in 1996.
 .PP
-X/Open Curses does not specify a limit for the number of colors and
+X/Open \fIcurses\fP does not specify a limit for the number of colors and
 color pairs which a terminal can support.
 However, in its use of \fBshort\fP for the parameters,
 it carries over SVr4's implementation detail for the compiled
@@ -338,8 +326,8 @@ This implementation provides extended versions of those functions
 which use \fBint\fP parameters,
 allowing applications to use larger color- and pair-numbers.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_attr\fP(3X),
-\fBcurs_initscr\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_attr\fP(3X),
+\fB\%curs_initscr\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_variables\fP(3X)
diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x
index bd418951..90aef061 100644
--- a/man/curs_terminfo.3x
+++ b/man/curs_terminfo.3x
@@ -28,8 +28,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_terminfo.3x,v 1.99 2023/09/16 23:37:03 tom Exp $
-.TH curs_terminfo 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_terminfo.3x,v 1.108 2023/09/23 23:38:10 tom Exp $
+.TH curs_terminfo 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -63,9 +63,9 @@
 .nf
 \fB#include \fP
 \fB#include \fP
-.sp
+.PP
 \fBTERMINAL *cur_term;\fP
-.sp
+.PP
 \fBconst char * const boolnames[];\fP
 \fBconst char * const boolcodes[];\fP
 \fBconst char * const boolfnames[];\fP
@@ -75,56 +75,42 @@
 \fBconst char * const strnames[];\fP
 \fBconst char * const strcodes[];\fP
 \fBconst char * const strfnames[];\fP
-.sp
+.PP
 \fBint setupterm(const char *\fIterm\fB, int \fIfiledes\fB, int *\fIerrret\fB);\fR
-.br
 \fBTERMINAL *set_curterm(TERMINAL *\fInterm\fB);\fR
-.br
 \fBint del_curterm(TERMINAL *\fIoterm\fB);\fR
-.br
 \fBint restartterm(const char *\fIterm\fB, int \fIfiledes\fB, int *\fIerrret\fB);\fR
-.sp
+.PP
 \fBchar *tparm(const char *\fIstr\fB, ...);\fR
-.br
 	\fIor\fP
-.br
 \fBchar *tparm(const char *\fIstr\fB, long \fIp1 ... \fBlong \fIp9\fB);\fR
-.sp
+.PP
 \fBint tputs(const char *\fIstr\fB, int \fIaffcnt\fB, int (*\fIputc\fB)(int));\fR
-.br
 \fBint putp(const char *\fIstr\fB);\fR
-.sp
+.PP
 \fBint vidputs(chtype \fIattrs\fB, int (*\fIputc\fB)(int));\fR
-.br
 \fBint vidattr(chtype \fIattrs\fB);\fR
-.br
 \fBint vid_puts(attr_t \fIattrs\fB, short \fIpair\fB, void *\fIopts\fB, int (*\fIputc\fB)(int));\fR
-.br
 \fBint vid_attr(attr_t \fIattrs\fB, short \fIpair\fB, void *\fIopts\fB);\fR
-.sp
+.PP
 \fBint mvcur(int \fIoldrow\fB, int \fIoldcol\fB, int \fInewrow\fR, int \fInewcol\fB);\fR
-.sp
+.PP
 \fBint tigetflag(const char *\fIcapname\fB);\fR
-.br
 \fBint tigetnum(const char *\fIcapname\fB);\fR
-.br
 \fBchar *tigetstr(const char *\fIcapname\fB);\fR
-.sp
+.PP
 \fBchar *tiparm(const char *\fIstr\fB, ...);\fR
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
 \fBchar *tiparm_s(int \fIexpected\fB, int \fImask\fB, const char *\fIstr\fB, ...);\fR
-.br
 \fBint tiscan_s(int *\fIexpected\fB, int *\fImask\fB, const char *\fIstr\fB);\fR
-.br
 .fi
 .SH DESCRIPTION
 These low-level routines must be called by programs that have to deal
-directly with the \fBterminfo\fP database to handle certain terminal
+directly with the \fIterminfo\fP database to handle certain terminal
 capabilities, such as programming function keys.
 For all other
-functionality, \fBcurses\fP routines are more suitable and their use is
+functionality, \fIcurses\fP routines are more suitable and their use is
 recommended.
 .PP
 None of these functions use (or are aware of) multibyte character strings
@@ -219,30 +205,30 @@ If \fBERR\fP is returned, examine \fIerrret\fP:
 .RS
 .TP 5
 .B 1
-means that the terminal is hardcopy, cannot be used for curses applications.
+means that the terminal is hardcopy, cannot be used for \fIcurses\fP applications.
 .IP
-\fBsetupterm\fP determines if the entry is a hardcopy type by
+\fB\%setupterm\fP determines if the entry is a hardcopy type by
 checking the \fBhc\fP (\fBhardcopy\fP) capability.
 .TP 5
 .B 0
 means that the terminal could not be found,
 or that it is a generic type,
-having too little information for curses applications to run.
+having too little information for \fIcurses\fP applications to run.
 .IP
-\fBsetupterm\fP determines if the entry is a generic type by
-checking the \fBgn\fP (\fBgeneric_type\fP) capability.
+\fB\%setupterm\fP determines if the entry is a generic type by
+checking the \fBgn\fP (\fB\%generic_type\fP) capability.
 .TP 5
 .B \-1
-means that the \fBterminfo\fP database could not be found.
+means that the \fIterminfo\fP database could not be found.
 .RE
 .IP
 If \fIerrret\fP is
-null, \fBsetupterm\fP prints an error message upon finding an error
+null, \fB\%setupterm\fP prints an error message upon finding an error
 and exits.
 Thus, the simplest call is:
-.sp
-      \fBsetupterm((char *)0, 1, (int *)0);\fP,
-.sp
+.IP
+\fBsetupterm((char *)0, 1, (int *)0);\fP,
+.PP
 which uses all the defaults and sends the output to \fBstdout\fP.
 .RE
 .\" ***************************************************************************
@@ -380,7 +366,7 @@ the output stream parameter of \fBnewterm\fP(3X).
 .PP
 While \fBputp\fP and \fBmvcur\fP are low-level functions which
 do not use the high-level curses state,
-they are declared in \fB\fP because SystemV did this
+they are declared in \fB\%\fP because System\ V did this
 (see \fIHISTORY\fP).
 .\" ***************************************************************************
 .SS Terminal Capability Functions
@@ -421,20 +407,20 @@ if it is canceled or absent from the terminal description.
 .SS Terminal Capability Names
 These null-terminated arrays contain
 .bP
-the short terminfo names (\*(``codes\*(''),
+the short \fIterminfo\fP names (\*(``codes\*(''),
 .bP
-the \fBtermcap\fP names (\*(``names\*(''), and
+the \fItermcap\fP names (\*(``names\*(''), and
 .bP
-the long terminfo names (\*(``fnames\*('')
+the long \fIterminfo\fP names (\*(``fnames\*('')
+.PP
+for each of the predefined \fIterminfo\fP variables:
 .PP
-for each of the predefined \fBterminfo\fP variables:
-.sp
 .RS
+.nf
 \fBconst char *boolnames[]\fP, \fB*boolcodes[]\fP, \fB*boolfnames[]\fP
-.br
 \fBconst char *numnames[]\fP, \fB*numcodes[]\fP, \fB*numfnames[]\fP
-.br
 \fBconst char *strnames[]\fP, \fB*strcodes[]\fP, \fB*strfnames[]\fP
+.fi
 .RE
 .\" ***************************************************************************
 .SS Releasing Memory
@@ -442,9 +428,9 @@ Each successful call to \fBsetupterm\fP allocates memory to hold the terminal
 description.
 As a side-effect, it sets \fBcur_term\fP to point to this memory.
 If an application calls
-.sp
-        \fBdel_curterm(cur_term);\fP
-.sp
+.IP
+\fBdel_curterm(cur_term);\fP
+.PP
 the memory will be freed.
 .PP
 The formatting functions \fBtparm\fP and \fBtiparm\fP extend the storage
@@ -520,10 +506,10 @@ In SVr4, those are found in \fB\fP,
 but except for \fBsetterm\fP, are likewise macros.
 The one function, \fBsetterm\fP, is mentioned in the manual page.
 The manual page notes that the \fBsetterm\fP routine
-was replaced by \fBsetupterm\fP, stating that the call:
-.sp
-      \fBsetupterm(\fIterm\fB, 1, (int *)0)\fR
-.sp
+was replaced by \fB\%setupterm\fP, stating that the call
+.IP
+\fBsetupterm(\fIterm\fB, 1, (int *)0)\fR
+.PP
 provides the same functionality as \fBsetterm(\fIterm\fB)\fR,
 and is not recommended for new programs.
 This implementation provides each of those symbols
@@ -531,11 +517,12 @@ as macros for BSD compatibility,
 .\" ***************************************************************************
 .SH HISTORY
 SVr2 introduced the terminfo feature.
-Its programming manual mentioned these low-level functions:
+Its programming manual mentioned the following low-level functions.
 .PP
 .TS
-l l.
-\fBFunction\fP	\fBDescription\fP
+lB lB
+lB lx.
+Function	Description
 _
 fixterm	restore tty to \*(``in curses\*('' state
 gettmode	establish current tty modes
@@ -558,15 +545,15 @@ T}
 .TE
 .PP
 The programming manual also mentioned
-functions provided for termcap compatibility
-(commenting that they \*(``may go away at a later date\*(''):
+functions provided for \fItermcap\fP compatibility
+(commenting that they \*(``may go away at a later date\*('').
 .PP
 .TS
-l l
-_ _
-l l.
-\fBFunction\fP	\fBDescription\fP
-tgetent	look up termcap entry for given \fIname\fP
+lB lB
+lB lx.
+Function	Description
+_
+tgetent	look up \fItermcap\fP entry for given \fIname\fP
 tgetflag	get boolean entry for given \fIid\fP
 tgetnum	get numeric entry for given \fIid\fP
 tgetstr	get string entry for given \fIid\fP
@@ -581,29 +568,30 @@ Early terminfo programs obtained capability values from the
 .PP
 SVr3 extended terminfo by adding functions to retrieve capability values
 (like the termcap interface),
-and reusing tgoto and tputs:
+and reusing \fBtgoto\fP and \fBtputs\fP:
 .PP
 .TS
-l l
-_ _
-l l.
-\fBFunction\fP	\fBDescription\fP
+lB lB
+lB lx.
+Function	Description
+_
 tigetflag	get boolean entry for given \fIid\fP
 tigetnum	get numeric entry for given \fIid\fP
 tigetstr	get string entry for given \fIid\fP
 .TE
 .PP
-SVr3 also replaced several of the SVr2 terminfo functions
-which had no counterpart in the termcap interface,
-documenting them as obsolete:
+SVr3 also replaced several of the SVr2 \fIterminfo\fP functions
+which had no counterpart in the \fItermcap\fP interface,
+documenting them as obsolete.
+.PP
 .TS
-l l
-_ _
-l l.
-\fBFunction\fP	\fBReplaced by\fP
+lB lB
+l  lx.
+Function	Replaced by
+_
 crmode	cbreak
 fixterm	reset_prog_mode
-gettmode	N/A
+gettmode	\fIn/a\fP
 nocrmode	nocbreak
 resetterm	reset_shell_mode
 saveterm	def_prog_mode
@@ -629,7 +617,7 @@ though the variables were provided in SVr2.
 .PP
 SVr4 added the \fBvid_attr\fP and \fBvid_puts\fP functions.
 .PP
-There are other low-level functions declared in the curses header files
+There are other low-level functions declared in the \fIcurses\fP header files
 on Unix systems,
 but none were documented.
 The functions marked \*(``obsolete\*('' remained in use
@@ -686,7 +674,7 @@ On the other hand, \fIwritable strings\fP are an obsolescent feature.
 .IP
 As an extension, this implementation can be configured to change the
 function prototypes to use the \fBconst\fP keyword.
-The ncurses ABI 6 enables this feature by default.
+The \fIncurses\fP ABI 6 enables this feature by default.
 .bP
 X/Open Curses prototypes \fBtparm\fP with a fixed number of parameters,
 rather than a variable argument list.
diff --git a/man/curs_touch.3x b/man/curs_touch.3x
index 46270aba..72bcb6aa 100644
--- a/man/curs_touch.3x
+++ b/man/curs_touch.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_touch.3x,v 1.34 2023/09/16 23:37:03 tom Exp $
-.TH curs_touch 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_touch.3x,v 1.39 2023/09/23 22:49:51 tom Exp $
+.TH curs_touch 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%touchwin\fP,
 \fB\%touchline\fP,
@@ -38,21 +38,21 @@
 \fB\%is_wintouched\fP \-
 control terminal output refresh in a \fIcurses\fR window
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBint touchline(WINDOW *\fIwin\fB, int \fIstart\fB, int \fIcount\fB);\fR
-.sp
+.PP
 \fBint touchwin(WINDOW *\fIwin\fB);\fR
-.br
 \fBint wtouchln(WINDOW *\fIwin\fB, int \fIy\fB, int \fIn\fB, int \fIchanged\fB);\fR
-.sp
+.PP
 \fBint untouchwin(WINDOW *\fIwin\fB);\fR
-.sp
+.PP
 \fBbool is_linetouched(WINDOW *\fIwin\fB, int \fIline\fB);\fR
-.br
 \fBbool is_wintouched(WINDOW *\fIwin\fB);\fR
+.fi
 .SH DESCRIPTION
-The \fBtouchwin\fP and \fBtouchline\fP routines throw away all
+The \fB\%touchwin\fP and \fB\%touchline\fP routines throw away all
 optimization information about which parts of the window have been
 touched, by pretending that the entire window has been drawn on.
 This
@@ -60,21 +60,21 @@ is sometimes necessary when using overlapping windows, since a change
 to one window affects the other window, but the records of which lines
 have been changed in the other window do not reflect the change.
 The
-routine \fBtouchline\fP only pretends that \fIcount\fP lines have been
+routine \fB\%touchline\fP only pretends that \fIcount\fP lines have been
 changed, beginning with line \fIstart\fP.
 .PP
-The \fBuntouchwin\fP routine marks all lines in the window as unchanged since
-the last call to \fBwrefresh\fP.
+The \fB\%untouchwin\fP routine marks all lines in the window as unchanged since
+the last call to \fB\%wrefresh\fP.
 .PP
-The \fBwtouchln\fP routine makes \fIn\fP lines in the window, starting
+The \fB\%wtouchln\fP routine makes \fIn\fP lines in the window, starting
 at line \fIy\fR, look as if they have (\fIchanged\fB=1\fR) or have
 not (\fIchanged\fB=0\fR) been changed since the last call to
-\fBwrefresh\fP.
+\fB\%wrefresh\fP.
 .PP
-The \fBis_linetouched\fP and \fBis_wintouched\fP routines return
+The \fB\%is_linetouched\fP and \fB\%is_wintouched\fP routines return
 \fBTRUE\fP if the specified line/window was modified since the last
-call to \fBwrefresh\fP; otherwise they return \fBFALSE\fP.  In
-addition, \fBis_linetouched\fP returns \fBERR\fP if \fIline\fP is not
+call to \fB\%wrefresh\fP; otherwise they return \fBFALSE\fP.  In
+addition, \fB\%is_linetouched\fP returns \fBERR\fP if \fIline\fP is not
 valid for the given window.
 .SH RETURN VALUE
 All routines return the integer \fBERR\fP upon failure and an integer value
@@ -97,7 +97,7 @@ returning \fBERR\fP (which is neither \fBTRUE\fP nor \fBFALSE\fP)
 may not be supported by the compiler.
 .IP
 To provide error-checking and also match the X/Open function prototype,
-the \fBERR\fP is provided by a macro named \fBis_linetouched\fP.
+the \fBERR\fP is provided by a macro named \fB\%is_linetouched\fP.
 The actual function returns \fBFALSE\fP when it detects an error.
 .TP 5
 \fBwtouchln\fP
@@ -107,18 +107,18 @@ if the line number is outside the window.
 .RE
 .SH PORTABILITY
 These functions were introduced by SVr4.
-The Solaris curses header file,
+The Solaris \fIcurses\fP header file,
 for instance, defines both an actual function and macro for each.
 The macros give the same result as the actual functions.
-SVr4 curses does not check the window parameter \fIwin\fP to ensure
+SVr4 \fIcurses\fP does not check the window parameter \fIwin\fP to ensure
 that it is not \fBNULL\fP;
 otherwise this implementation behaves the same as SVr4.
 .PP
 The XSI Curses standard, Issue 4 describes these functions,
 but defines no error conditions.
 .SH NOTES
-All of these routines except \fBwtouchln\fP may be macros.
+All of these routines except \fB\%wtouchln\fP may be macros.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_variables\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_variables\fP(3X)
diff --git a/man/curs_trace.3x b/man/curs_trace.3x
index add2b6be..f4d19a39 100644
--- a/man/curs_trace.3x
+++ b/man/curs_trace.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_trace.3x,v 1.35 2023/09/16 23:37:03 tom Exp $
-.TH curs_trace 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_trace.3x,v 1.37 2023/09/23 20:53:33 tom Exp $
+.TH curs_trace 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -53,35 +53,28 @@
 \fB\%_tracemouse\fP \-
 \fIcurses\fR debugging routines
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBunsigned curses_trace(const unsigned \fIparam\fB);\fR
-.sp
+.PP
 \fBvoid _tracef(const char *\fIformat\fB, ...);\fR
-.sp
+.PP
 \fBchar *_traceattr(attr_t \fIattr\fB);\fR
-.br
 \fBchar *_traceattr2(int \fIbuffer\fB, chtype \fIch\fB);\fR
-.br
 \fBchar *_tracecchar_t(const cchar_t *\fIstring\fB);\fR
-.br
 \fBchar *_tracecchar_t2(int \fIbuffer\fB, const cchar_t *\fIstring\fB);\fR
-.br
 \fBchar *_tracechar(int \fIch\fB);\fR
-.br
 \fBchar *_tracechtype(chtype \fIch\fB);\fR
-.br
 \fBchar *_tracechtype2(int \fIbuffer\fB, chtype \fIch\fB);\fR
-.sp
+.PP
 \fBvoid _tracedump(const char *\fIlabel\fB, WINDOW *\fIwin\fB);\fR
-.br
 \fBchar *_nc_tracebits(void);\fP
-.br
 \fBchar *_tracemouse(const MEVENT *\fIevent\fB);\fR
-.sp
+.PP
 /* deprecated */
-.br
 \fBvoid trace(const unsigned int \fIparam\fB);\fR
+.fi
 .SH DESCRIPTION
 The \fIcurses trace\fP routines are used for debugging the ncurses libraries,
 as well as applications which use the ncurses libraries.
diff --git a/man/curs_util.3x b/man/curs_util.3x
index 6390749b..9d8e7f26 100644
--- a/man/curs_util.3x
+++ b/man/curs_util.3x
@@ -28,8 +28,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_util.3x,v 1.77 2023/09/16 23:37:03 tom Exp $
-.TH curs_util 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: curs_util.3x,v 1.83 2023/09/23 23:14:19 tom Exp $
+.TH curs_util 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -53,33 +53,29 @@
 \fB\%wunctrl\fP \-
 miscellaneous \fIcurses\fR utility routines
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBconst char *unctrl(chtype \fIc\fB);\fR
-.br
 \fBwchar_t *wunctrl(cchar_t *\fIc\fB);\fR
-.sp
+.PP
 \fBconst char *keyname(int \fIc\fB);\fR
-.br
 \fBconst char *key_name(wchar_t \fIw\fB);\fR
-.sp
+.PP
 \fBvoid filter(void);\fP
-.sp
+.PP
 \fBvoid use_env(bool \fIf\fB);\fR
-.sp
+.PP
 \fBint putwin(WINDOW *\fIwin\fB, FILE *\fIfilep\fB);\fR
-.br
 \fBWINDOW *getwin(FILE *\fIfilep\fB);\fR
-.sp
+.PP
 \fBint delay_output(int \fIms\fB);\fR
-.br
 \fBint flushinp(void);\fP
-.sp
-/* extensions */
-.br
+.PP
+\fI/* extensions */\fP
 \fBvoid nofilter(void);\fP
-.br
 \fBvoid use_tioctl(bool \fIf\fB);\fR
+.fi
 .SH DESCRIPTION
 .SS unctrl
 The \fBunctrl\fP routine returns a character string which is a printable
@@ -164,10 +160,10 @@ The \fBuse_env\fP routine, if used,
 should be called before \fBinitscr\fP or
 \fBnewterm\fP are called
 (because those compute the screen size).
-It modifies the way \fBncurses\fP treats environment variables
+It modifies the way \fIncurses\fP treats environment variables
 when determining the screen size.
 .bP
-Normally \fBncurses\fP looks first at the terminal database for the screen size.
+Normally \fIncurses\fP looks first at the terminal database for the screen size.
 .IP
 If \fBuse_env\fP was called with \fBFALSE\fP for parameter,
 it stops here unless
@@ -202,29 +198,27 @@ or from the terminal database.
 \fBncurses\fP re-fetches the value of the environment variables so that
 it is still the environment variables which set the screen size.
 .PP
-The \fBuse_env\fP and \fBuse_tioctl\fP routines combine as
-summarized here:
-.PP
+The \fB\%use_env\fP and \fB\%use_tioctl\fP routines combine as follows.
+.IP
 .TS
-center tab(/);
-l l l
-_ _ _
-lw7 lw7 lw40.
-\fBuse_env\fP/\fBuse_tioctl\fP/\fBSummary\fP
-TRUE/FALSE/T{
+lB lB lB
+lB lB lx.
+use_env	use_tioctl	Summary
+_
+TRUE	FALSE	T{
 This is the default behavior.
-\fBncurses\fP uses operating system calls
-unless overridden by $LINES or $COLUMNS environment variables.
-T}
-TRUE/TRUE/T{
-\fBncurses\fP updates $LINES and $COLUMNS based on operating system calls.
+\fIncurses\fP uses operating system calls
+unless overridden by \fBLINES\fP or \fB\%COLUMNS\fP environment
+variables;
+default.
 T}
-FALSE/TRUE/T{
-\fBncurses\fP ignores $LINES and $COLUMNS,
-uses operating system calls to obtain size.
+TRUE	TRUE	T{
+\fIncurses\fP updates \fBLINES\fP and \fB\%COLUMNS\fP based on operating
+system calls.
 T}
-FALSE/FALSE/T{
-\fBncurses\fP relies on the terminal database to determine size.
+FALSE	TRUE	T{
+\fIncurses\fP ignores \fBLINES\fP and \fB\%COLUMNS\fP,
+using operating system calls to obtain size.
 T}
 .TE
 .SS putwin/getwin
@@ -303,7 +297,7 @@ loaded when the terminal description is read by the library.
 The \fBnofilter\fP and \fBuse_tioctl\fP routines are specific to \fBncurses\fP.
 They were not supported on Version 7, BSD or System V implementations.
 It is recommended that any code depending on \fBncurses\fP extensions
-be conditioned using NCURSES_VERSION.
+be conditioned using \fBNCURSES_VERSION\fP.
 .SS putwin/getwin file-format
 The \fBputwin\fP and \fBgetwin\fP functions have several issues with
 portability:
diff --git a/man/define_key.3x b/man/define_key.3x
index d4ac62f4..fed925ea 100644
--- a/man/define_key.3x
+++ b/man/define_key.3x
@@ -29,39 +29,40 @@
 .\"
 .\" Author: Thomas E. Dickey 1997
 .\"
-.\" $Id: define_key.3x,v 1.27 2023/09/16 23:37:03 tom Exp $
-.TH define_key 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: define_key.3x,v 1.34 2023/09/23 23:04:14 tom Exp $
+.TH define_key 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%define_key\fP \-
 define a \fIcurses\fR keycode
 .SH SYNOPSIS
 \fB#include \fP
-.sp
+.PP
 \fBint define_key(const char *\fIdefinition\fB, int \fIkeycode\fB);\fR
 .SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
 It permits an application to define keycodes with their corresponding control
-strings, so that the ncurses library will interpret them just as it would
+strings, so that the \fIncurses\fP library will interpret them just as it would
 the predefined codes in the terminfo database.
 .PP
-If the given string is null, any existing definition for the keycode is
-removed.
+If \fIdefinition\fP is \fBNULL\fP,
+any existing one for the keycode is removed.
 Similarly, if the given keycode is negative or zero, any existing string
 for the given definition is removed.
 .SH RETURN VALUE
-The keycode must be greater than zero, and the string non-null,
+Either \fIkeycode\fP must be greater than zero,
+or \fIdefinition\fP must be non-\fBNULL\fP,
 otherwise \fBERR\fP is returned.
 \fBERR\fP may also be returned if there is insufficient memory to allocate the
 data to store the definition.
 If no error is detected, \fBOK\fP is returned.
 .SH PORTABILITY
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
 They were not supported on
 Version 7, BSD or System V implementations.
 It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH SEE ALSO
-\fBkeyok\fP(3X),
-\fBkey_defined\fP(3X).
+\fB\%keyok\fP(3X),
+\fB\%key_defined\fP(3X)
 .SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
diff --git a/man/key_defined.3x b/man/key_defined.3x
index 5e140551..1fa66c4d 100644
--- a/man/key_defined.3x
+++ b/man/key_defined.3x
@@ -29,17 +29,17 @@
 .\"
 .\" Author: Thomas E. Dickey 2003
 .\"
-.\" $Id: key_defined.3x,v 1.20 2023/09/16 23:38:39 tom Exp $
-.TH key_defined 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: key_defined.3x,v 1.26 2023/09/23 22:49:51 tom Exp $
+.TH key_defined 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%key_defined\fP \-
 test whether a \fIcurses\fR keycode is defined
 .SH SYNOPSIS
 \fB#include \fP
-.sp
+.PP
 \fBint key_defined(const char *\fIdefinition\fB);\fR
 .SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
 It permits an application to determine if a string is currently bound
 to any keycode.
 .SH RETURN VALUE
@@ -48,12 +48,12 @@ If no keycode is bound, zero is returned.
 If the string conflicts with longer strings
 which are bound to keys, \-1 is returned.
 .SH PORTABILITY
-This routine is specific to ncurses.
+This routine is specific to \fIncurses\fP.
 It was not supported on
 Version 7, BSD or System V implementations.
 It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH SEE ALSO
-\fBdefine_key\fP(3X).
+\fB\%define_key\fP(3X)
 .SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
diff --git a/man/keybound.3x b/man/keybound.3x
index b2dde39c..e8528902 100644
--- a/man/keybound.3x
+++ b/man/keybound.3x
@@ -29,34 +29,34 @@
 .\"
 .\" Author: Thomas E. Dickey 1999
 .\"
-.\" $Id: keybound.3x,v 1.21 2023/09/16 23:38:39 tom Exp $
-.TH keybound 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: keybound.3x,v 1.27 2023/09/23 22:49:51 tom Exp $
+.TH keybound 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%keybound\fP \-
 get definition of \fIcurses\fR keycode
 .SH SYNOPSIS
 \fB#include \fP
-.sp
+.PP
 \fBchar * keybound(int \fIkeycode\fB, int \fIcount);\fR
 .SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
 It permits an application to determine the string which is defined
 in the terminfo for specific keycodes.
 .SH RETURN VALUE
-The \fIkeycode\fP parameter must be greater than zero, else NULL is returned.
-If it does not correspond to a defined key, then NULL is returned.
+The \fIkeycode\fP parameter must be greater than zero, else \fBNULL\fP is returned.
+If it does not correspond to a defined key, then \fBNULL\fP is returned.
 The \fIcount\fP parameter is used to allow the application to iterate
 through multiple definitions, counting from zero.
 When successful,
 the function returns a string which must be freed by the caller.
 .SH PORTABILITY
-This routine is specific to ncurses.
+This routine is specific to \fIncurses\fP.
 It was not supported on
 Version 7, BSD or System V implementations.
 It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH SEE ALSO
-\fBdefine_key\fP(3X),
-\fBkeyok\fP(3X).
+\fB\%define_key\fP(3X),
+\fB\%keyok\fP(3X)
 .SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
diff --git a/man/keyok.3x b/man/keyok.3x
index 7bc1d911..c6205cb3 100644
--- a/man/keyok.3x
+++ b/man/keyok.3x
@@ -29,19 +29,19 @@
 .\"
 .\" Author: Thomas E. Dickey 1997
 .\"
-.\" $Id: keyok.3x,v 1.26 2023/09/16 23:38:39 tom Exp $
-.TH keyok 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: keyok.3x,v 1.32 2023/09/23 22:49:51 tom Exp $
+.TH keyok 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .SH NAME
 \fB\%keyok\fP \-
 enable or disable a \fIcurses\fR keycode
 .SH SYNOPSIS
 \fB#include \fP
-.sp
+.PP
 \fBint keyok(int \fIkeycode\fB, bool \fIenable\fB);\fR
 .SH DESCRIPTION
-This is an extension to the curses library.
+This is an extension to the \fIcurses\fP library.
 It permits an application to disable specific keycodes, rather than
-use the \fBkeypad\fP function to disable all keycodes.
+use the \fB\%keypad\fP function to disable all keycodes.
 Keys that have been disabled can be re-enabled.
 .SH RETURN VALUE
 The keycode must be greater than zero, else \fBERR\fP is returned.
@@ -50,12 +50,12 @@ If the \fIenable\fP parameter is true, then the key must have been disabled,
 and vice versa.
 Otherwise, the function returns \fBOK\fP.
 .SH PORTABILITY
-This routine is specific to ncurses.
+This routine is specific to \fIncurses\fP.
 It was not supported on
 Version 7, BSD or System V implementations.
 It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH SEE ALSO
-\fBdefine_key\fP(3X).
+\fB\%define_key\fP(3X)
 .SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
diff --git a/man/manhtml.aliases b/man/manhtml.aliases
index 455edb3b..21c47de9 100644
--- a/man/manhtml.aliases
+++ b/man/manhtml.aliases
@@ -1,4 +1,4 @@
-# $Id: manhtml.aliases,v 1.24 2023/07/29 16:47:09 tom Exp $
+# $Id: manhtml.aliases,v 1.25 2023/09/23 23:00:59 tom Exp $
 #***************************************************************************
 # Copyright 2019-2022,2023 Thomas E. Dickey                                *
 # Copyright 2013,2017 Free Software Foundation, Inc.                       *
@@ -78,3 +78,4 @@ wget_wch(3X)		curs_get_wch(3X)
 wgetch(3X)		curs_getch(3X)
 wnoutrefresh(3X)	curs_refresh(3X)
 wrefresh(3X)		curs_refresh(3X)
+wsetscrreg(3X)		curs_outopts(3X)
diff --git a/man/ncurses.3x b/man/ncurses.3x
index 10878e1c..3edab688 100644
--- a/man/ncurses.3x
+++ b/man/ncurses.3x
@@ -28,8 +28,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: ncurses.3x,v 1.171 2023/09/16 23:38:39 tom Exp $
-.TH ncurses 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: ncurses.3x,v 1.174 2023/09/23 22:58:27 tom Exp $
+.TH ncurses 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -599,7 +599,7 @@ notimeout/\fBcurs_inopts\fP(3X)
 overlay/\fBcurs_overlay\fP(3X)
 overwrite/\fBcurs_overlay\fP(3X)
 pair_content/\fBcurs_color\fP(3X)
-pecho_wchar/\fBcurs_pad\fP(3X)*
+pecho_wchar/\fBcurs_pad\fP(3X)
 pechochar/\fBcurs_pad\fP(3X)
 pnoutrefresh/\fBcurs_pad\fP(3X)
 prefresh/\fBcurs_pad\fP(3X)
@@ -649,7 +649,7 @@ slk_refresh/\fBcurs_slk\fP(3X)
 slk_restore/\fBcurs_slk\fP(3X)
 slk_set/\fBcurs_slk\fP(3X)
 slk_touch/\fBcurs_slk\fP(3X)
-slk_wset/\fBcurs_slk\fP(3X)*
+slk_wset/\fBcurs_slk\fP(3X)
 standend/\fBcurs_attr\fP(3X)
 standout/\fBcurs_attr\fP(3X)
 start_color/\fBcurs_color\fP(3X)
@@ -668,7 +668,7 @@ tigetflag/\fBcurs_terminfo\fP(3X)
 tigetnum/\fBcurs_terminfo\fP(3X)
 tigetstr/\fBcurs_terminfo\fP(3X)
 timeout/\fBcurs_inopts\fP(3X)
-tiparm/\fBcurs_terminfo\fP(3X)*
+tiparm/\fBcurs_terminfo\fP(3X)
 tiparm_s/\fBcurs_terminfo\fP(3X)*
 tiscan_s/\fBcurs_terminfo\fP(3X)*
 touchline/\fBcurs_touch\fP(3X)
diff --git a/man/new_pair.3x b/man/new_pair.3x
index 772d09eb..66d2c006 100644
--- a/man/new_pair.3x
+++ b/man/new_pair.3x
@@ -29,8 +29,8 @@
 .\"
 .\" Author: Thomas E. Dickey
 .\"
-.\" $Id: new_pair.3x,v 1.30 2023/09/16 23:38:39 tom Exp $
-.TH new_pair 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: new_pair.3x,v 1.36 2023/09/23 22:37:46 tom Exp $
+.TH new_pair 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -64,15 +64,15 @@
 \fB\%free_pair\fP \-
 dynamically allocate \fIcurses\fR color pairs
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBint alloc_pair(int \fIfg\fB, int \fIbg\fB);\fR
-.br
 \fBint find_pair(int \fIfg\fB, int \fIbg\fB);\fR
-.br
 \fBint free_pair(int \fIpair\fB);\fR
+.fi
 .SH DESCRIPTION
-These functions are an extension to the curses library.
+These functions are an extension to the \fIcurses\fP library.
 They permit an application to dynamically allocate a color pair using
 the foreground/background colors rather than assign a fixed color pair number,
 and return an unused pair to the pool.
@@ -86,7 +86,7 @@ it is unlikely that your terminal allows you to modify the attributes
 of a given character cell without rewriting it.
 That is, the foreground and background colors are applied as a pair.
 .bP
-Color pairs are the curses library's way of managing a color palette
+Color pairs are the \fIcurses\fP library's way of managing a color palette
 on a terminal.
 If the library does not keep track of the \fIcombinations\fP of
 colors which are displayed, it will be inefficient.
@@ -136,7 +136,7 @@ All of the color pairs are allocated from a table of possible color pairs.
 The size of the table is determined by the terminfo \fBpairs\fP capability.
 The table is shared with \fBinit_pair\fP;
 in fact \fBalloc_pair\fP calls \fBinit_pair\fP after
-updating the ncurses library's fast index to the colors versus color pairs.
+updating the \fIncurses\fP library's fast index to the colors versus color pairs.
 .SS find_pair
 The \fBfind_pair\fP function accepts parameters for
 foreground and background color, and
@@ -160,12 +160,12 @@ or \-1 if not.
 Likewise, \fBfree_pair\fP returns \fBOK\fP unless it encounters an
 error updating the fast index or if no such color pair is in use.
 .SH PORTABILITY
-These routines are specific to ncurses.
+These routines are specific to \fIncurses\fP.
 They were not supported on
 Version 7, BSD or System V implementations.
 It is recommended that
-any code depending on them be conditioned using NCURSES_VERSION.
+any code depending on them be conditioned using \fB\%NCURSES_VERSION\fP.
 .SH SEE ALSO
-\fBcurs_color\fP(3X).
+\fBcurs_color\fP(3X)
 .SH AUTHOR
-Thomas Dickey.
+Thomas Dickey
diff --git a/man/panel.3x b/man/panel.3x
index 56ea1cd2..5716fa88 100644
--- a/man/panel.3x
+++ b/man/panel.3x
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: panel.3x,v 1.50 2023/09/16 23:38:39 tom Exp $
-.TH panel 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: panel.3x,v 1.52 2023/09/23 23:37:26 tom Exp $
+.TH panel 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -245,7 +245,7 @@ provide a panel library whose common ancestor
 was a public domain implementation by Warren Tucker
 published in \fIu386mon\fP 2.20 (1990).
 .IP
-According to Tucker, the SystemV panel library
+According to Tucker, the System\ V panel library
 was first released in SVr3.2 (1988),
 and his implementation helped with a port to SVr3.1 (1987).
 .IP
diff --git a/man/resizeterm.3x b/man/resizeterm.3x
index 73b8d3f0..c44b40e3 100644
--- a/man/resizeterm.3x
+++ b/man/resizeterm.3x
@@ -29,8 +29,8 @@
 .\"
 .\" Author: Thomas E. Dickey 1996-on
 .\"
-.\" $Id: resizeterm.3x,v 1.40 2023/09/16 23:38:39 tom Exp $
-.TH resizeterm 3X 2023-09-16 "ncurses 6.4" "Library calls"
+.\" $Id: resizeterm.3x,v 1.45 2023/09/23 22:49:53 tom Exp $
+.TH resizeterm 3X 2023-09-23 "ncurses 6.4" "Library calls"
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
@@ -41,81 +41,81 @@
 \fB\%resizeterm\fP \-
 manage the terminal dimensions understood by \fIcurses\fR
 .SH SYNOPSIS
+.nf
 \fB#include \fP
-.sp
+.PP
 \fBbool is_term_resized(int \fIlines\fB, int \fIcolumns\fB);\fR
-.br
 \fBint resize_term(int \fIlines\fB, int \fIcolumns\fB);\fR
-.br
 \fBint resizeterm(int \fIlines\fB, int \fIcolumns\fB);\fR
+.fi
 .SH DESCRIPTION
-This is an extension to the curses library.
-It provides callers with a hook into the \fBncurses\fP data to resize windows,
+This is an extension to the \fIcurses\fP library.
+It provides callers with a hook into the \fIncurses\fP data to resize windows,
 primarily for use by programs running in an X Window terminal (e.g., xterm)
 when the terminal's screen size is changed by the user:
 .bP
-Curses windows cannot extend outside the screen.
-If the terminal is shrunk, curses windows must be shrunk to fit.
+\fIcurses\fP windows cannot extend outside the screen.
+If the terminal is shrunk, \fIcurses\fP windows must be shrunk to fit.
 .bP
 If the terminal is stretched,
 rows and/or columns can be added to existing windows.
 The added cells should match the current attributes of the windows.
 .PP
-If the calling program has not set up a handler for \fBSIGWINCH\fP
-when it initializes \fBncurses\fP
-(e.g., using \fBinitscr\fP(3X) or \fBnewterm\fP(3X)),
-then \fBncurses\fP sets a handler for \fBSIGWINCH\fP which notifies
+If the calling program has not set up a handler for \fB\%SIGWINCH\fP
+when it initializes \fIncurses\fP
+(e.g., using \fB\%initscr\fP(3X) or \fB\%newterm\fP(3X)),
+then \fIncurses\fP sets a handler for \fB\%SIGWINCH\fP which notifies
 the library when a window-size event has occurred.
 The library checks for this notification
 .bP
 when reading input data,
 .bP
 when implicitly resuming program mode
-(e.g., between \fBendwin\fP(3X) and \fBwrefresh\fP(3X)),
+(e.g., between \fB\%endwin\fP(3X) and \fB\%wrefresh\fP(3X)),
 and
 .bP
-when explicitly resuming program mode in \fBrestartterm\fP(3X).
+when explicitly resuming program mode in \fB\%restartterm\fP(3X).
 .PP
 When the library has found that the terminal's window-size has
-changed, it calls \fBresizeterm\fP to update its data structures.
+changed, it calls \fB\%resizeterm\fP to update its data structures.
 .PP
-An application which establishes its own \fBSIGWINCH\fP handler
-can call \fBresizeterm\fP, but in that case, the library will not
-see \fBSIGWINCH\fP, and proper layout will rely upon the application.
+An application which establishes its own \fB\%SIGWINCH\fP handler
+can call \fB\%resizeterm\fP, but in that case, the library will not
+see \fB\%SIGWINCH\fP, and proper layout will rely upon the application.
 .SH FUNCTIONS
 .SS resizeterm
-The function \fBresizeterm\fP resizes the standard and current windows
-(i.e., \fBstdscr\fP and \fBcurscr\fP)
+The function \fB\%resizeterm\fP resizes the standard and current windows
+(i.e., \fB\%stdscr\fP and \fB\%curscr\fP)
 to the specified dimensions, and adjusts other bookkeeping data used by
-the \fBncurses\fP library that record the window dimensions
-such as the \fBLINES\fP and \fBCOLS\fP variables.
+the \fIncurses\fP library that record the window dimensions
+such as the \fB\%LINES\fP and \fB\%COLS\fP variables.
 .SS resize_term
-Most of the work for \fBresizeterm\fP is
-done by the inner function \fBresize_term\fP.
-The outer function \fBresizeterm\fP adds bookkeeping
-for the \fBSIGWINCH\fP handler,
-as well as repainting the soft-key area (see \fBslk_touch\fP(3X)).
+Most of the work for \fB\%resizeterm\fP is
+done by the inner function \fB\%resize_term\fP.
+The outer function \fB\%resizeterm\fP adds bookkeeping
+for the \fB\%SIGWINCH\fP handler,
+as well as repainting the soft-key area (see \fB\%slk_touch\fP(3X)).
 .PP
-The \fBresize_term\fP function attempts to resize all windows.
+The \fB\%resize_term\fP function attempts to resize all windows.
 This helps with simple applications.
 However:
 .bP
 It is not possible to automatically resize pads.
 .bP
 Applications which have complicated layouts should check for
-\fBKEY_RESIZE\fP returned from \fBwgetch\fP,
-and adjust their layout, e.g., using \fBwresize\fP and \fBmvwin\fP,
+\fB\%KEY_RESIZE\fP returned from \fB\%wgetch\fP,
+and adjust their layout, e.g., using \fB\%wresize\fP and \fB\%mvwin\fP,
 or by recreating the windows.
 .PP
-When resizing windows, \fBresize_term\fP recursively adjusts subwindows,
+When resizing windows, \fB\%resize_term\fP recursively adjusts subwindows,
 keeping them within the updated parent window's limits.
 If a top-level window happens to extend to the screen's limits,
-then on resizing the window, \fBresize_term\fP will keep the window
+then on resizing the window, \fB\%resize_term\fP will keep the window
 extending to the corresponding limit, regardless of whether the
 screen has shrunk or grown.
 .SS is_term_resized
-A support function \fBis_term_resized\fP is provided so that applications
-can check if the \fBresize_term\fP function would modify the window structures.
+A support function \fB\%is_term_resized\fP is provided so that applications
+can check if the \fB\%resize_term\fP function would modify the window structures.
 It returns \fBTRUE\fP if the windows would be modified,
 and \fBFALSE\fP otherwise.
 .SH RETURN VALUE
@@ -125,53 +125,53 @@ They will fail if either of the dimensions are less than or equal to zero,
 or if an error occurs while (re)allocating memory for the windows.
 .SH NOTES
 While these functions are intended to be used to support a signal handler
-(i.e., for \fBSIGWINCH\fP), care should be taken to avoid invoking them in a
-context where \fBmalloc\fP or \fBrealloc\fP may have been interrupted,
+(i.e., for \fB\%SIGWINCH\fP), care should be taken to avoid invoking them in a
+context where \fB\%malloc\fP or \fB\%realloc\fP may have been interrupted,
 since it uses those functions.
 .PP
-If ncurses is configured to supply its own \fBSIGWINCH\fP handler,
+If \fIncurses\fP is configured to supply its own \fB\%SIGWINCH\fP handler,
 .bP
-on receipt of a \fBSIGWINCH\fP, the handler sets a flag
+on receipt of a \fB\%SIGWINCH\fP, the handler sets a flag
 .bP
 which is tested in
-\fBwgetch\fP(3X),
-\fBdoupdate\fP(3X) and
-\fBrestartterm\fP(3X),
+\fB\%wgetch\fP(3X),
+\fB\%doupdate\fP(3X) and
+\fB\%restartterm\fP(3X),
 .bP
-in turn, calling the \fBresizeterm\fP function,
+in turn, calling the \fB\%resizeterm\fP function,
 .bP
-which \fBungetch\fP's a \fBKEY_RESIZE\fP which
-will be read on the next call to \fBwgetch\fP.
+which \fB\%ungetch\fP's a \fB\%KEY_RESIZE\fP which
+will be read on the next call to \fB\%wgetch\fP.
 .IP
-The \fBKEY_RESIZE\fP alerts an application that the screen size has changed,
+The \fB\%KEY_RESIZE\fP alerts an application that the screen size has changed,
 and that it should repaint special features such as pads that cannot
 be done automatically.
 .IP
-Calling \fBresizeterm\fP or \fBresize_term\fP
+Calling \fB\%resizeterm\fP or \fB\%resize_term\fP
 directly from a signal handler is unsafe.
-This indirect method is used to provide a safe way to resize the ncurses
+This indirect method is used to provide a safe way to resize the \fIncurses\fP
 data structures.
 .PP
-If the environment variables \fBLINES\fP or \fBCOLUMNS\fP are set,
+If the environment variables \fB\%LINES\fP or \fB\%COLUMNS\fP are set,
 this overrides the library's use of the window size obtained from
 the operating system.
-Thus, even if a \fBSIGWINCH\fP is received,
+Thus, even if a \fB\%SIGWINCH\fP is received,
 no screen size change may be recorded.
 .SH PORTABILITY
-It is possible to resize the screen with SVr4 curses,
+It is possible to resize the screen with SVr4 \fIcurses\fP,
 by
 .bP
-exiting curses with \fBendwin\fP(3X) and
+exiting \fIcurses\fP with \fB\%endwin\fP(3X) and
 .bP
-resuming using \fBrefresh\fP(3X).
+resuming using \fB\%refresh\fP(3X).
 .PP
 Doing that clears the screen and is visually distracting.
 .PP
-This extension of ncurses was introduced in mid-1995.
-It was adopted in NetBSD curses (2001) and PDCurses (2003).
+This extension of \fIncurses\fP was introduced in mid-1995.
+It was adopted in NetBSD \fIcurses\fP (2001) and PDCurses (2003).
 .SH SEE ALSO
-\fBcurs_getch\fP(3X),
-\fBcurs_variables\fP(3X),
-\fBwresize\fP(3X).
+\fB\%curs_getch\fP(3X),
+\fB\%curs_variables\fP(3X),
+\fB\%wresize\fP(3X)
 .SH AUTHOR
-Thomas Dickey (from an equivalent function written in 1988 for BSD curses).
+Thomas Dickey (from an equivalent function written in 1988 for BSD \fIcurses\fP)
diff --git a/man/scr_dump.5 b/man/scr_dump.5
index 5eaa7f79..b1db0ea5 100644
--- a/man/scr_dump.5
+++ b/man/scr_dump.5
@@ -27,8 +27,8 @@
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: scr_dump.5,v 1.31 2023/09/16 23:38:39 tom Exp $
-.TH scr_dump 5 2023-09-16 "ncurses 6.4" "File formats"
+.\" $Id: scr_dump.5,v 1.33 2023/09/23 23:37:26 tom Exp $
+.TH scr_dump 5 2023-09-23 "ncurses 6.4" "File formats"
 .ie \n(.g .ds `` \(lq
 .el       .ds `` ``
 .ie \n(.g .ds '' \(rq
@@ -129,7 +129,7 @@ When \fBgetwin\fP restored the window,
 it would keep track of offsets into the array of line-data
 and adjust the \fBWINDOW\fP structure which was read back into memory.
 .PP
-This is similar to Unix SystemV,
+This is similar to Unix System\ V,
 but does not write a \*(``magic number\*('' to identify the file format.
 .SH PORTABILITY
 There is no standard format for \fBputwin\fP.
@@ -171,8 +171,8 @@ or more specific portability warnings about use of the material.
 In the foregoing, emphasis was added to \fBunspecified format\fP
 and to \fBXPG4 or to earlier XPG releases\fP,
 for clarity.
-.SS Unix SystemV
-Unix SystemV curses identified the file format by writing a
+.SS Unix System V
+Unix System\ V curses identified the file format by writing a
 \*(``magic number\*('' at the beginning of the dump.
 The \fBWINDOW\fP data and the lines of text follow, all in binary form.
 .PP
@@ -242,7 +242,7 @@ with coordinates and attributes for each chunk of text rather
 than writing the whole window from top to bottom.
 .SS PDCurses
 PDCurses added support for screen dumps in version 2.7 (2005).
-Like Unix SystemV and ncurses5,
+Like Unix System\ V and ncurses5,
 it writes the \fBWINDOW\fP structure in binary,
 but begins the file with its three-byte identifier \*(``PDC\*('',
 followed by a one-byte version,
diff --git a/misc/magic b/misc/magic
index 0fab0049..67a3caa2 100644
--- a/misc/magic
+++ b/misc/magic
@@ -1,4 +1,4 @@
-# $Id: magic,v 1.3 2020/02/02 23:34:34 tom Exp $
+# $Id: magic,v 1.4 2023/09/23 23:37:26 Branden.Robinson Exp $
 ##############################################################################
 # Copyright 2020 Thomas E. Dickey                                            #
 # Copyright 2015,2018 Free Software Foundation, Inc.                         #
@@ -60,7 +60,7 @@
 !:mime	application/x-terminfo2
 #
 # While the compiled terminfo uses little-endian format irregardless of
-# platform, SystemV screen dumps do not.  They came later, and that detail was
+# platform, System V screen dumps do not.  They came later, and that detail was
 # overlooked.
 #
 # AIX and HPUX use the SVr4 big-endian format
diff --git a/ncurses/base/vsscanf.c b/ncurses/base/vsscanf.c
index ef524250..40ee8bb1 100644
--- a/ncurses/base/vsscanf.c
+++ b/ncurses/base/vsscanf.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2023 Thomas E. Dickey                                     *
  * Copyright 1998-2004,2012 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -39,15 +39,12 @@
 
 #if !HAVE_VSSCANF
 
-MODULE_ID("$Id: vsscanf.c,v 1.21 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: vsscanf.c,v 1.22 2023/09/23 18:48:57 tom Exp $")
 
 #if !(HAVE_VFSCANF || HAVE__DOSCAN)
 
 #include 
 
-#define L_SQUARE '['
-#define R_SQUARE ']'
-
 typedef enum {
     cUnknown
     ,cError			/* anything that isn't ANSI */
@@ -243,7 +240,7 @@ vsscanf(const char *str, const char *format, va_list ap)
 		    case sPercent:
 			if (format[n] == '%') {
 			    state = sUnknown;
-			} else if (format[n] == L_SQUARE) {
+			} else if (format[n] == L_BLOCK) {
 			    state = sLeft;
 			} else {
 			    state = sNormal;
@@ -258,7 +255,7 @@ vsscanf(const char *str, const char *format, va_list ap)
 			}
 			break;
 		    case sRange:
-			if (format[n] == R_SQUARE) {
+			if (format[n] == R_BLOCK) {
 			    state = sFinal;
 			    chunk = cRange;
 			}
diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
index 7946d56f..d18945cd 100644
--- a/ncurses/curses.priv.h
+++ b/ncurses/curses.priv.h
@@ -35,7 +35,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.674 2023/09/16 16:31:14 tom Exp $
+ * $Id: curses.priv.h,v 1.676 2023/09/23 18:46:47 tom Exp $
  *
  *	curses.priv.h
  *
@@ -312,7 +312,6 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
 #define NO_TERMINAL "unknown"
 #define USE_SP_RIPOFF     1
 #define USE_SP_TERMTYPE   1
-#define USE_SP_WINDOWLIST 1
 #else
 #define NO_TERMINAL 0
 #endif
@@ -323,6 +322,12 @@ extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t);
 		     : no_terminal), \
 	 NonEmpty(term_env))
 
+/*
+ * Originally a terminal-driver option, the window-list is per-screen to allow
+ * freeing memory used for windows when a screen is deleted.
+ */
+#define USE_SP_WINDOWLIST 1
+
 /*
  * Note:  ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
  * when we're throwing control codes at the screen at high volume.  To see
@@ -345,6 +350,11 @@ typedef TRIES {
  */
 #define StringOf(ch) {ch, 0}
 
+#define CSI_CHR 0x9b
+#define ESC_CHR 0x1b
+
+#define L_BLOCK '['
+#define R_BLOCK ']'
 #define L_BRACE '{'
 #define R_BRACE '}'
 #define S_QUOTE '\''
diff --git a/ncurses/report_offsets.c b/ncurses/report_offsets.c
index 83f6f381..cef8a8ec 100644
--- a/ncurses/report_offsets.c
+++ b/ncurses/report_offsets.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2020,2021 Thomas E. Dickey                                *
+ * Copyright 2018-2021,2023 Thomas E. Dickey                                *
  * Copyright 2017 Free Software Foundation, Inc.                            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -33,7 +33,7 @@
 
 #include 
 
-MODULE_ID("$Id: report_offsets.c,v 1.22 2021/08/19 19:51:33 tom Exp $")
+MODULE_ID("$Id: report_offsets.c,v 1.23 2023/09/23 16:47:57 tom Exp $")
 
 #define show_size(type) \
 	flag = 0; \
@@ -65,12 +65,7 @@ MODULE_ID("$Id: report_offsets.c,v 1.22 2021/08/19 19:51:33 tom Exp $")
 #define show_MLEAKS(type,member)	/* nothing */
 #endif
 
-#ifdef USE_TERM_DRIVER
-#define show_NORMAL(type,member)	/* nothing */
-#else
 #define show_NORMAL(type,member) { flag = "n"; show_offset(type,member); }
-#endif
-
 #define show_OPTION(type,member) { flag = "+"; show_offset(type,member); }
 
 #if USE_REENTRANT
@@ -160,7 +155,9 @@ main(void)
 #if USE_SIZECHANGE
     show_OPTION(SCREEN, _resize);
 #endif
-    show_DRIVER(SCREEN, _windowlist);
+#ifdef USE_SP_WINDOWLIST
+    show_NORMAL(SCREEN, _windowlist);
+#endif
     show_REENTR(SCREEN, _ttytype);
     show_SPFUNC(SCREEN, use_tioctl);
     show_WIDECH(SCREEN, _screen_acs_fix);
@@ -210,7 +207,9 @@ main(void)
     show_offset(NCURSES_GLOBALS, cached_tparm);
 #endif
     show_DRIVER(NCURSES_GLOBALS, term_driver);
+#ifndef USE_SP_WINDOWLIST
     show_NORMAL(NCURSES_GLOBALS, _nc_windowlist);
+#endif
 #if USE_HOME_TERMINFO
     show_OPTION(NCURSES_GLOBALS, home_terminfo);
 #endif
diff --git a/ncurses/tinfo/trim_sgr0.c b/ncurses/tinfo/trim_sgr0.c
index 22bc82ff..177dcd87 100644
--- a/ncurses/tinfo/trim_sgr0.c
+++ b/ncurses/tinfo/trim_sgr0.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020,2021 Thomas E. Dickey                                     *
+ * Copyright 2020-2021,2023 Thomas E. Dickey                                *
  * Copyright 2005-2012,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -37,15 +37,11 @@
 
 #include 
 
-MODULE_ID("$Id: trim_sgr0.c,v 1.21 2021/06/17 21:20:30 tom Exp $")
+MODULE_ID("$Id: trim_sgr0.c,v 1.22 2023/09/23 18:47:56 tom Exp $")
 
 #undef CUR
 #define CUR tp->
 
-#define CSI       233
-#define ESC       033		/* ^[ */
-#define L_BRACK   '['
-
 static char *
 set_attribute_9(TERMTYPE2 *tp, int flag)
 {
@@ -65,9 +61,9 @@ is_csi(const char *s)
 {
     int result = 0;
     if (s != 0) {
-	if (UChar(s[0]) == CSI)
+	if (UChar(s[0]) == CSI_CHR)
 	    result = 1;
-	else if (s[0] == ESC && s[1] == L_BRACK)
+	else if (s[0] == ESC_CHR && s[1] == L_BLOCK)
 	    result = 2;
     }
     return result;
diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
index 0f99c1c0..9463548a 100644
--- a/package/debian-mingw/changelog
+++ b/package/debian-mingw/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230918) unstable; urgency=low
+ncurses6 (6.4+20230923) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 17 Sep 2023 18:08:06 -0400
+ -- Thomas E. Dickey   Sat, 23 Sep 2023 05:27:19 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
index 0f99c1c0..9463548a 100644
--- a/package/debian-mingw64/changelog
+++ b/package/debian-mingw64/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230918) unstable; urgency=low
+ncurses6 (6.4+20230923) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 17 Sep 2023 18:08:06 -0400
+ -- Thomas E. Dickey   Sat, 23 Sep 2023 05:27:19 -0400
 
 ncurses6 (5.9+20131005) unstable; urgency=low
 
diff --git a/package/debian/changelog b/package/debian/changelog
index a3ca43ec..73784113 100644
--- a/package/debian/changelog
+++ b/package/debian/changelog
@@ -1,8 +1,8 @@
-ncurses6 (6.4+20230918) unstable; urgency=low
+ncurses6 (6.4+20230923) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey   Sun, 17 Sep 2023 18:08:06 -0400
+ -- Thomas E. Dickey   Sat, 23 Sep 2023 05:27:19 -0400
 
 ncurses6 (5.9+20120608) unstable; urgency=low
 
diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
index 3eb41412..7a5c2d07 100644
--- a/package/mingw-ncurses.nsi
+++ b/package/mingw-ncurses.nsi
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.606 2023/09/17 22:08:06 tom Exp $
+; $Id: mingw-ncurses.nsi,v 1.607 2023/09/23 09:27:19 tom Exp $
 
 ; TODO add examples
 ; TODO bump ABI to 6
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"
 !define VERSION_MINOR "4"
 !define VERSION_YYYY  "2023"
-!define VERSION_MMDD  "0918"
+!define VERSION_MMDD  "0923"
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
 
 !define MY_ABI   "5"
diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
index b0bc2082..97007c33 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.4
-Release: 20230918
+Release: 20230923
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
diff --git a/package/ncurses.spec b/package/ncurses.spec
index 340f23ee..a5fda1c3 100644
--- a/package/ncurses.spec
+++ b/package/ncurses.spec
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.4
-Release: 20230918
+Release: 20230923
 License: X11
 Group: Development/Libraries
 URL: https://invisible-island.net/ncurses/
diff --git a/package/ncursest.spec b/package/ncursest.spec
index 9780cc30..7d0542ef 100644
--- a/package/ncursest.spec
+++ b/package/ncursest.spec
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.4
-Release: 20230918
+Release: 20230923
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
diff --git a/test/ditto.c b/test/ditto.c
index 390eb3c0..acac8377 100644
--- a/test/ditto.c
+++ b/test/ditto.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2018-2021,2022 Thomas E. Dickey                                *
+ * Copyright 2018-2022,2023 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -30,7 +30,7 @@
 /*
  * Author: Thomas E. Dickey (1998-on)
  *
- * $Id: ditto.c,v 1.58 2022/12/24 23:53:08 tom Exp $
+ * $Id: ditto.c,v 1.59 2023/09/23 17:08:43 tom Exp $
  *
  * The program illustrates how to set up multiple screens from a single
  * program.
@@ -239,6 +239,14 @@ init_screen(
     return TRUE;
 }
 
+static void
+free_screen(DITTO * target)
+{
+    free(target->parents);
+    free(target->windows);
+    free(target->peeks);
+}
+
 static void
 open_screen(DITTO * target, char **source, int length, int which1)
 {
@@ -480,8 +488,10 @@ main(int argc, char *argv[])
 	fflush(data[j].output);
 	fclose(data[j].output);
 	delscreen(data[j].screen);
+	free_screen(&data[j]);
 	UnlockIt();
     }
+    free(data);
     ExitProgram(EXIT_SUCCESS);
 }
 #else
-- 
2.45.0