From d61c3c6a831d18ef0ed6f797ac97d60fffc2f158 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 12 Jul 2020 00:25:08 +0000 Subject: [PATCH 1/1] ncurses 6.2 - patch 20200711 + fix pound-sign mapping in acsc of linux2.6 entry (report by Ingo Bruckl). + additional changes for building with Visual Studio C++ and msys2 (reports/patches by "Maarten Anonymous") + build-improvements for Windows 10 and MinGW (patch by Juergen Pfeifer). + fix a typo in curs_printw.3x (patch by William Pursell). + fix two errors in infotocap which allowed indexing outside the buffer (report/testcases by Zhang Gan). + update length of strings in infocmp's usage function to restore a trailing null on the longest string (report/testcase by Zhang Gen). --- Ada95/aclocal.m4 | 6 +-- Ada95/configure | 2 +- NEWS | 15 +++++- README.MinGW | 16 +++---- VERSION | 2 +- aclocal.m4 | 10 ++-- configure | 81 ++++++++++++++++++-------------- configure.in | 15 +++++- dist.mk | 4 +- include/nc_mingw.h | 21 +++++++-- man/curs_printw.3x | 4 +- misc/terminfo.src | 12 +++-- ncurses/curses.priv.h | 4 +- ncurses/tinfo/access.c | 12 +++-- ncurses/tinfo/captoinfo.c | 4 +- ncurses/wcwidth.h | 8 ++-- ncurses/widechar/lib_cchar.c | 3 +- ncurses/widechar/widechars.c | 4 +- ncurses/win32con/gettimeofday.c | 8 +--- ncurses/win32con/wcwidth.c | 10 ++-- 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 +- progs/dump_entry.c | 4 +- progs/infocmp.c | 9 ++-- test/picsmap.c | 18 ++++++- test/test.priv.h | 9 +++- 31 files changed, 190 insertions(+), 113 deletions(-) diff --git a/Ada95/aclocal.m4 b/Ada95/aclocal.m4 index 2857a780..a8db3ae4 100644 --- a/Ada95/aclocal.m4 +++ b/Ada95/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey dnl -dnl $Id: aclocal.m4,v 1.158 2020/07/04 23:32:09 tom Exp $ +dnl $Id: aclocal.m4,v 1.159 2020/07/11 23:11:37 tom Exp $ dnl Macros used in NCURSES Ada95 auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -3539,7 +3539,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 96 updated: 2020/05/23 19:39:36 +dnl CF_SHARED_OPTS version: 97 updated: 2020/07/11 19:09:29 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -3801,7 +3801,7 @@ CF_EOF # Ignore first argument (compiler) and use LD (link.exe) unconditionally LD="[$]LD" clopts=() - ldopts=() + ldopts=("/subsystem:console") libs=() isdll=0 while test \[$]# -gt 0; do diff --git a/Ada95/configure b/Ada95/configure index 31055527..2c4a8ae9 100755 --- a/Ada95/configure +++ b/Ada95/configure @@ -11344,7 +11344,7 @@ CF_EOF # Ignore first argument (compiler) and use LD (link.exe) unconditionally LD="$LD" clopts=() - ldopts=() + ldopts=("/subsystem:console") libs=() isdll=0 while test \$# -gt 0; do diff --git a/NEWS b/NEWS index fb669838..13eb7aa4 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.3514 2020/07/04 23:28:53 tom Exp $ +-- $Id: NEWS,v 1.3519 2020/07/11 23:21:07 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,19 @@ 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. +20200711 + + fix pound-sign mapping in acsc of linux2.6 entry (report by Ingo + Bruckl). + + additional changes for building with Visual Studio C++ and msys2 + (reports/patches by "Maarten Anonymous") + + build-improvements for Windows 10 and MinGW (patch by Juergen + Pfeifer). + + fix a typo in curs_printw.3x (patch by William Pursell). + + fix two errors in infotocap which allowed indexing outside the + buffer (report/testcases by Zhang Gan). + + update length of strings in infocmp's usage function to restore a + trailing null on the longest string (report/testcase by Zhang Gen). + 20200704 + modify version-check with Ada generics to use the same pattern as in the check for supported gnat versions (report by Pascal Pignard). diff --git a/README.MinGW b/README.MinGW index 56a2bca2..f23ef126 100644 --- a/README.MinGW +++ b/README.MinGW @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: README.MinGW,v 1.10 2020/02/02 23:34:34 tom Exp $ +-- $Id: README.MinGW,v 1.11 2020/07/11 13:31:30 juergen Exp $ -- Author: Juergen Pfeifer ------------------------------------------------------------------------------- @@ -113,12 +113,6 @@ export PATH_SEPARATOR=";" in order to parse the terminfo paths correctly. Terminfo paths should always be separated by a seeeemicolon,even when running under MSYS. -To support regular expressions properly, ncurses under MinGW should be -linked against the gnurx regex library, which must be built separately -under MinGW. See - - ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/libgnurx-src-2.5.zip - All the options above are - like the whole Windows support - experimental. @@ -135,5 +129,9 @@ A lot is still TODO, e.g.: - Workarounds for MinGW's filesystem access are necessary to make infocmp work (though tic works). -To support terminfo, we would need to have an ioctl() simulation for the -serial and networked terminals. +Recent Windows 10 releases have a new Console implementation that supports +ANSI-style terminal emulation. Also, there is a new "Windows Terminal" App +from Microsoft that hosts the new Console in a tabbed user interface. With +this, it is possble to try using terminfo, the TERM environment varianle +should be set to ms-terminal. + diff --git a/VERSION b/VERSION index b2cb5b29..ad06e270 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20200704 +5:0:10 6.2 20200711 diff --git a/aclocal.m4 b/aclocal.m4 index 269b4791..824b4e6b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.916 2020/07/04 23:31:15 tom Exp $ +dnl $Id: aclocal.m4,v 1.920 2020/07/11 23:10:46 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -6377,7 +6377,7 @@ AC_MSG_RESULT($cf_prog_ln_sf) test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f" ])dnl dnl --------------------------------------------------------------------------- -dnl CF_REGEX version: 13 updated: 2020/03/10 18:53:47 +dnl CF_REGEX version: 14 updated: 2020/07/11 19:09:29 dnl -------- dnl Attempt to determine if we've got one of the flavors of regular-expression dnl code that we can support. @@ -6389,7 +6389,7 @@ cf_regex_func=no cf_regex_libs="regex re" case $host_os in (mingw*) - cf_regex_libs="gnurx $cf_regex_libs" + cf_regex_libs="systre gnurx $cf_regex_libs" ;; esac @@ -6644,7 +6644,7 @@ do done ])dnl dnl --------------------------------------------------------------------------- -dnl CF_SHARED_OPTS version: 96 updated: 2020/05/23 19:39:36 +dnl CF_SHARED_OPTS version: 97 updated: 2020/07/11 19:09:29 dnl -------------- dnl -------------- dnl Attempt to determine the appropriate CC/LD options for creating a shared @@ -6906,7 +6906,7 @@ CF_EOF # Ignore first argument (compiler) and use LD (link.exe) unconditionally LD="[$]LD" clopts=() - ldopts=() + ldopts=("/subsystem:console") libs=() isdll=0 while test \[$]# -gt 0; do diff --git a/configure b/configure index 26b29bd1..c3ef81b3 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.709 . +# From configure.in Revision: 1.711 . # Guess values for system-dependent variables and create Makefiles. # Generated by Autoconf 2.52.20200111. # @@ -6022,7 +6022,7 @@ CF_EOF # Ignore first argument (compiler) and use LD (link.exe) unconditionally LD="$LD" clopts=() - ldopts=() + ldopts=("/subsystem:console") libs=() isdll=0 while test \$# -gt 0; do @@ -18190,7 +18190,7 @@ cf_regex_func=no cf_regex_libs="regex re" case $host_os in (mingw*) - cf_regex_libs="gnurx $cf_regex_libs" + cf_regex_libs="systre gnurx $cf_regex_libs" ;; esac @@ -26155,6 +26155,17 @@ fi fi WITH_OVERWRITE=$with_overwrite +### At least on MinGW a shared library build without libtool +### requires adding the additional libs to the link list. +case $cf_cv_system_name in +(*mingw32*|*mingw64*) + if test "$DFT_LWR_MODEL" != "libtool"; then + SHLIB_LIST="$SHLIB_LIST ${LIBS}" + fi + ;; +*) ;; +esac + # used to separate tack out of the tree NCURSES_TREE= @@ -26166,7 +26177,7 @@ EOF # pkgsrc uses these -echo "$as_me:26169: checking for desired basename for form library" >&5 +echo "$as_me:26180: checking for desired basename for form library" >&5 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6 # Check whether --with-form-libname or --without-form-libname was given. @@ -26186,10 +26197,10 @@ case "x$FORM_NAME" in ;; esac -echo "$as_me:26189: result: $FORM_NAME" >&5 +echo "$as_me:26200: result: $FORM_NAME" >&5 echo "${ECHO_T}$FORM_NAME" >&6 -echo "$as_me:26192: checking for desired basename for menu library" >&5 +echo "$as_me:26203: checking for desired basename for menu library" >&5 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6 # Check whether --with-menu-libname or --without-menu-libname was given. @@ -26209,10 +26220,10 @@ case "x$MENU_NAME" in ;; esac -echo "$as_me:26212: result: $MENU_NAME" >&5 +echo "$as_me:26223: result: $MENU_NAME" >&5 echo "${ECHO_T}$MENU_NAME" >&6 -echo "$as_me:26215: checking for desired basename for panel library" >&5 +echo "$as_me:26226: checking for desired basename for panel library" >&5 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6 # Check whether --with-panel-libname or --without-panel-libname was given. @@ -26232,10 +26243,10 @@ case "x$PANEL_NAME" in ;; esac -echo "$as_me:26235: result: $PANEL_NAME" >&5 +echo "$as_me:26246: result: $PANEL_NAME" >&5 echo "${ECHO_T}$PANEL_NAME" >&6 -echo "$as_me:26238: checking for desired basename for cxx library" >&5 +echo "$as_me:26249: checking for desired basename for cxx library" >&5 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6 # Check whether --with-cxx-libname or --without-cxx-libname was given. @@ -26255,13 +26266,13 @@ case "x$CXX_NAME" in ;; esac -echo "$as_me:26258: result: $CXX_NAME" >&5 +echo "$as_me:26269: result: $CXX_NAME" >&5 echo "${ECHO_T}$CXX_NAME" >&6 ### Construct the list of subdirectories for which we'll customize makefiles ### with the appropriate compile-rules. -echo "$as_me:26264: checking for src modules" >&5 +echo "$as_me:26275: checking for src modules" >&5 echo $ECHO_N "checking for src modules... $ECHO_C" >&6 # dependencies and linker-arguments for test-programs @@ -26330,7 +26341,7 @@ eval TEST_ROOT=\$${cf_map_lib_basename}_NAME fi fi done -echo "$as_me:26333: result: $cf_cv_src_modules" >&5 +echo "$as_me:26344: result: $cf_cv_src_modules" >&5 echo "${ECHO_T}$cf_cv_src_modules" >&6 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS" @@ -26591,7 +26602,7 @@ case $cf_cv_system_name in (*-D_XOPEN_SOURCE_EXTENDED*) test -n "$verbose" && echo " moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6 -echo "${as_me:-configure}:26594: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 +echo "${as_me:-configure}:26605: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'` @@ -26602,7 +26613,7 @@ esac # Help to automatically enable the extended curses features when using either # the *-config or the ".pc" files by adding defines. -echo "$as_me:26605: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5 +echo "$as_me:26616: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6 PKG_CFLAGS= for cf_loop1 in $CPPFLAGS_after_XOPEN @@ -26618,7 +26629,7 @@ do done test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1" done -echo "$as_me:26621: result: $PKG_CFLAGS" >&5 +echo "$as_me:26632: result: $PKG_CFLAGS" >&5 echo "${ECHO_T}$PKG_CFLAGS" >&6 # AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this. @@ -26679,7 +26690,7 @@ then cf_filter_syms=$cf_dft_filter_syms test -n "$verbose" && echo " will map symbols to ABI=$cf_cv_abi_version" 1>&6 -echo "${as_me:-configure}:26682: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5 +echo "${as_me:-configure}:26693: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5 fi @@ -26706,7 +26717,7 @@ fi # This is used for the *-config script and *.pc data files. -echo "$as_me:26709: checking for linker search path" >&5 +echo "$as_me:26720: checking for linker search path" >&5 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6 if test "${cf_cv_ld_searchpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -26770,7 +26781,7 @@ done test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib fi -echo "$as_me:26773: result: $cf_cv_ld_searchpath" >&5 +echo "$as_me:26784: result: $cf_cv_ld_searchpath" >&5 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'` @@ -26860,7 +26871,7 @@ DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:26863: creating $CONFIG_STATUS" >&5 +{ echo "$as_me:26874: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL @@ -27036,7 +27047,7 @@ cat >>$CONFIG_STATUS <<\EOF echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header - { { echo "$as_me:27039: error: ambiguous option: $1 + { { echo "$as_me:27050: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} @@ -27055,7 +27066,7 @@ Try \`$0 --help' for more information." >&2;} ac_need_defaults=false;; # This is an error. - -*) { { echo "$as_me:27058: error: unrecognized option: $1 + -*) { { echo "$as_me:27069: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} @@ -27178,7 +27189,7 @@ do "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;; - *) { { echo "$as_me:27181: error: invalid argument: $ac_config_target" >&5 + *) { { echo "$as_me:27192: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac @@ -27677,7 +27688,7 @@ done; } esac if test x"$ac_file" != x-; then - { echo "$as_me:27680: creating $ac_file" >&5 + { echo "$as_me:27691: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi @@ -27695,7 +27706,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:27698: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:27709: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -27708,7 +27719,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:27711: error: cannot find input file: $f" >&5 + { { echo "$as_me:27722: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -27724,7 +27735,7 @@ cat >>$CONFIG_STATUS <<\EOF if test -n "$ac_seen"; then ac_used=`grep '@datarootdir@' $ac_item` if test -z "$ac_used"; then - { echo "$as_me:27727: WARNING: datarootdir was used implicitly but not set: + { echo "$as_me:27738: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used implicitly but not set: $ac_seen" >&2;} @@ -27733,7 +27744,7 @@ $ac_seen" >&2;} fi ac_seen=`grep '${datarootdir}' $ac_item` if test -n "$ac_seen"; then - { echo "$as_me:27736: WARNING: datarootdir was used explicitly but not set: + { echo "$as_me:27747: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&5 echo "$as_me: WARNING: datarootdir was used explicitly but not set: $ac_seen" >&2;} @@ -27770,7 +27781,7 @@ s,@INSTALL@,$ac_INSTALL,;t t ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file` if test -z "$ac_init"; then ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'` - { echo "$as_me:27773: WARNING: Variable $ac_name is used but was not set: + { echo "$as_me:27784: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&5 echo "$as_me: WARNING: Variable $ac_name is used but was not set: $ac_seen" >&2;} @@ -27781,7 +27792,7 @@ $ac_seen" >&2;} egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out if test -s $tmp/out; then ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out` - { echo "$as_me:27784: WARNING: Some variables may not be substituted: + { echo "$as_me:27795: WARNING: Some variables may not be substituted: $ac_seen" >&5 echo "$as_me: WARNING: Some variables may not be substituted: $ac_seen" >&2;} @@ -27830,7 +27841,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue * ) ac_file_in=$ac_file.in ;; esac - test x"$ac_file" != x- && { echo "$as_me:27833: creating $ac_file" >&5 + test x"$ac_file" != x- && { echo "$as_me:27844: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the @@ -27841,7 +27852,7 @@ echo "$as_me: creating $ac_file" >&6;} -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:27844: error: cannot find input file: $f" >&5 + test -f "$f" || { { echo "$as_me:27855: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; @@ -27854,7 +27865,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;} echo $srcdir/$f else # /dev/null tree - { { echo "$as_me:27857: error: cannot find input file: $f" >&5 + { { echo "$as_me:27868: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; @@ -27912,7 +27923,7 @@ cat >>$CONFIG_STATUS <<\EOF rm -f $tmp/in if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then - { echo "$as_me:27915: $ac_file is unchanged" >&5 + { echo "$as_me:27926: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ @@ -28299,7 +28310,7 @@ cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQ (cygdll|msysdll|mingw|msvcdll) test "x$with_shared_cxx" = xno && test -n "$verbose" && echo " overriding CXX_MODEL to SHARED" 1>&6 -echo "${as_me:-configure}:28302: testing overriding CXX_MODEL to SHARED ..." 1>&5 +echo "${as_me:-configure}:28313: testing overriding CXX_MODEL to SHARED ..." 1>&5 with_shared_cxx=yes ;; diff --git a/configure.in b/configure.in index 7454c9ae..d64cb1c1 100644 --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.709 2020/05/31 20:04:09 tom Exp $ +dnl $Id: configure.in,v 1.711 2020/07/11 20:18:40 tom Exp $ dnl Process this file with autoconf to produce a configure script. dnl dnl For additional information, see @@ -38,7 +38,7 @@ dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- AC_PREREQ(2.52.20200111) -AC_REVISION($Revision: 1.709 $) +AC_REVISION($Revision: 1.711 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -2231,6 +2231,17 @@ fi fi WITH_OVERWRITE=$with_overwrite +### At least on MinGW a shared library build without libtool +### requires adding the additional libs to the link list. +case $cf_cv_system_name in +(*mingw32*|*mingw64*) + if test "$DFT_LWR_MODEL" != "libtool"; then + SHLIB_LIST="$SHLIB_LIST ${LIBS}" + fi + ;; +*) ;; +esac + AC_SUBST(WITH_OVERWRITE) AC_SUBST(TICS_LIST) AC_SUBST(TINFO_LIST) diff --git a/dist.mk b/dist.mk index 3a617749..8c94e9d5 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.1359 2020/07/04 13:08:52 tom Exp $ +# $Id: dist.mk,v 1.1360 2020/07/11 08:26:05 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 = 2 -NCURSES_PATCH = 20200704 +NCURSES_PATCH = 20200711 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/include/nc_mingw.h b/include/nc_mingw.h index 01455bf7..6729b29d 100644 --- a/include/nc_mingw.h +++ b/include/nc_mingw.h @@ -31,12 +31,13 @@ * Author: Thomas Dickey, 2008-on * ****************************************************************************/ -/* $Id: nc_mingw.h,v 1.8 2020/02/29 15:46:00 anonymous.maarten Exp $ */ +/* $Id: nc_mingw.h,v 1.9 2020/07/11 22:13:19 tom Exp $ */ #ifndef NC_MINGW_H #define NC_MINGW_H 1 #ifdef _WIN32 + #ifdef WINVER # if WINVER < 0x0501 # error WINVER must at least be 0x0501 @@ -56,7 +57,17 @@ #include /* for struct timeval */ #endif -extern int _nc_gettimeofday(struct timeval *, void *); +#ifdef _MSC_VER +#include /* for struct timeval */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +NCURSES_EXPORT(int) _nc_gettimeofday(struct timeval *, void *); #undef HAVE_GETTIMEOFDAY #define HAVE_GETTIMEOFDAY 1 @@ -67,7 +78,11 @@ extern int _nc_gettimeofday(struct timeval *, void *); #undef wcwidth #define wcwidth(ucs) _nc_wcwidth((wchar_t)(ucs)) -extern int _nc_wcwidth(wchar_t); +NCURSES_EXPORT(int) _nc_wcwidth(wchar_t); + +#ifdef __cplusplus +} +#endif #endif /* _WIN32 */ diff --git a/man/curs_printw.3x b/man/curs_printw.3x index cd311fe6..451fdd04 100644 --- a/man/curs_printw.3x +++ b/man/curs_printw.3x @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_printw.3x,v 1.26 2020/03/14 23:48:47 tom Exp $ +.\" $Id: curs_printw.3x,v 1.27 2020/07/10 23:06:23 William.Pursell Exp $ .TH curs_printw 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -70,7 +70,7 @@ In effect, the string that would be output by \fBprintf\fR is output instead as though \fBwaddstr\fR were used on the given window. .PP -The \fBvwprintw\fR and \fBwv_printw\fR routines are analogous +The \fBvwprintw\fR and \fBvw_printw\fR routines are analogous to \fBvprintf\fR [see \fBprintf\fR(3)] and perform a \fBwprintw\fR using a variable argument list. The third argument is a \fBva_list\fR, a pointer to a diff --git a/misc/terminfo.src b/misc/terminfo.src index 707a6b4a..dae43d49 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.807 $ -# $Date: 2020/06/07 00:16:21 $ +# $Revision: 1.808 $ +# $Date: 2020/07/11 20:05:06 $ # # 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 @@ -1029,8 +1029,8 @@ linux2.2|linux 2.2.x console, # 'r' scan line 7 # '_' scan line 9 linux2.6|linux 2.6.x console, - acsc=++\,\,--..00__``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwx - xyyzz{{||}c~~, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxy + yzz{{||}}~~, enacs=\E)0, rmacs=^O, sgr=\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5 %t;2%;%?%p6%t;1%;m%?%p9%t\016%e\017%;, @@ -26614,4 +26614,8 @@ v3220|LANPAR Vision II model 3220/3221/3222, # + use vt100+enq in screen (report by Alexandre Montaron). # + add screen.linux-s alias (suggested by Alexandre Montaron). # +# 2020-07-11 +# + fix pound-sign mapping in acsc of linux2.6 entry (report by Ingo +# Bruckl). +# ######## SHANTIH! SHANTIH! SHANTIH! diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 2a511f2b..20f35659 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -35,7 +35,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.629 2020/06/13 21:58:00 tom Exp $ + * $Id: curses.priv.h,v 1.630 2020/07/11 20:48:42 anonymous.maarten Exp $ * * curses.priv.h * @@ -2348,7 +2348,7 @@ extern NCURSES_EXPORT(int) _nc_eventlist_timeout(_nc_eventlist *); */ #if USE_WIDEC_SUPPORT -#if defined(_WIN32) +#if defined(_WIN32) && !defined(_MSC_VER) /* * MinGW has wide-character functions, but they do not work correctly. */ diff --git a/ncurses/tinfo/access.c b/ncurses/tinfo/access.c index c69707fe..047ece40 100644 --- a/ncurses/tinfo/access.c +++ b/ncurses/tinfo/access.c @@ -37,10 +37,16 @@ #include -MODULE_ID("$Id: access.c,v 1.25 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: access.c,v 1.26 2020/07/11 20:55:23 anonymous.maarten Exp $") #define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c)) +#ifdef _MSC_VER +# define ACCESS(FN, MODE) access((FN), (MODE)&(R_OK|W_OK)) +#else +# define ACCESS access +#endif + NCURSES_EXPORT(char *) _nc_rootname(char *path) { @@ -112,7 +118,7 @@ _nc_access(const char *path, int mode) if (path == 0) { result = -1; - } else if (access(path, mode) < 0) { + } else if (ACCESS(path, mode) < 0) { if ((mode & W_OK) != 0 && errno == ENOENT && strlen(path) < PATH_MAX) { @@ -127,7 +133,7 @@ _nc_access(const char *path, int mode) if (head == leaf) _nc_STRCPY(head, ".", sizeof(head)); - result = access(head, R_OK | W_OK | X_OK); + result = ACCESS(head, R_OK | W_OK | X_OK); } else { result = -1; } diff --git a/ncurses/tinfo/captoinfo.c b/ncurses/tinfo/captoinfo.c index 9362105a..de0133b3 100644 --- a/ncurses/tinfo/captoinfo.c +++ b/ncurses/tinfo/captoinfo.c @@ -98,7 +98,7 @@ #include #include -MODULE_ID("$Id: captoinfo.c,v 1.99 2020/05/25 21:28:29 tom Exp $") +MODULE_ID("$Id: captoinfo.c,v 1.100 2020/07/08 21:39:54 tom Exp $") #if 0 #define DEBUG_THIS(p) DEBUG(9, p) @@ -639,7 +639,7 @@ _nc_infotocap(const char *cap GCC_UNUSED, const char *str, int const parameteriz /* we may have to move some trailing mandatory padding up front */ padding = str + strlen(str) - 1; if (padding > str && *padding == '>') { - if (*--padding == '/') + if (padding > (str + 1) && *--padding == '/') --padding; while (isdigit(UChar(*padding)) || *padding == '.' || *padding == '*') padding--; diff --git a/ncurses/wcwidth.h b/ncurses/wcwidth.h index e2611701..ccae41a9 100644 --- a/ncurses/wcwidth.h +++ b/ncurses/wcwidth.h @@ -119,7 +119,7 @@ static int bisearch(wchar_t ucs, const struct interval *table, int max) { * in ISO 10646. */ -int mk_wcwidth(wchar_t ucs) +NCURSES_EXPORT(int) mk_wcwidth(wchar_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ @@ -207,7 +207,7 @@ int mk_wcwidth(wchar_t ucs) } -int mk_wcswidth(const wchar_t *pwcs, size_t n) +NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *pwcs, size_t n) { int w, width = 0; @@ -230,7 +230,7 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n) * the traditional terminal character-width behaviour. It is not * otherwise recommended for general use. */ -int mk_wcwidth_cjk(wchar_t ucs) +NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t ucs) { /* sorted list of non-overlapping intervals of East Asian Ambiguous * characters, generated by "uniset +WIDTH-A -cat=Me -cat=Mn -cat=Cf c" */ @@ -298,7 +298,7 @@ int mk_wcwidth_cjk(wchar_t ucs) } -int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) +NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) { int w, width = 0; diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c index ed1d236d..322fe855 100644 --- a/ncurses/widechar/lib_cchar.c +++ b/ncurses/widechar/lib_cchar.c @@ -35,8 +35,9 @@ */ #include +#include -MODULE_ID("$Id: lib_cchar.c,v 1.33 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: lib_cchar.c,v 1.34 2020/07/11 22:55:08 tom Exp $") /* * The SuSv2 description leaves some room for interpretation. We'll assume wch diff --git a/ncurses/widechar/widechars.c b/ncurses/widechar/widechars.c index 35774793..05c75fb1 100644 --- a/ncurses/widechar/widechars.c +++ b/ncurses/widechar/widechars.c @@ -31,9 +31,9 @@ #if USE_WIDEC_SUPPORT -MODULE_ID("$Id: widechars.c,v 1.7 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: widechars.c,v 1.8 2020/07/11 20:48:42 anonymous.maarten Exp $") -#if defined(_WIN32) +#if defined(_WIN32) && !defined(_MSC_VER) /* * MinGW has wide-character functions, but they do not work correctly. */ diff --git a/ncurses/win32con/gettimeofday.c b/ncurses/win32con/gettimeofday.c index aae54c68..94be7b56 100644 --- a/ncurses/win32con/gettimeofday.c +++ b/ncurses/win32con/gettimeofday.c @@ -36,15 +36,11 @@ #include -MODULE_ID("$Id: gettimeofday.c,v 1.5 2020/02/29 15:46:00 anonymous.maarten Exp $") +MODULE_ID("$Id: gettimeofday.c,v 1.6 2020/07/11 21:03:53 tom Exp $") #define JAN1970 116444736000000000LL /* the value for 01/01/1970 00:00 */ -#ifdef _MSC_VER -#include -#endif - -int +NCURSES_EXPORT(int) gettimeofday(struct timeval *tv, void *tz GCC_UNUSED) { union { diff --git a/ncurses/win32con/wcwidth.c b/ncurses/win32con/wcwidth.c index 17ebaa61..55843662 100644 --- a/ncurses/win32con/wcwidth.c +++ b/ncurses/win32con/wcwidth.c @@ -28,7 +28,7 @@ ****************************************************************************/ #include -MODULE_ID("$Id: wcwidth.c,v 1.3 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: wcwidth.c,v 1.4 2020/07/11 21:02:10 tom Exp $") #if USE_WIDEC_SUPPORT #define mk_wcwidth(ucs) _nc_wcwidth(ucs) @@ -36,10 +36,10 @@ MODULE_ID("$Id: wcwidth.c,v 1.3 2020/02/02 23:34:34 tom Exp $") #define mk_wcwidth_cjk(ucs) _nc_wcwidth_cjk(ucs) #define mk_wcswidth_cjk(pwcs, n) _nc_wcswidth_cjk(pwcs, n) -extern int mk_wcwidth(wchar_t); -extern int mk_wcswidth(const wchar_t *, size_t); -extern int mk_wcwidth_cjk(wchar_t); -extern int mk_wcswidth_cjk(const wchar_t *, size_t); +NCURSES_EXPORT(int) mk_wcwidth(wchar_t); +NCURSES_EXPORT(int) mk_wcswidth(const wchar_t *, size_t); +NCURSES_EXPORT(int) mk_wcwidth_cjk(wchar_t); +NCURSES_EXPORT(int) mk_wcswidth_cjk(const wchar_t *, size_t); #include #else diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index b88f5bd6..075c096e 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200704) unstable; urgency=low +ncurses6 (6.2+20200711) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 04 Jul 2020 09:08:52 -0400 + -- Thomas E. Dickey Sat, 11 Jul 2020 04:26:05 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index b88f5bd6..075c096e 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200704) unstable; urgency=low +ncurses6 (6.2+20200711) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 04 Jul 2020 09:08:52 -0400 + -- Thomas E. Dickey Sat, 11 Jul 2020 04:26:05 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 06e29d3b..1a55f78e 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200704) unstable; urgency=low +ncurses6 (6.2+20200711) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 04 Jul 2020 09:08:52 -0400 + -- Thomas E. Dickey Sat, 11 Jul 2020 04:26:05 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 52c4fb71..f46c2c20 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.403 2020/07/04 13:08:52 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.404 2020/07/11 08:26:05 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "2" !define VERSION_YYYY "2020" -!define VERSION_MMDD "0704" +!define VERSION_MMDD "0711" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 7c6f24fc..0a0ac1f1 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.2 -Release: 20200704 +Release: 20200711 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index d64a7b56..411804b7 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.2 -Release: 20200704 +Release: 20200711 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index e50ea65a..ab545da0 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.2 -Release: 20200704 +Release: 20200711 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/progs/dump_entry.c b/progs/dump_entry.c index b644e8e7..e084e0f0 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -40,7 +40,7 @@ #include "termsort.c" /* this C file is generated */ #include /* so is this */ -MODULE_ID("$Id: dump_entry.c,v 1.178 2020/07/04 20:00:29 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.179 2020/07/08 21:21:11 tom Exp $") #define DISCARD(string) string = ABSENT_STRING #define PRINTF (void) printf @@ -1125,7 +1125,7 @@ fmt_entry(TERMTYPE2 *tterm, char *s = srccap, *d = buffer; int need = 3 + (int) strlen(name); while ((*d = *s++) != 0) { - if ((d - buffer + 1) >= (int) sizeof(buffer)) { + if ((d - buffer + 2) >= (int) sizeof(buffer)) { fprintf(stderr, "%s: value for %s is too long\n", _nc_progname, diff --git a/progs/infocmp.c b/progs/infocmp.c index f42ff341..dbdbdc2d 100644 --- a/progs/infocmp.c +++ b/progs/infocmp.c @@ -43,7 +43,7 @@ #include -MODULE_ID("$Id: infocmp.c,v 1.144 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: infocmp.c,v 1.145 2020/07/07 20:28:47 tom Exp $") #define MAX_STRING 1024 /* maximum formatted string */ @@ -1194,8 +1194,9 @@ usage(void) DATA("Options:") }; #undef DATA + /* length is given here so the compiler can make everything readonly */ #define DATA(s) s - static const char options[][45] = + static const char options[][46] = { " -0 print single-row" ," -1 print single-column" @@ -1835,8 +1836,8 @@ main(int argc, char *argv[]) tname[termcount]); status = _nc_read_entry2(tname[termcount], - tfile[termcount], - &entries[termcount].tterm); + tfile[termcount], + &entries[termcount].tterm); } if (status <= 0) { diff --git a/test/picsmap.c b/test/picsmap.c index 432fbf7a..3c4eb697 100644 --- a/test/picsmap.c +++ b/test/picsmap.c @@ -27,7 +27,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: picsmap.c,v 1.132 2020/02/02 23:34:34 tom Exp $ + * $Id: picsmap.c,v 1.134 2020/07/11 23:01:49 tom Exp $ * * Author: Thomas E. Dickey * @@ -955,6 +955,20 @@ parse_rgb(char **data) return result; } +#define LOWERCASE(c) ((isalpha(UChar(c)) && isupper(UChar(c))) ? tolower(UChar(c)) : (c)) + +static int +CaselessCmp(const char *a, const char *b) +{ /* strcasecmp isn't portable */ + while (*a && *b) { + int cmp = LOWERCASE(*a) - LOWERCASE(*b); + if (cmp != 0) + break; + a++, b++; + } + return LOWERCASE(*a) - LOWERCASE(*b); +} + static RGB_NAME * lookup_rgb(const char *name) { @@ -962,7 +976,7 @@ lookup_rgb(const char *name) if (rgb_table != 0) { int n; for (n = 0; rgb_table[n].name != 0; ++n) { - if (!strcasecmp(name, rgb_table[n].name)) { + if (!CaselessCmp(name, rgb_table[n].name)) { result = &rgb_table[n]; break; } diff --git a/test/test.priv.h b/test/test.priv.h index 18cfc907..b352ce7d 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -30,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.186 2020/05/10 00:36:06 tom Exp $ */ +/* $Id: test.priv.h,v 1.187 2020/07/11 23:01:49 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -437,6 +437,13 @@ extern int optind; #include #include +#if defined(_MSC_VER) +#undef popen +#define popen(s,n) _popen(s,n) +#undef pclose +#define pclose(s) _pclose(s) +#endif + #ifndef GCC_NORETURN #define GCC_NORETURN /* nothing */ #endif -- 2.44.0