From: Thomas E. Dickey Date: Sun, 7 Apr 2019 01:23:31 +0000 (+0000) Subject: ncurses 6.1 - patch 20190406 X-Git-Tag: v6.2~44 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=6b99a559185b3b8fad80b56bc2070b08101c33d1;ds=sidebyside ncurses 6.1 - patch 20190406 + modify MKcaptab.sh, MKkey_defs.sh, and MKhashsize.sh to handle split-up Caps-files. + build-fixes if extended-functions are disabled. --- diff --git a/NEWS b/NEWS index cb74bfc7..adc52176 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3300 2019/03/30 23:12:31 tom Exp $ +-- $Id: NEWS,v 1.3304 2019/04/07 00:05:35 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,11 @@ 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. +20190406 + + modify MKcaptab.sh, MKkey_defs.sh, and MKhashsize.sh to handle + split-up Caps-files. + + build-fixes if extended-functions are disabled. + 20190330 + add "screen5", to mention italics (report by Stefan Assmann) + modify description of xterm+x11hilite to eliminate unused p5 -TD diff --git a/VERSION b/VERSION index 5193157d..80efeb08 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20190330 +5:0:10 6.1 20190406 diff --git a/dist.mk b/dist.mk index 0616bf8c..943b799b 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1276 2019/03/30 13:07:14 tom Exp $ +# $Id: dist.mk,v 1.1277 2019/04/06 10:42:54 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -37,7 +37,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 1 -NCURSES_PATCH = 20190330 +NCURSES_PATCH = 20190406 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/include/MKhashsize.sh b/include/MKhashsize.sh index 11b3111a..b311137e 100755 --- a/include/MKhashsize.sh +++ b/include/MKhashsize.sh @@ -1,6 +1,6 @@ #!/bin/sh ############################################################################## -# Copyright (c) 1998,2006 Free Software Foundation, Inc. # +# Copyright (c) 1998-2006,2019 Free Software Foundation, Inc. # # # # Permission is hereby granted, free of charge, to any person obtaining a # # copy of this software and associated documentation files (the "Software"), # @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: MKhashsize.sh,v 1.7 2006/10/22 00:45:39 tom Exp $ +# $Id: MKhashsize.sh,v 1.8 2019/04/06 22:53:17 tom Exp $ # # MKhashsize.sh --- generate size include for hash functions # @@ -34,8 +34,8 @@ echo "/*" echo " * hashsize.h -- hash and token table constants" echo " */" -CAPS="${1-Caps}" -TABSIZE=`grep -v '^[ #]' $CAPS | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l` +test $# = 0 && set Caps +TABSIZE=`cat "$@" | grep -v '^[ #]' | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | grep -v "^userdef" | grep -v "^used_by" | wc -l` echo "" echo "#define CAPTABSIZE ${TABSIZE}" diff --git a/include/MKkey_defs.sh b/include/MKkey_defs.sh index 56c1f365..6a173f5a 100755 --- a/include/MKkey_defs.sh +++ b/include/MKkey_defs.sh @@ -1,5 +1,5 @@ #! /bin/sh -# $Id: MKkey_defs.sh,v 1.17 2019/03/02 22:51:42 tom Exp $ +# $Id: MKkey_defs.sh,v 1.18 2019/04/06 23:38:16 tom Exp $ ############################################################################## # Copyright (c) 2001-2017,2019 Free Software Foundation, Inc. # # # @@ -35,7 +35,8 @@ # Extract function-key definitions from the Caps file # : ${AWK-awk} -DATA=${1-Caps} + +test $# = 0 && set Caps data=data$$ pass1=pass1_$$ @@ -46,14 +47,14 @@ trap 'rm -f $data pass[1234]_$$' EXIT INT QUIT TERM HUP # change repeated tabs (used for readability) to single tabs (needed to make # awk see the right field alignment of the corresponding columns): -if sort -k 6 $DATA >$data 2>/dev/null +if sort -k 6 "$@" >$data 2>/dev/null then # POSIX - sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n -k 6 >$data -elif sort -n +5 $DATA >$data 2>/dev/null + sed -e 's/[ ][ ]*/ /g' "$@" |sort -n -k 6 >$data +elif sort -n +5 "$@" >$data 2>/dev/null then # SunOS (and SVr4, marked as obsolete but still recognized) - sed -e 's/[ ][ ]*/ /g' < $DATA |sort -n +5 >$data + sed -e 's/[ ][ ]*/ /g' "$@" |sort -n +5 >$data else echo "Your sort utility is broken. Please install one that works." >&2 exit 1 @@ -66,11 +67,10 @@ key_event kv1 str V1 KEY_EVENT + ----- We were interrupted by an event EOF THIS=./`basename $0` -PARM=./`basename $DATA` cat < Sat, 30 Mar 2019 09:07:14 -0400 + -- Thomas E. Dickey Sat, 06 Apr 2019 06:42:54 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 83b7920e..6ab365bd 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20190330) unstable; urgency=low +ncurses6 (6.1+20190406) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 30 Mar 2019 09:07:14 -0400 + -- Thomas E. Dickey Sat, 06 Apr 2019 06:42:54 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 81683d61..ce4e7470 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20190330) unstable; urgency=low +ncurses6 (6.1+20190406) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 30 Mar 2019 09:07:14 -0400 + -- Thomas E. Dickey Sat, 06 Apr 2019 06:42:54 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index ece1e391..d7b2a697 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.322 2019/03/30 13:07:14 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.323 2019/04/06 10:42:54 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "1" !define VERSION_YYYY "2019" -!define VERSION_MMDD "0330" +!define VERSION_MMDD "0406" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 04dee663..941c67c9 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -3,7 +3,7 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 Version: 6.1 -Release: 20190330 +Release: 20190406 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index a1a2d123..c1259921 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.1 -Release: 20190330 +Release: 20190406 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index 643da4aa..1634b61d 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.1 -Release: 20190330 +Release: 20190406 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/progs/tic.c b/progs/tic.c index 713fc11a..65b5fb75 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.271 2019/03/17 00:46:55 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.272 2019/04/06 20:18:54 tom Exp $") #define STDIN_NAME "" @@ -1666,6 +1666,7 @@ check_printer(TERMTYPE2 *tp) #endif } +#if NCURSES_XNAMES static bool uses_SGR_39_49(const char *value) { @@ -1679,7 +1680,6 @@ uses_SGR_39_49(const char *value) static void check_screen(TERMTYPE2 *tp) { -#if NCURSES_XNAMES if (_nc_user_definable) { int have_XT = tigetflag("XT"); int have_XM = tigetflag("XM"); @@ -1735,8 +1735,10 @@ check_screen(TERMTYPE2 *tp) } } } -#endif } +#else +#define check_screen(tp) /* nothing */ +#endif /* * Returns the expected number of parameters for the given capability. @@ -1836,6 +1838,7 @@ expected_params(const char *name) * Check for user-capabilities that happen to be used in ncurses' terminal * database. */ +#if NCURSES_XNAMES static struct user_table_entry const * lookup_user_capability(const char *name) { @@ -1845,6 +1848,7 @@ lookup_user_capability(const char *name) } return result; } +#endif /* * If a given name is likely to be a user-capability, return the number of @@ -1866,12 +1870,15 @@ is_user_capability(const char *name) (name[1] >= '0' && name[1] <= '9') && name[2] == '\0') { result = (name[1] == '6') ? 2 : 0; - } else if (using_extensions) { + } +#if NCURSES_XNAMES + else if (using_extensions) { struct user_table_entry const *p = lookup_user_capability(name); if (p != 0) { result = (int) p->ute_argc; } } +#endif return result; } @@ -1918,6 +1925,7 @@ check_params(TERMTYPE2 *tp, const char *name, char *value, int extended) s++; } +#if NCURSES_XNAMES if (extended) { int check = is_user_capability(name); if (check != actual) { @@ -1929,6 +1937,7 @@ check_params(TERMTYPE2 *tp, const char *name, char *value, int extended) } expected = actual; } +#endif if (params[0]) { _nc_warning("%s refers to parameter 0 (%%p0), which is not allowed", name); @@ -1957,13 +1966,16 @@ check_params(TERMTYPE2 *tp, const char *name, char *value, int extended) analyzed = popcount; } if (actual != analyzed && expected != analyzed) { +#if NCURSES_XNAMES int user_cap = is_user_capability(name); if ((user_cap == analyzed) && using_extensions) { ; /* ignore */ } else if (user_cap >= 0) { _nc_warning("tparm will use %d parameters for %s, expected %d", analyzed, name, user_cap); - } else { + } else +#endif + { _nc_warning("tparm analyzed %d parameters for %s, expected %d", analyzed, name, actual); } @@ -2805,6 +2817,7 @@ check_sgr_param(TERMTYPE2 *tp, int code, const char *name, char *value) } } +#if NCURSES_XNAMES static int standard_type(const char *name) { @@ -2853,6 +2866,7 @@ check_user_capability_type(const char *name, int actual) } } } +#endif /* other sanity-checks (things that we don't want in the normal * logic that reads a terminfo entry) diff --git a/test/demo_menus.c b/test/demo_menus.c index 61c69dae..5673deff 100644 --- a/test/demo_menus.c +++ b/test/demo_menus.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2005-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 2005-2017,2019 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_menus.c,v 1.65 2017/11/24 21:03:30 tom Exp $ + * $Id: demo_menus.c,v 1.66 2019/04/06 20:42:48 tom Exp $ * * Demonstrate a variety of functions from the menu library. * Thomas Dickey - 2005/4/9 @@ -764,7 +764,7 @@ move_menus(MENU * current, int by_y, int by_x) } } -#ifdef KEY_RESIZE +#if defined(KEY_RESIZE) && NCURSES_EXT_FUNCS static void resize_menu(MENU ** menu) { @@ -792,7 +792,7 @@ resize_menus(MENU * current) resize_menu(&mpTrace); #endif } -#endif +#endif /* defined(KEY_RESIZE) && NCURSES_EXT_FUNCS */ static void show_status(int ch, MENU * menu) @@ -846,7 +846,7 @@ perform_menus(void) case KEY_SRIGHT: move_menus(last_menu, 0, 1); continue; -#ifdef KEY_RESIZE +#if defined(KEY_RESIZE) && NCURSES_EXT_FUNCS case KEY_RESIZE: resize_menus(last_menu); continue; diff --git a/test/sp_tinfo.c b/test/sp_tinfo.c index a3e5c553..c0a67137 100644 --- a/test/sp_tinfo.c +++ b/test/sp_tinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2017 Free Software Foundation, Inc. * + * Copyright (c) 2017,2019 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -27,7 +27,7 @@ ****************************************************************************/ /* - * $Id: sp_tinfo.c,v 1.21 2017/06/17 21:19:25 tom Exp $ + * $Id: sp_tinfo.c,v 1.22 2019/04/06 20:42:57 tom Exp $ * * TOTO: add option for non-sp-funcs interface */ @@ -185,10 +185,12 @@ show_char(MYDATA * data, const char *name, int value) static void do_stuff(MYDATA * data) { - char *s; SCREEN *sp = data->sp; +#if NCURSES_EXT_FUNCS + char *s; int my_code = 1234; const char *my_text = "\033[?m"; +#endif set_curterm_sp(sp, data->term); @@ -211,14 +213,18 @@ do_stuff(MYDATA * data) show_string(data, "unctrl", unctrl_sp(sp, 033)); fflush(data->fp); +#if NCURSES_EXT_FUNCS define_key_sp(sp, my_text, my_code); has_key_sp(sp, 0); key_defined_sp(sp, my_text); if ((s = keybound_sp(sp, my_code, 0)) != 0) free(s); +#endif keyname_sp(sp, '?'); +#if NCURSES_EXT_FUNCS keyok_sp(sp, my_code, FALSE); keyok_sp(sp, my_code, TRUE); +#endif savetty_sp(sp); @@ -227,7 +233,9 @@ do_stuff(MYDATA * data) /* * These functions are low-level settings for ncurses. */ +#if NCURSES_EXT_FUNCS set_tabsize_sp(sp, 5); /* waddch */ +#endif typeahead_sp(sp, FALSE); /* waddch */ use_env_sp(sp, FALSE); /* newterm */ use_tioctl_sp(sp, FALSE); /* newterm */