# ncurses 6.5 - patch 20240922 - Thomas E. Dickey # # ------------------------------------------------------------------------------ # # Ncurses 6.5 is at # https://invisible-island.net/archives/ncurses/ # https://invisible-mirror.net/archives/ncurses/ # https://ftp.gnu.org/gnu/ncurses/ # # Patches for ncurses 6.5 can be found at # https://invisible-island.net/archives/ncurses/6.5 # https://invisible-mirror.net/archives/ncurses/6.5 # # ------------------------------------------------------------------------------ # https://invisible-island.net/archives/ncurses/6.5/ncurses-6.5-20240922.patch.gz # patch by Thomas E. Dickey # created Sun Sep 22 23:25:11 UTC 2024 # ------------------------------------------------------------------------------ # NEWS | 16 + # VERSION | 2 # dist.mk | 4 # doc/html/man/curs_addch.3x.html | 133 +++++------ # doc/html/man/curs_attr.3x.html | 14 - # doc/html/man/curs_bkgd.3x.html | 89 +++---- # doc/html/man/curs_bkgrnd.3x.html | 71 +++-- # doc/html/man/curs_delch.3x.html | 16 - # doc/html/man/curs_deleteln.3x.html | 31 +- # doc/html/man/curs_initscr.3x.html | 166 +++++++------ # doc/html/man/curs_inopts.3x.html | 10 # doc/html/man/curs_kernel.3x.html | 12 - # doc/html/man/curs_move.3x.html | 10 # doc/html/man/curs_scr_dump.3x.html | 25 +- # doc/html/man/curs_scroll.3x.html | 22 - # doc/html/man/curs_termcap.3x.html | 75 +++--- # doc/html/man/curs_util.3x.html | 12 - # doc/html/man/curs_variables.3x.html | 10 # doc/html/man/infocmp.1m.html | 57 ++-- # doc/html/man/ncurses.3x.html | 36 +-- # doc/html/man/tabs.1.html | 20 - # doc/html/man/terminfo.5.html | 4 # doc/html/man/wresize.3x.html | 33 +- # man/curs_addch.3x | 9 # man/curs_attr.3x | 6 # man/curs_bkgd.3x | 53 ++-- # man/curs_bkgrnd.3x | 50 ++-- # man/curs_delch.3x | 6 # man/curs_deleteln.3x | 15 - # man/curs_initscr.3x | 406 +++++++++++++++++++++++----------- # man/curs_inopts.3x | 6 # man/curs_kernel.3x | 8 # man/curs_move.3x | 10 # man/curs_scr_dump.3x | 22 + # man/curs_scroll.3x | 8 # man/curs_termcap.3x | 15 - # man/curs_util.3x | 6 # man/curs_variables.3x | 6 # man/infocmp.1m | 89 ++++--- # man/ncurses.3x | 20 - # man/tabs.1 | 21 - # man/terminfo.tail | 6 # man/wresize.3x | 11 # misc/ncurses-config.in | 25 -- # ncurses/base/MKlib_gen.sh | 50 +++- # ncurses/base/lib_refresh.c | 8 # ncurses/base/lib_screen.c | 31 +- # ncurses/base/resizeterm.c | 15 - # ncurses/tinfo/access.c | 39 +++ # ncurses/wcwidth.h | 3 # 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/back_ground.c | 26 +- # test/background.c | 38 ++- # 59 files changed, 1126 insertions(+), 772 deletions(-) # ------------------------------------------------------------------------------ Index: NEWS Prereq: 1.4175 --- ncurses-6.5-20240914+/NEWS 2024-09-14 23:14:09.000000000 +0000 +++ ncurses-6.5-20240922/NEWS 2024-09-22 20:50:07.000000000 +0000 @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.4175 2024/09/14 23:14:09 tom Exp $ +-- $Id: NEWS,v 1.4182 2024/09/22 20:50:07 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,20 @@ Changes through 1.9.9e did not credit all contributions; it is not possible to add this information. +20240922 + + add a few null-pointer checks in ncurses + + improve test-driver in ncurses/link_test.c + + restore background character in manpages as described in X/Open + Curses section 3.3.6, and add option "-c" to test programs to + illustrate a non-blank character in the window background property. + + improve formatting/style of manpages (patches by Branden Robinson). + + modify ncurses*-config to add -I option in --cflag where needed for + --disable-overwrite to match ".pc" files. + + disallow directories and block/character devices in safe-open. + + amend scr_restore() and scr_init() to remove the target window only + after validating the source window which will replace the target + (report by Zixi Liu). + 20240914 + modify _nc_flush() to also flush stderr to help the flash capability to work in bash (patch by Harm te Hennepe, cf: 20201128) Index: VERSION --- ncurses-6.5-20240914+/VERSION 2024-09-14 12:14:00.000000000 +0000 +++ ncurses-6.5-20240922/VERSION 2024-09-22 18:38:38.000000000 +0000 @@ -1 +1 @@ -5:0:10 6.5 20240914 +5:0:10 6.5 20240922 Index: dist.mk Prereq: 1.1631 --- ncurses-6.5-20240914+/dist.mk 2024-09-14 12:14:00.000000000 +0000 +++ ncurses-6.5-20240922/dist.mk 2024-09-22 18:38:38.000000000 +0000 @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1631 2024/09/14 12:14:00 tom Exp $ +# $Id: dist.mk,v 1.1633 2024/09/22 18:38:38 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -38,7 +38,7 @@ # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 5 -NCURSES_PATCH = 20240914 +NCURSES_PATCH = 20240922 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) Index: doc/html/man/curs_addch.3x.html --- ncurses-6.5-20240914+/doc/html/man/curs_addch.3x.html 2024-07-27 23:11:31.000000000 +0000 +++ ncurses-6.5-20240922/doc/html/man/curs_addch.3x.html 2024-09-21 18:35:26.000000000 +0000 @@ -28,19 +28,19 @@ * sale, use or other dealings in this Software without prior written * * authorization. * **************************************************************************** - * @Id: curs_addch.3x,v 1.98 2024/07/27 20:08:58 tom Exp @ + * @Id: curs_addch.3x,v 1.100 2024/09/21 18:03:23 tom Exp @ --> -curs_addch 3x 2024-07-27 ncurses 6.5 Library calls +curs_addch 3x 2024-09-21 ncurses 6.5 Library calls -

curs_addch 3x 2024-07-27 ncurses 6.5 Library calls

+

curs_addch 3x 2024-09-21 ncurses 6.5 Library calls

 curs_addch(3x)                   Library calls                  curs_addch(3x)
 
@@ -110,22 +110,23 @@
 
 

wechochar

        echochar and wechochar are equivalent to calling (w)addch  followed  by
-       (w)refresh.   curses  interprets  these functions as a hint that only a
-       single  character  is  being  output;  for  non-control  characters,  a
-       considerable performance gain may be enjoyed by employing them.
+       (w)refresh.   curses  interprets  these  functions  as  a  hint  to its
+       optimizer that only a single character cell  in  the  window  is  being
+       altered  between  refreshes; for non-control characters, a considerable
+       performance gain may be enjoyed by employing them.
 
 
 

Forms-Drawing Characters

-       curses  defines  macros starting with ACS_ that can be used with waddch
-       to write line-drawing and  other  special  characters  to  the  screen.
-       ncurses  terms  these forms-drawing characters.  The ACS default listed
-       below is used if the acs_chars  (acsc)  terminfo  capability  does  not
-       define  a  terminal-specific replacement for it, or if the terminal and
-       locale configuration requires Unicode to access  these  characters  but
+       curses defines macros starting with ACS_ that can be used  with  waddch
+       to  write  line-drawing  and  other  special  characters to the screen.
+       ncurses terms these forms-drawing characters.  The ACS  default  listed
+       below  is  used  if  the  acs_chars (acsc) terminfo capability does not
+       define a terminal-specific replacement for it, or if the  terminal  and
+       locale  configuration  requires  Unicode to access these characters but
        the  library  is  unable  to  use  Unicode.   The  "acsc  char"  column
        corresponds to how the characters are specified in the acs_chars (acsc)
        string capability, and the characters in it may appear on the screen if
-       the terminal type's database entry incorrectly advertises ACS  support.
+       the  terminal type's database entry incorrectly advertises ACS support.
        The name "ACS" originates in the Alternate Character Set feature of the
        DEC VT100 terminal.
 
@@ -173,24 +174,24 @@
 
        o   win is NULL,
 
-       o   wrapping to a new line is impossible because scrollok(3x)  has  not
-           been  called  on  win  when a write to its bottom right location is
+       o   wrapping  to  a new line is impossible because scrollok(3x) has not
+           been called on win when a write to its  bottom  right  location  is
            attempted, or
 
-       o   it is not possible to  add  a  complete  character  at  the  cursor
+       o   it  is  not  possible  to  add  a  complete character at the cursor
            position.
 
        The last may be due to different causes:
 
-       o   conversion  of  a  wide character to a multibyte character sequence
+       o   conversion of a wide character to a  multibyte  character  sequence
            can fail, or
 
-       o   at least one of the bytes resulting from wide character  conversion
-           to  a  multibyte  character sequence cannot be added to the window.
-           See section "PORTABILITY" below regarding the use  of  waddch  with
+       o   at  least one of the bytes resulting from wide character conversion
+           to a multibyte character sequence cannot be added  to  the  window.
+           See  section  "PORTABILITY"  below regarding the use of waddch with
            wide characters.
 
-       Functions  prefixed with "mv" first perform cursor movement and fail if
+       Functions prefixed with "mv" first perform cursor movement and fail  if
        the position (y, x) is outside the window boundaries.
 
 
@@ -201,7 +202,7 @@
 

EXTENSIONS

 
 

TABSIZE

-       SVr4 and other versions of curses implement the TABSIZE  variable,  but
+       SVr4  and  other versions of curses implement the TABSIZE variable, but
        X/Open Curses does not specify it; see curs_variables(3x).
 
 
@@ -209,90 +210,90 @@
        Applications employing ncurses extensions should condition their use on
        the visibility of the NCURSES_VERSION preprocessor macro.
 
-       X/Open Curses, Issue 4 describes  these  functions.   It  specifies  no
+       X/Open  Curses,  Issue  4  describes  these functions.  It specifies no
        error conditions for them.
 
-       SVr4  curses  describes  a  successful return value only as "an integer
+       SVr4 curses describes a successful return value  only  as  "an  integer
        value other than ERR".
 
-       The defaults specified for forms-drawing characters apply in the  POSIX
+       The  defaults specified for forms-drawing characters apply in the POSIX
        locale.
 
 
 

ACS Symbols

-       X/Open  Curses  states  that  the  ACS_ definitions are char constants.
+       X/Open Curses states that the  ACS_  definitions  are  char  constants.
        Some implementations are problematic.
 
-       o   Solaris curses, for example, defines the ACS symbols as  constants;
+       o   Solaris  curses, for example, defines the ACS symbols as constants;
            others define them as elements of an array.
 
-           This  implementation  uses  an  array, acs_map, as did SVr4 curses.
+           This implementation uses an array, acs_map,  as  did  SVr4  curses.
            NetBSD also uses an array, actually named _acs_char, with a #define
            for compatibility.
 
-       o   HP-UX  curses  equates  some  of  the ACS_ symbols to the analogous
-           WACS_ symbols as if the ACS_  symbols  were  wide  characters  (see
-           curs_add_wch(3x)).   The  misdefined  symbols  are  the  arrows and
+       o   HP-UX curses equates some of the  ACS_  symbols  to  the  analogous
+           WACS_  symbols  as  if  the  ACS_ symbols were wide characters (see
+           curs_add_wch(3x)).  The  misdefined  symbols  are  the  arrows  and
            others that are not used for line drawing.
 
-       o   X/Open Curses (Issues 2 through 7) has a  typographical  error  for
-           the  ACS_LANTERN  symbol,  equating  its  "VT100+ Character" to "I"
-           (capital I), while the header  files  for  SVr4  curses  and  other
+       o   X/Open  Curses  (Issues  2 through 7) has a typographical error for
+           the ACS_LANTERN symbol, equating  its  "VT100+  Character"  to  "I"
+           (capital  I),  while  the  header  files  for SVr4 curses and other
            implementations use "i" (small i).
 
-           None  of  the terminal descriptions on Unix platforms use uppercase
-           I, except  for  Solaris  (in  its  terminfo  entry  for  screen(1),
-           apparently  based on the X/Open documentation around 1995).  On the
-           other hand, its gs6300 (AT&T PC6300 with EMOTS  Terminal  Emulator)
+           None of the terminal descriptions on Unix platforms  use  uppercase
+           I,  except  for  Solaris  (in  its  terminfo  entry  for screen(1),
+           apparently based on the X/Open documentation around 1995).  On  the
+           other  hand,  its gs6300 (AT&T PC6300 with EMOTS Terminal Emulator)
            description uses lowercase i.
 
-       Some  ACS  symbols  (ACS_S3,  ACS_S7,  ACS_LEQUAL,  ACS_GEQUAL, ACS_PI,
-       ACS_NEQUAL, and ACS_STERLING)  were  not  documented  in  any  publicly
-       released  System V.   However, many publicly available terminfo entries
-       include acsc capabilities in which their key characters  (pryz{|})  are
-       embedded,  and  a  second-hand list of their character descriptions has
-       come to light.  The ncurses developers invented ACS-prefixed names  for
+       Some ACS  symbols  (ACS_S3,  ACS_S7,  ACS_LEQUAL,  ACS_GEQUAL,  ACS_PI,
+       ACS_NEQUAL,  and  ACS_STERLING)  were  not  documented  in any publicly
+       released System V.  However, many publicly available  terminfo  entries
+       include  acsc  capabilities in which their key characters (pryz{|}) are
+       embedded, and a second-hand list of their  character  descriptions  has
+       come  to light.  The ncurses developers invented ACS-prefixed names for
        them.
 
        The displayed values of ACS_ constants depend on
 
        o   the  ncurses  ABI--for  example,  wide-character  versus  non-wide-
-           character configurations  (the  former  is  capable  of  displaying
+           character  configurations  (the  former  is  capable  of displaying
            Unicode while the latter is not), and
 
        o   whether the locale uses UTF-8 encoding.
 
-       In  certain  cases,  the  terminal  is  unable to display forms-drawing
-       characters  except  by  using  UTF-8;  see  the   discussion   of   the
+       In certain cases, the  terminal  is  unable  to  display  forms-drawing
+       characters   except   by   using  UTF-8;  see  the  discussion  of  the
        NCURSES_NO_UTF8_ACS environment variable in ncurses(3x).
 
 
 

Character Set

-       X/Open  Curses  assumes  that the parameter passed to waddch contains a
-       single character.  That character may have been more  than  eight  bits
-       wide  in  an  SVr3 or SVr4 implementation, but X/Open Curses leaves the
-       width of a non-wide character code unspecified.  The  standard  further
-       does  not specify the internal structure of a chtype, though the use of
-       bit operations to combine the character  code  with  attributes  and  a
+       X/Open Curses assumes that the parameter passed to  waddch  contains  a
+       single  character.   That  character may have been more than eight bits
+       wide in an SVr3 or SVr4 implementation, but X/Open  Curses  leaves  the
+       width  of  a non-wide character code unspecified.  The standard further
+       does not specify the internal structure of a chtype, though the use  of
+       bit  operations  to  combine  the  character code with attributes and a
        color pair identifier into a chtype for passage to waddch is common.  A
        portable application uses only the macros discussed in curs_attr(3x) to
        manipulate a chtype.
 
        In ncurses, chtype holds an eight-bit character, but the library allows
-       a multibyte character sequence to be passed via a succession  of  calls
-       to  waddch.   Other  implementations  do  not;  a waddch call transmits
-       exactly one character, which may be rendered  in  one  or  more  screen
-       locations  depending  on  whether  it  is  printable  (see unctrl(3x)).
-       Depending on the locale, ncurses  inspects  the  byte  passed  in  each
-       waddch  call  and  checks whether the latest call continues a multibyte
-       character.   When  a  character  is  complete,  ncurses  displays   the
-       character   and  advances  the  cursor.   If  the  calling  application
+       a  multibyte  character sequence to be passed via a succession of calls
+       to waddch.  Other implementations  do  not;  a  waddch  call  transmits
+       exactly  one  character,  which  may  be rendered in one or more screen
+       locations depending  on  whether  it  is  printable  (see  unctrl(3x)).
+       Depending  on  the  locale,  ncurses  inspects  the byte passed in each
+       waddch call and checks whether the latest call  continues  a  multibyte
+       character.    When  a  character  is  complete,  ncurses  displays  the
+       character  and  advances  the  cursor.   If  the  calling   application
        interrupts the succession of bytes in a multibyte character sequence by
-       changing  the  current  location--for  example, with wmove(3x)--ncurses
+       changing the current  location--for  example,  with  wmove(3x)--ncurses
        discards the incomplete character.
 
        For  portability  to  other  implementations,  do  not  rely  upon  the
-       foregoing  behavior.  Check whether a character can be represented as a
+       foregoing behavior.  Check whether a character can be represented as  a
        single byte in the current locale.
 
        o   If it can, call either waddch or wadd_wch.
@@ -307,16 +308,16 @@
 
 
 

SEE ALSO

-       curs_add_wch(3x) describes comparable functions of the ncurses  library
+       curs_add_wch(3x)  describes comparable functions of the ncurses library
        in its wide-character configuration (ncursesw).
 
        curses(3x),    curs_addchstr(3x),    curs_addstr(3x),    curs_attr(3x),
-       curs_clear(3x),  curs_inch(3x),   curs_outopts(3x),   curs_refresh(3x),
+       curs_clear(3x),   curs_inch(3x),   curs_outopts(3x),  curs_refresh(3x),
        curs_variables(3x), putchar(3)
 
 
 
-ncurses 6.5                       2024-07-27                    curs_addch(3x)
+ncurses 6.5                       2024-09-21                    curs_addch(3x)