From b3719ca8b52aa07d0d85f7c1ce645a471397ccfe Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sat, 10 Jun 2023 18:08:15 +0000 Subject: [PATCH] ncurses 6.4 - patch 20230610 + improve manpages discussing file descriptors in low-level functions. + modify flushinp to use file descriptors in SCREEN, rather than from TERMINAL, and check if they are for a terminal, like SVr4. + modify mcprint to use file descriptor in SCREEN, for consistency. + add xterm+focus to foot+base (patch by Daniel Ekloef). + correct definition of Charable() for non-wide ncurses library (report and test-case by Zbigniew Baniewski). --- NEWS | 11 +- VERSION | 2 +- dist.mk | 4 +- doc/html/man/adacurses6-config.1.html | 2 +- doc/html/man/captoinfo.1m.html | 2 +- doc/html/man/clear.1.html | 2 +- doc/html/man/curs_initscr.3x.html | 92 ++++++---- doc/html/man/curs_terminfo.3x.html | 135 ++++++++------- doc/html/man/form.3x.html | 2 +- doc/html/man/infocmp.1m.html | 2 +- doc/html/man/infotocap.1m.html | 2 +- doc/html/man/menu.3x.html | 2 +- doc/html/man/ncurses.3x.html | 2 +- doc/html/man/ncurses6-config.1.html | 2 +- doc/html/man/panel.3x.html | 2 +- doc/html/man/tabs.1.html | 2 +- doc/html/man/terminfo.5.html | 2 +- doc/html/man/tic.1m.html | 2 +- doc/html/man/toe.1m.html | 2 +- doc/html/man/tput.1.html | 2 +- doc/html/man/tset.1.html | 231 +++++++++++++------------- man/curs_initscr.3x | 39 ++++- man/curs_terminfo.3x | 23 ++- man/manhtml.aliases | 8 +- man/tset.1 | 7 +- misc/terminfo.src | 9 +- ncurses/curses.priv.h | 4 +- ncurses/tinfo/lib_kernel.c | 46 ++--- ncurses/tinfo/lib_print.c | 6 +- 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 +- 36 files changed, 388 insertions(+), 281 deletions(-) diff --git a/NEWS b/NEWS index c3506f05..6ee80b4a 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.3959 2023/06/03 20:12:53 tom Exp $ +-- $Id: NEWS,v 1.3962 2023/06/10 16:51:20 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,15 @@ See the AUTHORS file for the corresponding full names. Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20230610 + + improve manpages discussing file descriptors in low-level functions. + + modify flushinp to use file descriptors in SCREEN, rather than from + TERMINAL, and check if they are for a terminal, like SVr4. + + modify mcprint to use file descriptor in SCREEN, for consistency. + + add xterm+focus to foot+base (patch by Daniel Ekloef). + + correct definition of Charable() for non-wide ncurses library (report + and test-case by Zbigniew Baniewski). + 20230603 + add configure option --with-strip-program, to override program chosen by the install program for stripping executables (prompted diff --git a/VERSION b/VERSION index b733810a..fe6dfafe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.4 20230603 +5:0:10 6.4 20230610 diff --git a/dist.mk b/dist.mk index abd71b3f..9cee1be5 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.1547 2023/06/03 09:47:46 tom Exp $ +# $Id: dist.mk,v 1.1548 2023/06/10 10:03:51 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 = 20230603 +NCURSES_PATCH = 20230610 # 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 9be1e15d..3f16ad17 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 20230423).
+       This describes ncurses version 6.4 (patch 20230610).
 
 
 
diff --git a/doc/html/man/captoinfo.1m.html b/doc/html/man/captoinfo.1m.html
index ba2a1df9..fd789520 100644
--- a/doc/html/man/captoinfo.1m.html
+++ b/doc/html/man/captoinfo.1m.html
@@ -199,7 +199,7 @@
 

SEE ALSO

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

AUTHOR

diff --git a/doc/html/man/clear.1.html b/doc/html/man/clear.1.html
index 33b8311c..ff76e126 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 20230423).
+       This describes ncurses version 6.4 (patch 20230610).
 
 
 
diff --git a/doc/html/man/curs_initscr.3x.html b/doc/html/man/curs_initscr.3x.html
index 08d21a61..9d684955 100644
--- a/doc/html/man/curs_initscr.3x.html
+++ b/doc/html/man/curs_initscr.3x.html
@@ -1,6 +1,6 @@
 
 
 
@@ -59,7 +59,7 @@
 
        bool isendwin(void);
 
-       SCREEN *newterm(const char *type, FILE *outfd, FILE *infd);
+       SCREEN *newterm(const char *type, FILE *outf, FILE *inf);
        SCREEN *set_term(SCREEN *new);
        void delscreen(SCREEN* sp);
 
@@ -84,18 +84,24 @@
        routine for each terminal instead of initscr.  A program that needs  to
        inspect capabilities, so it can continue to run in a line-oriented mode
        if the terminal cannot support a screen-oriented  program,  would  also
-       use newterm.  The routine newterm should be called once for each termi-
-       nal.  It returns a variable of type SCREEN * which should be saved as a
-       reference to that terminal.  newterm's arguments are
+       use newterm.
+
+       The  routine  newterm  should be called once for each terminal.  It re-
+       turns a variable of type SCREEN * which should be saved as a  reference
+       to that terminal.  newterm's arguments are
 
        o   the type of the terminal to be used in place of $TERM,
 
-       o   a file pointer for output to the terminal, and
+       o   an output stream connected to the terminal, and
 
-       o   another file pointer for input from the terminal
+       o   an input stream connected to the terminal
 
        If the type parameter is NULL, $TERM will be used.
 
+       The  file  descriptor  of the output stream is passed to setupterm(3x),
+       which returns a pointer to a TERMINAL structure.  newterm's return val-
+       ue holds a pointer to the TERMINAL structure.
+
 
 

endwin

        The  program  must also call endwin for each terminal being used before
@@ -201,38 +207,57 @@
            the SVr4 model, deleting only the standard WINDOW structures.
 
 
+

High-level versus low-level

+       Different  implementations  may  disagree  regarding  the level of some
+       functions.  For example, SCREEN (returned by newterm) and TERMINAL (re-
+       turned  by  setupterm(3x)) hold file descriptors for the output stream.
+       If an application switches screens using set_term, or  switches  termi-
+       nals  using set_curterm(3x), applications which use the output file de-
+       scriptor can have different behavior depending on which structure holds
+       the corresponding descriptor.
+
+       For example
+
+       o   NetBSD's  baudrate(3x)  function  uses  the descriptor in TERMINAL.
+           ncurses and SVr4 use the descriptor in SCREEN.
+
+       o   NetBSD and ncurses use the descriptor in TERMINAL for terminal  I/O
+           modes,  e.g.,  def_shell_mode(3x),  def_prog_mode(3x).  SVr4 curses
+           uses the descriptor in SCREEN.
+
+
 

Unset TERM Variable

-       If  the  TERM variable is missing or empty, initscr uses the value "un-
+       If the TERM variable is missing or empty, initscr uses the  value  "un-
        known", which normally corresponds to a terminal entry with the generic
-       (gn)  capability.   Generic  entries  are  detected  by  setupterm (see
-       curs_terminfo(3x)) and cannot be used for full-screen operation.  Other
-       implementations may handle a missing/empty TERM variable differently.
+       (gn) capability.  Generic entries are  detected  by  setupterm(3x)  and
+       cannot  be  used  for full-screen operation.  Other implementations may
+       handle a missing/empty TERM variable differently.
 
 
 

Signal Handlers

        Quoting from X/Open Curses, section 3.1.1:
 
-            Curses  implementations  may  provide  for special handling of the
-            SIGINT, SIGQUIT  and  SIGTSTP  signals  if  their  disposition  is
+            Curses implementations may provide for  special  handling  of  the
+            SIGINT,  SIGQUIT  and  SIGTSTP  signals  if  their  disposition is
             SIG_DFL at the time initscr is called ...
 
-            Any  special  handling  for these signals may remain in effect for
+            Any special handling for these signals may remain  in  effect  for
             the  life  of  the  process  or  until  the  process  changes  the
             disposition of the signal.
 
-            None  of the Curses functions are required to be safe with respect
+            None of the Curses functions are required to be safe with  respect
             to signals ...
 
-       This implementation establishes signal handlers during  initialization,
+       This  implementation establishes signal handlers during initialization,
        e.g., initscr or newterm.  Applications which must handle these signals
-       should set up the corresponding handlers  after  initializing  the  li-
+       should  set  up  the  corresponding handlers after initializing the li-
        brary:
 
        SIGINT
-            The  handler  attempts to cleanup the screen on exit.  Although it
+            The handler attempts to cleanup the screen on exit.   Although  it
             usually works as expected, there are limitations:
 
-            o   Walking the SCREEN list is unsafe, since all  list  management
+            o   Walking  the  SCREEN list is unsafe, since all list management
                 is done without any signal blocking.
 
             o   On systems which have REENTRANT turned on, set_term uses func-
@@ -242,29 +267,29 @@
                 library functions which are clearly unsafe.
 
        SIGTERM
-            This  uses  the same handler as SIGINT, with the same limitations.
-            It is not mentioned in X/Open Curses, but  is  more  suitable  for
+            This uses the same handler as SIGINT, with the  same  limitations.
+            It  is  not  mentioned  in X/Open Curses, but is more suitable for
             this purpose than SIGQUIT (which is used in debugging).
 
        SIGTSTP
-            This  handles the stop signal, used in job control.  When resuming
-            the process,  this  implementation  discards  pending  input  with
-            flushinput  (see  curs_util(3x)), and repaints the screen assuming
-            that it has been completely altered.  It also  updates  the  saved
+            This handles the stop signal, used in job control.  When  resuming
+            the  process,  this  implementation  discards  pending  input with
+            flushinput (see curs_util(3x)), and repaints the  screen  assuming
+            that  it  has  been completely altered.  It also updates the saved
             terminal modes with def_shell_mode (see curs_kernel(3x)).
 
        SIGWINCH
-            This  handles  the  window-size  changes which were ignored in the
-            standardization efforts.  The handler sets a  (signal-safe)  vari-
-            able  which  is  later  tested in wgetch (see curs_getch(3x)).  If
-            keypad has been enabled for the corresponding window,  wgetch  re-
-            turns  the  key symbol KEY_RESIZE.  At the same time, wgetch calls
-            resizeterm to adjust the standard screen stdscr, and update  other
+            This handles the window-size changes which  were  ignored  in  the
+            standardization  efforts.   The handler sets a (signal-safe) vari-
+            able which is later tested in  wgetch  (see  curs_getch(3x)).   If
+            keypad  has  been enabled for the corresponding window, wgetch re-
+            turns the key symbol KEY_RESIZE.  At the same time,  wgetch  calls
+            resizeterm  to adjust the standard screen stdscr, and update other
             data such as LINES and COLS.
 
 
 

SEE ALSO

-       curses(3x),  curs_kernel(3x), curs_refresh(3x), curs_slk(3x), curs_ter-
+       curses(3x), curs_kernel(3x), curs_refresh(3x), curs_slk(3x),  curs_ter-
        minfo(3x), curs_util(3x), curs_variables(3x).
 
 
@@ -289,6 +314,7 @@
 
  • PORTABILITY diff --git a/doc/html/man/curs_terminfo.3x.html b/doc/html/man/curs_terminfo.3x.html index e39dcfb2..30284177 100644 --- a/doc/html/man/curs_terminfo.3x.html +++ b/doc/html/man/curs_terminfo.3x.html @@ -27,7 +27,7 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_terminfo.3x,v 1.85 2023/04/23 20:52:38 tom Exp @ + * @Id: curs_terminfo.3x,v 1.87 2023/06/10 15:51:45 tom Exp @ * *************************************************************************** * *************************************************************************** * *************************************************************************** @@ -173,29 +173,36 @@ environment variable TERM is used. filedes - is the file descriptor used for all output. + is the file descriptor used for getting and setting terminal + I/O modes. + + Higher-level applications use newterm(3x) for initializing the + terminal, passing an output stream rather than a descriptor. + In curses, the two are the same because newterm calls se- + tupterm, passing the file descriptor derived from its output + stream parameter. errret points to an optional location where an error status can be re- - turned to the caller. If errret is not null, then setupterm - returns OK or ERR and stores a status value in the integer - pointed to by errret. A return value of OK combined with sta- + turned to the caller. If errret is not null, then setupterm + returns OK or ERR and stores a status value in the integer + pointed to by errret. A return value of OK combined with sta- tus of 1 in errret is normal. If ERR is returned, examine errret: - 1 means that the terminal is hardcopy, cannot be used for + 1 means that the terminal is hardcopy, cannot be used for curses applications. - setupterm determines if the entry is a hardcopy type by + setupterm determines if the entry is a hardcopy type by checking the hc (hardcopy) capability. - 0 means that the terminal could not be found, or that it is - a generic type, having too little information for curses + 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. - setupterm determines if the entry is a generic type by - checking the gn (generic) capability. + setupterm determines if the entry is a generic type by + checking the gn (generic_type) capability. -1 means that the terminfo database could not be found. @@ -208,121 +215,124 @@
  • The Terminal State

    -       The  setupterm  routine  stores its information about the terminal in a
    -       TERMINAL structure pointed to by the global variable cur_term.   If  it
    -       detects  an error, or decides that the terminal is unsuitable (hardcopy
    -       or generic), it discards this information, making it not  available  to
    +       The setupterm routine stores its information about the  terminal  in  a
    +       TERMINAL  structure  pointed to by the global variable cur_term.  If it
    +       detects an error, or decides that the terminal is unsuitable  (hardcopy
    +       or  generic),  it discards this information, making it not available to
            applications.
     
    -       If  setupterm  is called repeatedly for the same terminal type, it will
    -       reuse the information.  It maintains only one copy of  a  given  termi-
    -       nal's  capabilities  in memory.  If it is called for different terminal
    -       types, setupterm allocates new storage for each set of  terminal  capa-
    +       If setupterm is called repeatedly for the same terminal type,  it  will
    +       reuse  the  information.   It maintains only one copy of a given termi-
    +       nal's capabilities in memory.  If it is called for  different  terminal
    +       types,  setupterm  allocates new storage for each set of terminal capa-
            bilities.
     
    -       The  set_curterm  routine  sets cur_term to nterm, and makes all of the
    -       terminfo boolean, numeric, and string variables  use  the  values  from
    +       The set_curterm routine sets cur_term to nterm, and makes  all  of  the
    +       terminfo  boolean,  numeric,  and  string variables use the values from
            nterm.  It returns the old value of cur_term.
     
    -       The  del_curterm  routine frees the space pointed to by oterm and makes
    +       The del_curterm routine frees the space pointed to by oterm  and  makes
            it available for further use.  If oterm is the same as cur_term, refer-
    -       ences  to  any  of  the terminfo boolean, numeric, and string variables
    -       thereafter may refer to invalid  memory  locations  until  another  se-
    +       ences to any of the terminfo boolean,  numeric,  and  string  variables
    +       thereafter  may  refer  to  invalid  memory locations until another se-
            tupterm has been called.
     
    -       The  restartterm  routine  is  similar to setupterm and initscr, except
    +       The restartterm routine is similar to  setupterm  and  initscr,  except
            that it is called after restoring memory to a previous state (for exam-
    -       ple,  when  reloading  a game saved as a core image dump).  restartterm
    -       assumes that the windows and the input and output options are the  same
    -       as  when  memory  was saved, but the terminal type and baud rate may be
    -       different.  Accordingly, restartterm  saves  various  tty  state  bits,
    +       ple, when reloading a game saved as a core  image  dump).   restartterm
    +       assumes  that the windows and the input and output options are the same
    +       as when memory was saved, but the terminal type and baud  rate  may  be
    +       different.   Accordingly,  restartterm  saves  various  tty state bits,
            calls setupterm, and then restores the bits.
     
     
     

    Formatting Output

    -       The  tparm  routine  instantiates the string str with parameters pi.  A
    -       pointer is returned to the result of str with the  parameters  applied.
    -       Application  developers  should keep in mind these quirks of the inter-
    +       The tparm routine instantiates the string str with  parameters  pi.   A
    +       pointer  is  returned to the result of str with the parameters applied.
    +       Application developers should keep in mind these quirks of  the  inter-
            face:
     
    -       o   Although tparm's actual parameters may be integers or strings,  the
    +       o   Although  tparm's actual parameters may be integers or strings, the
                prototype expects long (integer) values.
     
            o   Aside from the set_attributes (sgr) capability, most terminal capa-
                bilities require no more than one or two parameters.
     
    -       o   Padding information is ignored  by  tparm;  it  is  interpreted  by
    +       o   Padding  information  is  ignored  by  tparm;  it is interpreted by
                tputs.
     
    -       o   The  capability  string  is  null-terminated.   Use "\200" where an
    +       o   The capability string is  null-terminated.   Use  "\200"  where  an
                ASCII NUL is needed in the output.
     
    -       tiparm is a newer form of tparm which uses  <stdarg.h>  rather  than  a
    +       tiparm  is  a  newer  form of tparm which uses <stdarg.h> rather than a
            fixed-parameter list.  Its numeric parameters are integers (int) rather
            than longs.
     
    -       Both tparm and tiparm assume that  the  application  passes  parameters
    -       consistent  with the terminal description.  Two extensions are provided
    +       Both  tparm  and  tiparm  assume that the application passes parameters
    +       consistent with the terminal description.  Two extensions are  provided
            as alternatives to deal with untrusted data:
     
    -       o   tiparm_s is an extension which is a safer formatting function  than
    +       o   tiparm_s  is an extension which is a safer formatting function than
                tparm or tiparm, because it allows the developer to tell the curses
    -           library how many parameters to expect in the  parameter  list,  and
    +           library  how  many  parameters to expect in the parameter list, and
                which may be string parameters.
     
    -           The  mask  parameter has one bit set for each of the parameters (up
    +           The mask parameter has one bit set for each of the  parameters  (up
                to 9) which will be passed as char* rather than numbers.
     
    -       o   The extension tiscan_s allows the application to inspect a  format-
    +       o   The  extension tiscan_s allows the application to inspect a format-
                ting capability to see what the curses library would assume.
     
     
     

    Output Functions

    -       The  tputs  routine  applies padding information (i.e., by interpreting
    -       marker embedded in the terminfo capability such as  "$<5>"  as  5  mil-
    +       The tputs routine applies padding information  (i.e.,  by  interpreting
    +       marker  embedded  in  the  terminfo capability such as "$<5>" as 5 mil-
            liseconds) to the string str and outputs it:
     
    -       o   The  str parameter must be a terminfo string variable or the return
    +       o   The str parameter must be a terminfo string variable or the  return
                value from tparm, tiparm, tgetstr, or tgoto.
     
    -           The tgetstr and tgoto functions are part of the termcap  interface,
    -           which  happens to share this function name with the terminfo inter-
    +           The  tgetstr and tgoto functions are part of the termcap interface,
    +           which happens to share this function name with the terminfo  inter-
                face.
     
            o   affcnt is the number of lines affected, or 1 if not applicable.
     
    -       o   putc is a putchar-like routine to which the characters are  passed,
    +       o   putc  is a putchar-like routine to which the characters are passed,
                one at a time.
     
    -       The  putp routine calls tputs(str, 1, putchar).  The output of putp al-
    +       The putp routine calls tputs(str, 1, putchar).  The output of putp  al-
            ways goes to stdout, rather than the filedes specified in setupterm.
     
    -       The vidputs routine displays the string on the terminal  in  the  video
    +       The  vidputs  routine  displays the string on the terminal in the video
            attribute mode attrs, which is any combination of the attributes listed
    -       in curses(3x).  The characters are passed to the  putchar-like  routine
    +       in  curses(3x).   The characters are passed to the putchar-like routine
            putc.
     
            The vidattr routine is like the vidputs routine, except that it outputs
            through putchar.
     
    -       The vid_attr and vid_puts routines correspond to vidattr  and  vidputs,
    -       respectively.   They  use a set of arguments for representing the video
    +       The  vid_attr  and vid_puts routines correspond to vidattr and vidputs,
    +       respectively.  They use a set of arguments for representing  the  video
            attributes plus color, i.e.,
     
            o   attrs of type attr_t for the attributes and
     
            o   pair of type short for the color-pair number.
     
    -       The vid_attr and vid_puts routines are designed to  use  the  attribute
    +       The  vid_attr  and  vid_puts routines are designed to use the attribute
            constants with the WA_ prefix.
     
    -       X/Open  Curses  reserves  the opts argument for future use, saying that
    -       applications must provide a null pointer for that argument.  As an  ex-
    -       tension,  this  implementation  allows  opts to be used as a pointer to
    +       X/Open Curses reserves the opts argument for future  use,  saying  that
    +       applications  must provide a null pointer for that argument.  As an ex-
    +       tension, this implementation allows opts to be used  as  a  pointer  to
            int, which overrides the pair (short) argument.
     
    -       The mvcur routine provides low-level cursor motion.   It  takes  effect
    -       immediately (rather than at the next refresh).
    +       The  mvcur  routine  provides low-level cursor motion.  It takes effect
    +       immediately (rather than at the next refresh).  Unlike the  other  low-
    +       level  output  functions,  which either write to the standard output or
    +       pass an output function parameter, mvcur uses an output file descriptor
    +       derived from the output stream parameter of newterm(3x).
     
            While putp and mvcur are low-level functions which do not use the high-
            level curses state, they are declared in <curses.h> because SystemV did
    @@ -460,7 +470,6 @@
            mvcur       low level cursor motion
            putp        utility function that uses tputs to send  char-
                        acters via putchar.
    -
            resetterm   set tty modes to "out of curses" state
            resetty     reset tty flags to stored value
            saveterm    save current modes as "in curses" state
    @@ -637,6 +646,12 @@
            o   setupterm interprets a missing/empty TERM variable as  the  special
                value "unknown".
     
    +           SVr4 curses uses the special value "dumb".
    +
    +           The  difference  between  the  two  is  that the former uses the gn
    +           (generic_type) terminfo capability, while the latter does  not.   A
    +           generic terminal is unsuitable for full-screen applications.
    +
            o   setupterm  allows explicit use of the the windows console driver by
                checking if $TERM is set to "#win32con" or an abbreviation of  that
                string.
    diff --git a/doc/html/man/form.3x.html b/doc/html/man/form.3x.html
    index 0cd93968..e3e06b23 100644
    --- a/doc/html/man/form.3x.html
    +++ b/doc/html/man/form.3x.html
    @@ -248,7 +248,7 @@
            curses(3x) and related pages whose names  begin  "form_"  for  detailed
            descriptions of the entry points.
     
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     
    diff --git a/doc/html/man/infocmp.1m.html b/doc/html/man/infocmp.1m.html
    index b59abd93..e21bc779 100644
    --- a/doc/html/man/infocmp.1m.html
    +++ b/doc/html/man/infocmp.1m.html
    @@ -521,7 +521,7 @@
     
            https://invisible-island.net/ncurses/tctest.html
     
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/infotocap.1m.html b/doc/html/man/infotocap.1m.html
    index 32e9d432..b0962055 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 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/menu.3x.html b/doc/html/man/menu.3x.html
    index 38c6d3c7..91971f58 100644
    --- a/doc/html/man/menu.3x.html
    +++ b/doc/html/man/menu.3x.html
    @@ -223,7 +223,7 @@
            curses(3x) and related pages whose names  begin  "menu_"  for  detailed
            descriptions of the entry points.
     
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     
    diff --git a/doc/html/man/ncurses.3x.html b/doc/html/man/ncurses.3x.html
    index 15b1d8f2..e618afb9 100644
    --- a/doc/html/man/ncurses.3x.html
    +++ b/doc/html/man/ncurses.3x.html
    @@ -60,7 +60,7 @@
            method of updating  character  screens  with  reasonable  optimization.
            This  implementation  is  "new  curses"  (ncurses)  and is the approved
            replacement for 4.4BSD classic curses,  which  has  been  discontinued.
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
            The  ncurses  library emulates the curses library of System V Release 4
            UNIX, and XPG4 (X/Open Portability Guide) curses  (also  known  as  XSI
    diff --git a/doc/html/man/ncurses6-config.1.html b/doc/html/man/ncurses6-config.1.html
    index 8393f146..fe6105f3 100644
    --- a/doc/html/man/ncurses6-config.1.html
    +++ b/doc/html/man/ncurses6-config.1.html
    @@ -113,7 +113,7 @@
     

    SEE ALSO

            curses(3x)
     
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     
    diff --git a/doc/html/man/panel.3x.html b/doc/html/man/panel.3x.html
    index 25b330fb..251062a8 100644
    --- a/doc/html/man/panel.3x.html
    +++ b/doc/html/man/panel.3x.html
    @@ -281,7 +281,7 @@
     

    SEE ALSO

            curses(3x), curs_variables(3x),
     
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/tabs.1.html b/doc/html/man/tabs.1.html
    index 7573d4f0..eab40547 100644
    --- a/doc/html/man/tabs.1.html
    +++ b/doc/html/man/tabs.1.html
    @@ -252,7 +252,7 @@
     

    SEE ALSO

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

    Terminfo Entry Syntax

    diff --git a/doc/html/man/tic.1m.html b/doc/html/man/tic.1m.html
    index 9779a01a..88391055 100644
    --- a/doc/html/man/tic.1m.html
    +++ b/doc/html/man/tic.1m.html
    @@ -469,7 +469,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 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     

    AUTHOR

    diff --git a/doc/html/man/toe.1m.html b/doc/html/man/toe.1m.html
    index c51a0b84..a3828af6 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 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     
    diff --git a/doc/html/man/tput.1.html b/doc/html/man/tput.1.html
    index 604376cb..00ff9cfb 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 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     
    diff --git a/doc/html/man/tset.1.html b/doc/html/man/tset.1.html
    index f6b5eb20..510dce1b 100644
    --- a/doc/html/man/tset.1.html
    +++ b/doc/html/man/tset.1.html
    @@ -1,6 +1,6 @@
     
     
     
    @@ -86,37 +86,38 @@
            and systems using that convention, getty(1) does this  job  by  setting
            TERM according to the type passed to it by /etc/inittab.)
     
    -       4. The default terminal type, "unknown".
    +       4.  The  default  terminal  type, "unknown", is not suitable for curses
    +       applications.
     
    -       If  the  terminal  type  was  not specified on the command-line, the -m
    +       If the terminal type was not specified  on  the  command-line,  the  -m
            option mappings are then applied (see the section TERMINAL TYPE MAPPING
    -       for  more  information).   Then,  if  the  terminal  type begins with a
    -       question mark ("?"), the user  is  prompted  for  confirmation  of  the
    -       terminal  type.   An empty response confirms the type, or, another type
    -       can be entered to specify a new type.  Once the terminal type has  been
    +       for more information).  Then,  if  the  terminal  type  begins  with  a
    +       question  mark  ("?"),  the  user  is  prompted for confirmation of the
    +       terminal type.  An empty response confirms the type, or,  another  type
    +       can  be entered to specify a new type.  Once the terminal type has been
            determined, the terminal description for the terminal is retrieved.  If
            no terminal description is found for the type, the user is prompted for
            another terminal type.
     
            Once the terminal description is retrieved,
     
    -       o   if  the  "-w"  option  is  enabled,  tset may update the terminal's
    +       o   if the "-w" option is  enabled,  tset  may  update  the  terminal's
                window size.
     
    -           If the window size cannot be obtained from  the  operating  system,
    -           but  the  terminal  description  (or  environment,  e.g., LINES and
    -           COLUMNS variables specify this), use  this  to  set  the  operating
    +           If  the  window  size cannot be obtained from the operating system,
    +           but the terminal  description  (or  environment,  e.g.,  LINES  and
    +           COLUMNS  variables  specify  this),  use  this to set the operating
                system's notion of the window size.
     
    -       o   if  the  "-c"  option is enabled, the backspace, interrupt and line
    +       o   if the "-c" option is enabled, the backspace,  interrupt  and  line
                kill characters (among many other things) are set
     
    -       o   unless  the  "-I"  option  is  enabled,  the   terminal   and   tab
    -           initialization  strings  are sent to the standard error output, and
    +       o   unless   the   "-I"   option  is  enabled,  the  terminal  and  tab
    +           initialization strings are sent to the standard error  output,  and
                tset waits one second (in case a hardware reset was issued).
     
    -       o   Finally, if the erase, interrupt  and  line  kill  characters  have
    -           changed,  or  are not set to their default values, their values are
    +       o   Finally,  if  the  erase,  interrupt  and line kill characters have
    +           changed, or are not set to their default values, their  values  are
                displayed to the standard error output.
     
     
    @@ -132,10 +133,10 @@
            o   resets any unset special characters to their default values
     
            before doing the terminal initialization described above.  Also, rather
    -       than  using  the  terminal initialization strings, it uses the terminal
    +       than using the terminal initialization strings, it  uses  the  terminal
            reset strings.
     
    -       The reset command is useful after a program dies leaving a terminal  in
    +       The  reset command is useful after a program dies leaving a terminal in
            an abnormal state:
     
            o   you may have to type
    @@ -143,7 +144,7 @@
                    <LF>reset<LF>
     
                (the line-feed character is normally control-J) to get the terminal
    -           to work, as carriage-return may no  longer  work  in  the  abnormal
    +           to  work,  as  carriage-return  may  no longer work in the abnormal
                state.
     
            o   Also, the terminal will often not echo the command.
    @@ -157,7 +158,7 @@
            -e ch
                 Set the erase character to ch.
     
    -       -I   Do  not  send  the  terminal  or tab initialization strings to the
    +       -I   Do not send the terminal or  tab  initialization  strings  to  the
                 terminal.
     
            -i ch
    @@ -170,12 +171,12 @@
                 Specify a mapping from a port type to a terminal.  See the section
                 TERMINAL TYPE MAPPING for more information.
     
    -       -Q   Do  not  display any values for the erase, interrupt and line kill
    -            characters.   Normally  tset  displays  the  values  for   control
    +       -Q   Do not display any values for the erase, interrupt and  line  kill
    +            characters.    Normally  tset  displays  the  values  for  control
                 characters which differ from the system's default values.
     
    -       -q   The  terminal  type  is  displayed to the standard output, and the
    -            terminal is not initialized in any way.  The option "-" by  itself
    +       -q   The terminal type is displayed to the  standard  output,  and  the
    +            terminal  is not initialized in any way.  The option "-" by itself
                 is equivalent but archaic.
     
            -r   Print the terminal type to the standard error output.
    @@ -187,177 +188,177 @@
            -V   reports the version of ncurses which was used in this program, and
                 exits.
     
    -       -w   Resize the window to match the  size  deduced  via  setupterm(3x).
    -            Normally  this  has  no  effect,  unless  setupterm is not able to
    +       -w   Resize  the  window  to  match the size deduced via setupterm(3x).
    +            Normally this has no effect,  unless  setupterm  is  not  able  to
                 detect the window size.
     
    -       The arguments for the -e, -i, and -k options may either be  entered  as
    -       actual  characters  or by using the "hat" notation, i.e., control-h may
    +       The  arguments  for the -e, -i, and -k options may either be entered as
    +       actual characters or by using the "hat" notation, i.e.,  control-h  may
            be specified as "^H" or "^h".
     
            If neither -c or -w is given, both options are assumed.
     
     
     

    SETTING THE ENVIRONMENT

    -       It is often desirable to enter the terminal type and information  about
    +       It  is often desirable to enter the terminal type and information about
            the terminal's capabilities into the shell's environment.  This is done
            using the -s option.
     
    -       When the -s option is specified, the commands to enter the  information
    -       into  the  shell's  environment are written to the standard output.  If
    -       the SHELL environmental variable ends in "csh", the  commands  are  for
    -       csh,  otherwise,  they  are  for sh(1).  Note, the csh commands set and
    -       unset the shell variable noglob, leaving it unset.  The following  line
    -       in  the  .login  or  .profile  files  will  initialize  the environment
    +       When  the -s option is specified, the commands to enter the information
    +       into the shell's environment are written to the  standard  output.   If
    +       the  SHELL  environmental  variable ends in "csh", the commands are for
    +       csh, otherwise, they are for sh(1).  Note, the  csh  commands  set  and
    +       unset  the shell variable noglob, leaving it unset.  The following line
    +       in the  .login  or  .profile  files  will  initialize  the  environment
            correctly:
     
                eval `tset -s options ... `
     
     
     

    TERMINAL TYPE MAPPING

    -       When the terminal is not hardwired into  the  system  (or  the  current
    -       system  information  is  incorrect)  the terminal type derived from the
    -       /etc/ttys file or the TERM environmental variable  is  often  something
    -       generic  like  network,  dialup,  or  unknown.   When tset is used in a
    -       startup script it is often desirable to provide information  about  the
    +       When  the  terminal  is  not  hardwired into the system (or the current
    +       system information is incorrect) the terminal  type  derived  from  the
    +       /etc/ttys  file  or  the TERM environmental variable is often something
    +       generic like network, dialup, or unknown.   When  tset  is  used  in  a
    +       startup  script  it is often desirable to provide information about the
            type of terminal used on such ports.
     
    -       The  -m  options  maps  from some set of conditions to a terminal type,
    +       The -m options maps from some set of conditions  to  a  terminal  type,
            that is, to tell tset "If I'm on this port at a particular speed, guess
            that I'm on that kind of terminal".
     
    -       The  argument  to  the  -m option consists of an optional port type, an
    -       optional operator, an optional baud  rate  specification,  an  optional
    -       colon  (":")  character and a terminal type.  The port type is a string
    -       (delimited by  either  the  operator  or  the  colon  character).   The
    -       operator  may  be  any combination of ">", "<", "@", and "!"; ">" means
    -       greater than, "<" means less than, "@" means equal to and  "!"  inverts
    -       the  sense  of the test.  The baud rate is specified as a number and is
    -       compared with the speed of the standard error output (which  should  be
    +       The argument to the -m option consists of an  optional  port  type,  an
    +       optional  operator,  an  optional  baud rate specification, an optional
    +       colon (":") character and a terminal type.  The port type is  a  string
    +       (delimited  by  either  the  operator  or  the  colon  character).  The
    +       operator may be any combination of ">", "<", "@", and  "!";  ">"  means
    +       greater  than,  "<" means less than, "@" means equal to and "!" inverts
    +       the sense of the test.  The baud rate is specified as a number  and  is
    +       compared  with  the speed of the standard error output (which should be
            the control terminal).  The terminal type is a string.
     
    -       If  the  terminal  type  is  not  specified on the command line, the -m
    -       mappings are applied to the terminal type.  If the port type  and  baud
    -       rate  match  the  mapping,  the  terminal type specified in the mapping
    -       replaces the current type.  If more than one mapping is specified,  the
    +       If the terminal type is not specified  on  the  command  line,  the  -m
    +       mappings  are  applied to the terminal type.  If the port type and baud
    +       rate match the mapping, the terminal  type  specified  in  the  mapping
    +       replaces  the current type.  If more than one mapping is specified, the
            first applicable mapping is used.
     
    -       For  example,  consider  the following mapping: dialup>9600:vt100.  The
    +       For example, consider the following  mapping:  dialup>9600:vt100.   The
            port type is dialup , the operator is >, the baud rate specification is
            9600, and the terminal type is vt100.  The result of this mapping is to
    -       specify that if the terminal type is  dialup,  and  the  baud  rate  is
    +       specify  that  if  the  terminal  type  is dialup, and the baud rate is
            greater than 9600 baud, a terminal type of vt100 will be used.
     
    -       If  no  baud  rate  is specified, the terminal type will match any baud
    -       rate.  If no port type is specified, the terminal type will  match  any
    -       port  type.   For  example,  -m  dialup:vt100 -m :?xterm will cause any
    +       If no baud rate is specified, the terminal type  will  match  any  baud
    +       rate.   If  no port type is specified, the terminal type will match any
    +       port type.  For example, -m dialup:vt100  -m  :?xterm  will  cause  any
            dialup port, regardless of baud rate, to match the terminal type vt100,
    -       and  any non-dialup port type to match the terminal type ?xterm.  Note,
    -       because of the leading question mark, the user will  be  queried  on  a
    +       and any non-dialup port type to match the terminal type ?xterm.   Note,
    +       because  of  the  leading  question mark, the user will be queried on a
            default port as to whether they are actually using an xterm terminal.
     
    -       No  whitespace  characters  are  permitted  in  the -m option argument.
    -       Also, to avoid problems with meta-characters, it is suggested that  the
    +       No whitespace characters are  permitted  in  the  -m  option  argument.
    +       Also,  to avoid problems with meta-characters, it is suggested that the
            entire -m option argument be placed within single quote characters, and
    -       that  csh  users  insert  a  backslash  character  ("\")   before   any
    +       that   csh   users  insert  a  backslash  character  ("\")  before  any
            exclamation marks ("!").
     
     
     

    HISTORY

    -       A  reset command appeared in 1BSD (March 1978), written by Kurt Shoens.
    -       This program set the erase and kill characters to ^H (backspace) and  @
    +       A reset command appeared in 1BSD (March 1978), written by Kurt  Shoens.
    +       This  program set the erase and kill characters to ^H (backspace) and @
            respectively.  Mark Horton improved that in 3BSD (October 1979), adding
    -       intr, quit, start/stop and eof  characters  as  well  as  changing  the
    -       program  to  avoid  modifying any user settings.  That version of reset
    +       intr,  quit,  start/stop  and  eof  characters  as well as changing the
    +       program to avoid modifying any user settings.  That  version  of  reset
            did not use the termcap database.
     
    -       A separate tset command was provided in 1BSD by Eric Allman, using  the
    -       termcap  database.   Allman's comments in the source code indicate that
    +       A  separate tset command was provided in 1BSD by Eric Allman, using the
    +       termcap database.  Allman's comments in the source code  indicate  that
            he began work in October 1977, continuing development over the next few
            years.
     
            According to comments in the source code, the tset program was modified
    -       in September 1980, to use logic copied from the 3BSD  "reset"  when  it
    +       in  September  1980,  to use logic copied from the 3BSD "reset" when it
            was invoked as reset.  This version appeared in 4.1cBSD, late in 1982.
     
            Other developers (e.g., Keith Bostic and Jim Bloom) continued to modify
            tset until 4.4BSD was released in 1993.
     
    -       The ncurses implementation was lightly adapted from the 4.4BSD  sources
    +       The  ncurses implementation was lightly adapted from the 4.4BSD sources
            for a terminfo environment by Eric S. Raymond <esr@snark.thyrsus.com>.
     
     
     

    COMPATIBILITY

    -       Neither  IEEE  Std  1003.1/The  Open  Group Base Specifications Issue 7
    +       Neither IEEE Std 1003.1/The Open  Group  Base  Specifications  Issue  7
            (POSIX.1-2008) nor X/Open Curses Issue 7 documents tset or reset.
     
    -       The AT&T tput utility (AIX, HPUX, Solaris) incorporated  the  terminal-
    -       mode  manipulation  as well as termcap-based features such as resetting
    -       tabstops from tset in BSD (4.1c),  presumably  with  the  intention  of
    -       making  tset  obsolete.   However, each of those systems still provides
    -       tset.  In fact, the commonly-used reset utility is always an alias  for
    +       The  AT&T  tput utility (AIX, HPUX, Solaris) incorporated the terminal-
    +       mode manipulation as well as termcap-based features such  as  resetting
    +       tabstops  from  tset  in  BSD  (4.1c), presumably with the intention of
    +       making tset obsolete.  However, each of those  systems  still  provides
    +       tset.   In fact, the commonly-used reset utility is always an alias for
            tset.
     
    -       The   tset   utility   provides  for  backward-compatibility  with  BSD
    -       environments (under most modern UNIXes, /etc/inittab and  getty(1)  can
    -       set  TERM  appropriately  for each dial-up line; this obviates what was
    -       tset's most important use).  This implementation  behaves  like  4.4BSD
    +       The  tset  utility  provides  for   backward-compatibility   with   BSD
    +       environments  (under  most modern UNIXes, /etc/inittab and getty(1) can
    +       set TERM appropriately for each dial-up line; this  obviates  what  was
    +       tset's  most  important  use).  This implementation behaves like 4.4BSD
            tset, with a few exceptions specified here.
     
    -       A  few  options are different because the TERMCAP variable is no longer
    +       A few options are different because the TERMCAP variable is  no  longer
            supported under terminfo-based ncurses:
     
    -       o   The -S option of BSD tset no  longer  works;  it  prints  an  error
    +       o   The  -S  option  of  BSD  tset  no longer works; it prints an error
                message to the standard error and dies.
     
            o   The -s option only sets TERM, not TERMCAP.
     
    -       There  was an undocumented 4.4BSD feature that invoking tset via a link
    -       named "TSET" (or via  any  other  name  beginning  with  an  upper-case
    +       There was an undocumented 4.4BSD feature that invoking tset via a  link
    +       named  "TSET"  (or  via  any  other  name  beginning with an upper-case
            letter) set the terminal to use upper-case only.  This feature has been
            omitted.
     
            The -A, -E, -h, -u and -v options were deleted from the tset utility in
    -       4.4BSD.   None of them were documented in 4.3BSD and all are of limited
    -       utility at best.   The  -a,  -d,  and  -p  options  are  similarly  not
    -       documented  or  useful,  but  were  retained  as  they  appear to be in
    -       widespread use.  It is strongly recommended that  any  usage  of  these
    +       4.4BSD.  None of them were documented in 4.3BSD and all are of  limited
    +       utility  at  best.   The  -a,  -d,  and  -p  options  are similarly not
    +       documented or useful, but  were  retained  as  they  appear  to  be  in
    +       widespread  use.   It  is  strongly recommended that any usage of these
            three options be changed to use the -m option instead.  The -a, -d, and
            -p options are therefore omitted from the usage summary above.
     
    -       Very old systems, e.g., 3BSD, used a different  terminal  driver  which
    -       was  replaced  in  4BSD in the early 1980s.  To accommodate these older
    -       systems, the 4BSD tset provided a -n option to  specify  that  the  new
    -       terminal  driver  should be used.  This implementation does not provide
    +       Very  old  systems,  e.g., 3BSD, used a different terminal driver which
    +       was replaced in 4BSD in the early 1980s.  To  accommodate  these  older
    +       systems,  the  4BSD  tset  provided a -n option to specify that the new
    +       terminal driver should be used.  This implementation does  not  provide
            that choice.
     
    -       It is still permissible to specify the -e, -i, and -k  options  without
    +       It  is  still permissible to specify the -e, -i, and -k options without
            arguments, although it is strongly recommended that such usage be fixed
            to explicitly specify the character.
     
    -       As of 4.4BSD, executing tset as reset no longer implies the -Q  option.
    +       As  of 4.4BSD, executing tset as reset no longer implies the -Q option.
            Also, the interaction between the - option and the terminal argument in
            some historic implementations of tset has been removed.
     
    -       The -c and  -w  options  are  not  found  in  earlier  implementations.
    +       The  -c  and  -w  options  are  not  found  in earlier implementations.
            However, a different window size-change feature was provided in 4.4BSD.
     
    -       o   In  4.4BSD,  tset uses the window size from the termcap description
    -           to set the window size if tset is not able  to  obtain  the  window
    +       o   In 4.4BSD, tset uses the window size from the  termcap  description
    +           to  set  the  window  size if tset is not able to obtain the window
                size from the operating system.
     
            o   In ncurses, tset obtains the window size using setupterm, which may
    -           be from the operating system, the  LINES  and  COLUMNS  environment
    +           be  from  the  operating  system, the LINES and COLUMNS environment
                variables or the terminal description.
     
    -       Obtaining  the  window  size from the terminal description is common to
    -       both implementations, but considered obsolescent.  Its  only  practical
    +       Obtaining the window size from the terminal description  is  common  to
    +       both  implementations,  but considered obsolescent.  Its only practical
            use is for hardware terminals.  Generally speaking, a window size would
    -       be unset only if there were some problem obtaining the value  from  the
    -       operating  system  (and  setupterm would still fail).  For that reason,
    -       the LINES and COLUMNS environment variables may be useful  for  working
    -       around  window-size  problems.   Those  have  the  drawback that if the
    -       window is resized, those variables must be recomputed  and  reassigned.
    +       be  unset  only if there were some problem obtaining the value from the
    +       operating system (and setupterm would still fail).   For  that  reason,
    +       the  LINES  and COLUMNS environment variables may be useful for working
    +       around window-size problems.  Those  have  the  drawback  that  if  the
    +       window  is  resized, those variables must be recomputed and reassigned.
            To do this more easily, use the resize(1) program.
     
     
    @@ -365,22 +366,22 @@
            The tset command uses these environment variables:
     
            SHELL
    -            tells  tset  whether  to  initialize  TERM  using  sh(1) or csh(1)
    +            tells tset whether  to  initialize  TERM  using  sh(1)  or  csh(1)
                 syntax.
     
    -       TERM Denotes your terminal  type.   Each  terminal  type  is  distinct,
    +       TERM Denotes  your  terminal  type.   Each  terminal  type is distinct,
                 though many are similar.
     
            TERMCAP
    -            may  denote  the  location of a termcap database.  If it is not an
    -            absolute pathname, e.g., begins  with  a  "/",  tset  removes  the
    -            variable  from  the  environment  before  looking for the terminal
    +            may denote the location of a termcap database.  If it  is  not  an
    +            absolute  pathname,  e.g.,  begins  with  a  "/", tset removes the
    +            variable from the environment  before  looking  for  the  terminal
                 description.
     
     
     

    FILES

            /etc/ttys
    -            system port name to terminal type mapping database  (BSD  versions
    +            system  port  name to terminal type mapping database (BSD versions
                 only).
     
            /usr/share/terminfo
    @@ -388,10 +389,10 @@
     
     
     

    SEE ALSO

    -       csh(1),   sh(1),   stty(1),   curs_terminfo(3x),  tty(4),  terminfo(5),
    +       csh(1),  sh(1),  stty(1),   curs_terminfo(3x),   tty(4),   terminfo(5),
            ttys(5), environ(7)
     
    -       This describes ncurses version 6.4 (patch 20230423).
    +       This describes ncurses version 6.4 (patch 20230610).
     
     
     
    diff --git a/man/curs_initscr.3x b/man/curs_initscr.3x
    index 5e17ead0..3451991b 100644
    --- a/man/curs_initscr.3x
    +++ b/man/curs_initscr.3x
    @@ -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  *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: curs_initscr.3x,v 1.39 2022/07/24 15:46:49 tom Exp $
    +.\" $Id: curs_initscr.3x,v 1.40 2023/06/10 16:50:22 tom Exp $
     .TH curs_initscr 3X ""
     .de bP
     .ie n  .IP \(bu 4
    @@ -57,7 +57,7 @@
     .sp
     \fBbool isendwin(void);\fP
     .sp
    -\fBSCREEN *newterm(const char *\fItype\fB, FILE *\fIoutfd\fB, FILE *\fIinfd\fB);\fR
    +\fBSCREEN *newterm(const char *\fItype\fB, FILE *\fIoutf\fB, FILE *\fIinf\fB);\fR
     .br
     \fBSCREEN *set_term(SCREEN *\fInew\fB);\fR
     .br
    @@ -88,6 +88,7 @@ A program that needs to inspect capabilities,
     so it can continue to run in a line-oriented mode if the
     terminal cannot support a screen-oriented program, would also use
     \fBnewterm\fP.
    +.PP
     The routine \fBnewterm\fP should be called once for each terminal.
     It returns a variable of type \fBSCREEN *\fP which should be saved
     as a reference to that terminal.
    @@ -95,11 +96,15 @@ as a reference to that terminal.
     .bP
     the \fItype\fP of the terminal to be used in place of \fB$TERM\fP,
     .bP
    -a file pointer for output to the terminal, and
    +an output stream connected to the terminal, and
     .bP
    -another file pointer for input from the terminal
    +an input stream connected to the terminal
     .PP
     If the \fItype\fP parameter is \fBNULL\fP, \fB$TERM\fP will be used.
    +.PP
    +The file descriptor of the output stream is passed to \fBsetupterm\fP(3X),
    +which returns a pointer to a \fBTERMINAL\fP structure.
    +\fBnewterm\fP's return value holds a pointer to the \fBTERMINAL\fP structure.
     .SS endwin
     .PP
     The program must also call
    @@ -205,14 +210,34 @@ using that information to delete those windows when \fBdelscreen\fP is called.
     NetBSD copied this feature of ncurses in 2001.
     PDCurses follows the SVr4 model,
     deleting only the standard \fBWINDOW\fP structures.
    +.SS High-level versus low-level
    +Different implementations may disagree regarding the level of some functions.
    +For example, \fBSCREEN\fP (returned by \fBnewterm\fP) and
    +\fBTERMINAL\fP (returned by \fBsetupterm\fP(3X)) hold file descriptors for
    +the output stream.
    +If an application switches screens using \fBset_term\fR,
    +or switches terminals using \fBset_curterm\fP(3X),
    +applications which use the output file descriptor can have different
    +behavior depending on which structure holds the corresponding descriptor.
    +.PP
    +For example
    +.bP
    +NetBSD's \fBbaudrate\fP(3X) function uses the descriptor in \fBTERMINAL\fP.
    +\fBncurses\fP and SVr4 use the descriptor in \fBSCREEN\fP.
    +.bP
    +NetBSD and \fBncurses\fP use the descriptor in \fBTERMINAL\fP for terminal I/O modes,
    +e.g.,
    +\fBdef_shell_mode\fP(3X),
    +\fBdef_prog_mode\fP(3X).
    +SVr4 curses uses the descriptor in \fBSCREEN\fP.
     .SS Unset TERM Variable
     .PP
     If the TERM variable is missing or empty, \fBinitscr\fP uses the
     value \*(``unknown\*('',
     which normally corresponds to a terminal entry with the \fIgeneric\fP
     (\fIgn\fP) capability.
    -Generic entries are detected by \fBsetupterm\fP
    -(see curs_terminfo(3X)) and cannot be used for full-screen operation.
    +Generic entries are detected by \fBsetupterm\fP(3X)
    +and cannot be used for full-screen operation.
     Other implementations may handle a missing/empty TERM variable differently.
     .SS Signal Handlers
     .PP
    diff --git a/man/curs_terminfo.3x b/man/curs_terminfo.3x
    index 4e08bcbc..6b469b16 100644
    --- a/man/curs_terminfo.3x
    +++ b/man/curs_terminfo.3x
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: curs_terminfo.3x,v 1.85 2023/04/23 20:52:38 tom Exp $
    +.\" $Id: curs_terminfo.3x,v 1.87 2023/06/10 15:51:45 tom Exp $
     .TH curs_terminfo 3X ""
     .ie \n(.g .ds `` \(lq
     .el       .ds `` ``
    @@ -201,7 +201,12 @@ is the terminal type, a character string.
     If \fIterm\fP is null, the environment variable \fBTERM\fP is used.
     .TP 5
     \fIfiledes\fP
    -is the file descriptor used for all output.
    +is the file descriptor used for getting and setting terminal I/O modes.
    +.IP
    +Higher-level applications use \fBnewterm\fP(3X) for initializing the terminal,
    +passing an output \fIstream\fP rather than a \fIdescriptor\fP.
    +In curses, the two are the same because \fBnewterm\fP calls \fBsetupterm\fP,
    +passing the file descriptor derived from its output stream parameter.
     .TP 5
     \fIerrret\fP
     points to an optional location where an error status can be returned to
    @@ -228,7 +233,7 @@ or that it is a generic type,
     having too little information for curses applications to run.
     .IP
     \fBsetupterm\fP determines if the entry is a generic type by
    -checking the \fBgn\fP (\fBgeneric\fP) capability.
    +checking the \fBgn\fP (\fBgeneric_type\fP) capability.
     .TP 5
     .B \-1
     means that the \fBterminfo\fP database could not be found.
    @@ -374,6 +379,10 @@ which overrides the \fIpair\fP (\fBshort\fP) argument.
     .PP
     The \fBmvcur\fP routine provides low-level cursor motion.
     It takes effect immediately (rather than at the next refresh).
    +Unlike the other low-level output functions,
    +which either write to the standard output or pass an output function parameter,
    +\fBmvcur\fP uses an output file descriptor derived from
    +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,
    @@ -736,6 +745,14 @@ e.g., for the MinGW port,
     .bP
     \fBsetupterm\fP interprets a missing/empty TERM variable as the
     special value \*(``unknown\*(''.
    +.IP
    +SVr4 curses uses the 
    +special value \*(``dumb\*(''.
    +.IP
    +The difference between the two is that
    +the former uses the \fBgn\fP (\fBgeneric_type\fR) terminfo capability,
    +while the latter does not.
    +A generic terminal is unsuitable for full-screen applications.
     .bP
     \fBsetupterm\fP allows explicit use of the
     the windows console driver by checking if $TERM is set to
    diff --git a/man/manhtml.aliases b/man/manhtml.aliases
    index 1f85bc5c..4e890838 100644
    --- a/man/manhtml.aliases
    +++ b/man/manhtml.aliases
    @@ -1,6 +1,6 @@
    -# $Id: manhtml.aliases,v 1.21 2022/11/26 13:57:22 tom Exp $
    +# $Id: manhtml.aliases,v 1.22 2023/06/10 17:09:27 tom Exp $
     #***************************************************************************
    -# Copyright 2019-2020,2022 Thomas E. Dickey                                *
    +# Copyright 2019-2022,2023 Thomas E. Dickey                                *
     # Copyright 2013,2017 Free Software Foundation, Inc.                       *
     #                                                                          *
     # Permission is hereby granted, free of charge, to any person obtaining a  *
    @@ -30,8 +30,11 @@
     # Items in this list will be linked to the corresponding manpages by man2html
     addch(3X)		curs_addch(3X)
     assume_default_colors(3X)	default_colors(3X)
    +baudrate(3X)		curs_termattrs(3X)
     clearok(3X)		curs_outopts(3X)
     curs_set(3X)		curs_kernel(3X)
    +def_prog_mode(3X)	curs_kernel(3X)
    +def_shell_mode(3X)	curs_kernel(3X)
     delscreen(3X)		curs_initscr(3X)
     doupdate(3X)		curs_refresh(3X)
     endwin(3X)		curs_initscr(3X)
    @@ -53,6 +56,7 @@ newterm(3X)		curs_initscr(3X)
     refresh(3X)		curs_refresh(3X)
     reset_shell_mode(3X)	curs_kernel(3X)
     restartterm(3X)		curs_terminfo(3X)
    +set_curterm(3X)		curs_terminfo(3X)
     set_term(3X)		curs_initscr(3X)
     setcchar(3X)		curs_getcchar(3X)
     setupterm(3X)		curs_terminfo(3X)
    diff --git a/man/tset.1 b/man/tset.1
    index 860c0875..d4315444 100644
    --- a/man/tset.1
    +++ b/man/tset.1
    @@ -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  *
    @@ -27,7 +27,7 @@
     .\" authorization.                                                           *
     .\"***************************************************************************
     .\"
    -.\" $Id: tset.1,v 1.62 2022/02/12 20:02:20 tom Exp $
    +.\" $Id: tset.1,v 1.63 2023/06/10 15:46:24 tom Exp $
     .TH @TSET@ 1 ""
     .ie \n(.g .ds `` \(lq
     .el       .ds `` ``
    @@ -76,7 +76,8 @@ error output device in the \fI/etc/ttys\fP file.
     \fBgetty\fP(1) does this job by setting
     \fBTERM\fP according to the type passed to it by \fI/etc/inittab\fP.)
     .PP
    -4. The default terminal type, \*(``unknown\*(''.
    +4. The default terminal type, \*(``unknown\*('',
    +is not suitable for curses applications.
     .PP
     If the terminal type was not specified on the command-line, the \fB\-m\fP
     option mappings are then applied (see the section
    diff --git a/misc/terminfo.src b/misc/terminfo.src
    index 46070b61..c11f98f5 100644
    --- a/misc/terminfo.src
    +++ b/misc/terminfo.src
    @@ -6,8 +6,8 @@
     # Report bugs and new terminal descriptions to
     #	bug-ncurses@gnu.org
     #
    -#	$Revision: 1.1058 $
    -#	$Date: 2023/05/08 08:23:18 $
    +#	$Revision: 1.1059 $
    +#	$Date: 2023/06/05 21:40:20 $
     #
     # The original header is preserved below for reference.  It is noted that there
     # is a "newer" version which differs in some cosmetic details (but actually
    @@ -8009,7 +8009,7 @@ foot+base|foot base fragment,
     	use=ecma+strikeout, use=xterm+alt+title,
     	use=xterm+pcfkeys, use=xterm+sm+1006, use=xterm+tmux2,
     	use=xterm+sl-alt, use=bracketed+paste,
    -	use=report+version,
    +	use=report+version, use=xterm+focus,
     
     ######## WEB CLIENTS
     
    @@ -27813,4 +27813,7 @@ v3220|LANPAR Vision II model 3220/3221/3222,
     # 2023-05-08
     #	+ add mode 1004 to xterm+sm+1006 from xterm #380 -TD
     #
    +# 2023-06-05
    +#	+ add xterm+focus to foot+base (patch by Daniel Ekloef).
    +#
     ######## SHANTIH!  SHANTIH!  SHANTIH!
    diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h
    index e3151cc8..e7146ef7 100644
    --- a/ncurses/curses.priv.h
    +++ b/ncurses/curses.priv.h
    @@ -35,7 +35,7 @@
      ****************************************************************************/
     
     /*
    - * $Id: curses.priv.h,v 1.668 2023/06/03 12:33:07 tom Exp $
    + * $Id: curses.priv.h,v 1.669 2023/06/06 22:31:04 tom Exp $
      *
      *	curses.priv.h
      *
    @@ -1498,7 +1498,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
     #define isWidecExt(ch)	(0)
     #define if_WIDEC(code) /* nothing */
     
    -#define Charable(ch)	((ch) >= ' ' && (ch) <= '~')
    +#define Charable(ch)	(CharOf(ch) >= ' ' && CharOf(ch) <= '~')
     #define L(ch)		ch
     #endif /* } */
     
    diff --git a/ncurses/tinfo/lib_kernel.c b/ncurses/tinfo/lib_kernel.c
    index f7cbaba5..46f652b0 100644
    --- a/ncurses/tinfo/lib_kernel.c
    +++ b/ncurses/tinfo/lib_kernel.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright 2020,2022 Thomas E. Dickey                                     *
    + * Copyright 2020-2022,2023 Thomas E. Dickey                                *
      * Copyright 1998-2009,2010 Free Software Foundation, Inc.                  *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
    @@ -49,7 +49,7 @@
     
     #include 
     
    -MODULE_ID("$Id: lib_kernel.c,v 1.35 2022/07/28 20:14:51 tom Exp $")
    +MODULE_ID("$Id: lib_kernel.c,v 1.36 2023/06/10 13:29:06 tom Exp $")
     
     #ifdef TERMIOS
     static int
    @@ -148,34 +148,40 @@ killchar(void)
     }
     #endif
     
    +static void
    +flush_input(int fd)
    +{
    +#ifdef TERMIOS
    +    tcflush(fd, TCIFLUSH);
    +#else /* !TERMIOS */
    +    errno = 0;
    +    do {
    +#if defined(EXP_WIN32_DRIVER)
    +	_nc_console_flush(_nc_console_fd2handle(fd));
    +#else
    +	ioctl(fd, TIOCFLUSH, 0);
    +#endif
    +    } while
    +	(errno == EINTR);
    +#endif
    +}
    +
     /*
      *	flushinp()
      *
    - *	Flush any input on cur_term->Filedes
    - *
    + *	Flush any input on tty
      */
     
     NCURSES_EXPORT(int)
     NCURSES_SP_NAME(flushinp) (NCURSES_SP_DCL0)
     {
    -    TERMINAL *termp = TerminalOf(SP_PARM);
    -
         T((T_CALLED("flushinp(%p)"), (void *) SP_PARM));
     
    -    if (termp != 0) {
    -#ifdef TERMIOS
    -	tcflush(termp->Filedes, TCIFLUSH);
    -#else
    -	errno = 0;
    -	do {
    -#if defined(EXP_WIN32_DRIVER)
    -	    _nc_console_flush(_nc_console_fd2handle(termp->Filedes));
    -#else
    -	    ioctl(termp->Filedes, TIOCFLUSH, 0);
    -#endif
    -	} while
    -	    (errno == EINTR);
    -#endif
    +    if (SP_PARM != 0) {
    +	if (NC_ISATTY(SP_PARM->_ifd))
    +	    flush_input(SP_PARM->_ifd);
    +	else if (NC_ISATTY(SP_PARM->_ofd))
    +	    flush_input(SP_PARM->_ofd);
     	if (SP_PARM) {
     	    SP_PARM->_fifohead = -1;
     	    SP_PARM->_fifotail = 0;
    diff --git a/ncurses/tinfo/lib_print.c b/ncurses/tinfo/lib_print.c
    index aa65041c..e7d8535e 100644
    --- a/ncurses/tinfo/lib_print.c
    +++ b/ncurses/tinfo/lib_print.c
    @@ -1,5 +1,5 @@
     /****************************************************************************
    - * Copyright 2018-2020,2021 Thomas E. Dickey                                *
    + * Copyright 2018-2021,2023 Thomas E. Dickey                                *
      * Copyright 1998-2011,2012 Free Software Foundation, Inc.                  *
      *                                                                          *
      * Permission is hereby granted, free of charge, to any person obtaining a  *
    @@ -40,7 +40,7 @@
     #define CUR SP_TERMTYPE
     #endif
     
    -MODULE_ID("$Id: lib_print.c,v 1.30 2021/04/18 14:58:57 tom Exp $")
    +MODULE_ID("$Id: lib_print.c,v 1.31 2023/06/10 12:44:41 tom Exp $")
     
     NCURSES_EXPORT(int)
     NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
    @@ -90,7 +90,7 @@ NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
          * data has actually been shipped to the terminal.  If the write(2)
          * operation is truly atomic we're protected from this.
          */
    -    result = (int) write(TerminalOf(SP_PARM)->Filedes, mybuf, need);
    +    result = (int) write(SP_PARM->_ofd, mybuf, need);
     
         /*
          * By giving up our scheduler slot here we increase the odds that the
    diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog
    index 3c28287b..8dd20d7f 100644
    --- a/package/debian-mingw/changelog
    +++ b/package/debian-mingw/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.4+20230603) unstable; urgency=low
    +ncurses6 (6.4+20230610) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Sat, 03 Jun 2023 05:47:46 -0400
    + -- Thomas E. Dickey   Tue, 06 Jun 2023 18:27:59 -0400
     
     ncurses6 (5.9+20131005) unstable; urgency=low
     
    diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog
    index 3c28287b..8dd20d7f 100644
    --- a/package/debian-mingw64/changelog
    +++ b/package/debian-mingw64/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.4+20230603) unstable; urgency=low
    +ncurses6 (6.4+20230610) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Sat, 03 Jun 2023 05:47:46 -0400
    + -- Thomas E. Dickey   Tue, 06 Jun 2023 18:27:59 -0400
     
     ncurses6 (5.9+20131005) unstable; urgency=low
     
    diff --git a/package/debian/changelog b/package/debian/changelog
    index d40bb475..4fc57904 100644
    --- a/package/debian/changelog
    +++ b/package/debian/changelog
    @@ -1,8 +1,8 @@
    -ncurses6 (6.4+20230603) unstable; urgency=low
    +ncurses6 (6.4+20230610) unstable; urgency=low
     
       * latest weekly patch
     
    - -- Thomas E. Dickey   Sat, 03 Jun 2023 05:47:46 -0400
    + -- Thomas E. Dickey   Tue, 06 Jun 2023 18:27:59 -0400
     
     ncurses6 (5.9+20120608) unstable; urgency=low
     
    diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi
    index 90b73659..8768225a 100644
    --- a/package/mingw-ncurses.nsi
    +++ b/package/mingw-ncurses.nsi
    @@ -1,4 +1,4 @@
    -; $Id: mingw-ncurses.nsi,v 1.587 2023/06/03 09:47:46 tom Exp $
    +; $Id: mingw-ncurses.nsi,v 1.588 2023/06/06 22:27:59 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  "0603"
    +!define VERSION_MMDD  "0610"
     !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}
     
     !define MY_ABI   "5"
    diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec
    index 0010626a..0ec23819 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: 20230603
    +Release: 20230610
     License: X11
     Group: Development/Libraries
     URL: https://invisible-island.net/ncurses/
    diff --git a/package/ncurses.spec b/package/ncurses.spec
    index a36303ae..58ecf2c5 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: 20230603
    +Release: 20230610
     License: X11
     Group: Development/Libraries
     URL: https://invisible-island.net/ncurses/
    diff --git a/package/ncursest.spec b/package/ncursest.spec
    index 596dd1cf..a9d32ca7 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: 20230603
    +Release: 20230610
     License: X11
     Group: Development/Libraries
     Source: ncurses-%{version}-%{release}.tgz
    -- 
    2.45.0