]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.1 - patch 20190406
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 7 Apr 2019 01:23:31 +0000 (01:23 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 7 Apr 2019 01:23:31 +0000 (01:23 +0000)
+ modify MKcaptab.sh, MKkey_defs.sh, and MKhashsize.sh to handle
  split-up Caps-files.
+ build-fixes if extended-functions are disabled.

16 files changed:
NEWS
VERSION
dist.mk
include/MKhashsize.sh
include/MKkey_defs.sh
ncurses/tinfo/MKcaptab.sh
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.spec
progs/tic.c
test/demo_menus.c
test/sp_tinfo.c

diff --git a/NEWS b/NEWS
index cb74bfc741d03da7b491c431af5fc2053e973a46..adc521769e55b3ae3195b1e8b591dd0a155aa9df 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
 -- 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
 -------------------------------------------------------------------------------
 
 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.
 
 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
 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 5193157db5188c8a9891aede1ef74ac4972b73c6..80efeb0868bc0cc9de6b26ac56b38a3567bd23c0 100644 (file)
--- 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 0616bf8cc16d831fad27a47fa0f293f435858d9e..943b799b7728c5e0720279c790e19042af206ce0 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -25,7 +25,7 @@
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # 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
 # 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
 # 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)
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 11b3111aff921cc8792032b2772c4d2139f8a5c3..b311137ee4ec9bba82616f7a2f741bad4732ec90 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 ##############################################################################
 #!/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"), #
 #                                                                            #
 # 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.                                                             #
 ##############################################################################
 # 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
 #
 #
 # MKhashsize.sh --- generate size include for hash functions
 #
@@ -34,8 +34,8 @@ echo "/*"
 echo " * hashsize.h -- hash and token table constants"
 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}"
 
 echo ""
 echo "#define CAPTABSIZE       ${TABSIZE}"
index 56c1f36566604e8b257e127e25bbf3ceeaed6e89..6a173f5afb4f8e8daebaf76847be9b9ea8528446 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /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.                #
 #                                                                            #
 ##############################################################################
 # Copyright (c) 2001-2017,2019 Free Software Foundation, Inc.                #
 #                                                                            #
@@ -35,7 +35,8 @@
 # Extract function-key definitions from the Caps file
 #
 : ${AWK-awk}
 # Extract function-key definitions from the Caps file
 #
 : ${AWK-awk}
-DATA=${1-Caps}
+
+test $# = 0 && set Caps
 
 data=data$$
 pass1=pass1_$$
 
 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):
 
 # 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
 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)
 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
 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`
 EOF
 
 THIS=./`basename $0`
-PARM=./`basename $DATA`
 
 cat <<EOF
 /*
 
 cat <<EOF
 /*
- * These definitions were generated by $THIS $PARM
+ * These definitions were generated by $THIS $*
  */
 EOF
 
  */
 EOF
 
@@ -124,6 +124,8 @@ BEGIN       {
 /^#/           {next;}
 /^capalias/    {next;}
 /^infoalias/   {next;}
 /^#/           {next;}
 /^capalias/    {next;}
 /^infoalias/   {next;}
+/^used_by/     {next;}
+/^userdef/     {next;}
 
 $5 != "-" && $6 != "-" {
                if ($6 == "+") {
 
 $5 != "-" && $6 != "-" {
                if ($6 == "+") {
index 20c94a639b9ab96e74a395eee59e812f87e253af..f1e989c637f0caff5cad8f9c0d94804787d9940f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 ##############################################################################
 #!/bin/sh
 ##############################################################################
-# Copyright (c) 2007-2010,2011 Free Software Foundation, Inc.                #
+# Copyright (c) 2007-2011,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"), #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # copy of this software and associated documentation files (the "Software"), #
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
 # use or other dealings in this Software without prior written               #
 # authorization.                                                             #
 ##############################################################################
-# $Id: MKcaptab.sh,v 1.14 2011/10/22 16:34:50 tom Exp $
-AWK=${1-awk}
-OPT1=${2-0}
-OPT2=${3-tinfo/MKcaptab.awk}
-DATA=${4-../include/Caps}
+# $Id: MKcaptab.sh,v 1.15 2019/04/06 21:53:49 tom Exp $
+
+if test $# != 0
+then
+       AWK="$1"; shift 1
+else
+       AWK=awk
+fi
+
+if test $# != 0
+then
+       OPT1="$1"; shift 1
+else
+       OPT1="-0"
+fi
+
+if test $# != 0
+then
+       OPT2="$1"; shift 1
+else
+       OPT2="tinfo/MKcaptab.awk"
+fi
 
 cat <<EOF
 /*
 
 cat <<EOF
 /*
@@ -52,12 +69,12 @@ cat <<'EOF'
 
 EOF
 
 
 EOF
 
-./make_hash 1 info $OPT1 <$DATA
-./make_hash 3 cap  $OPT1 <$DATA
+cat "$@" |./make_hash 1 info $OPT1
+cat "$@" |./make_hash 3 cap  $OPT1
 
 
-$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias <$DATA
+cat "$@" |$AWK -f $OPT2 bigstrings=$OPT1 tablename=capalias
 
 
-$AWK -f $OPT2 bigstrings=$OPT1 tablename=infoalias <$DATA
+cat "$@" |$AWK -f $OPT2 bigstrings=$OPT1 tablename=infoalias
 
 cat <<EOF
 
 
 cat <<EOF
 
index 83b7920ee59a95822880296f5ff8a28315411a1f..6ab365bd42322a162dd7e7b2e50b87ab8a25f984 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190330) unstable; urgency=low
+ncurses6 (6.1+20190406) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 30 Mar 2019 09:07:14 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Apr 2019 06:42:54 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 83b7920ee59a95822880296f5ff8a28315411a1f..6ab365bd42322a162dd7e7b2e50b87ab8a25f984 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190330) unstable; urgency=low
+ncurses6 (6.1+20190406) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 30 Mar 2019 09:07:14 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Apr 2019 06:42:54 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 81683d6140f92ac58c5ea5f62173a825a44a3164..ce4e7470c00b727837149a3885554dc7fece2cfc 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20190330) unstable; urgency=low
+ncurses6 (6.1+20190406) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 30 Mar 2019 09:07:14 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 06 Apr 2019 06:42:54 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index ece1e3916f16cde1ad03911d4a2c4277de4c8b1a..d7b2a69755c261c5a88d5d0f9d652268934b295b 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.322 2019/03/30 13:07:14 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.323 2019/04/06 10:42:54 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "1"\r
 !define VERSION_YYYY  "2019"\r
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "1"\r
 !define VERSION_YYYY  "2019"\r
-!define VERSION_MMDD  "0330"\r
+!define VERSION_MMDD  "0406"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 04dee663c88b2ddca4801427a76f168cdd9f61bd..941c67c9735656b39f167c1b3569017fd0dec903 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.1
 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
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index a1a2d12397051ec01c32df3394bf31b8b1f272e7..c1259921e327d30262f8d66e5fd20109267b92ff 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.1
 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
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 643da4aa1db36892bcf5d4793bc5ebe691382ffe..1634b61dffd8aa8e7e5812d20b9be775bd301381 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.1
 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
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 713fc11abda8ef2d5e9a024d097553e30f0a4e09..65b5fb75aea8d338dda6e2f1817b4a58d289311b 100644 (file)
@@ -48,7 +48,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
 #include <parametrized.h>
 #include <transform.h>
 
-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 "<stdin>"
 
 
 #define STDIN_NAME "<stdin>"
 
@@ -1666,6 +1666,7 @@ check_printer(TERMTYPE2 *tp)
 #endif
 }
 
 #endif
 }
 
+#if NCURSES_XNAMES
 static bool
 uses_SGR_39_49(const char *value)
 {
 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)
 {
 static void
 check_screen(TERMTYPE2 *tp)
 {
-#if NCURSES_XNAMES
     if (_nc_user_definable) {
        int have_XT = tigetflag("XT");
        int have_XM = tigetflag("XM");
     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.
 
 /*
  * 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.
  */
  * 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)
 {
 static struct user_table_entry const *
 lookup_user_capability(const char *name)
 {
@@ -1845,6 +1848,7 @@ lookup_user_capability(const char *name)
     }
     return result;
 }
     }
     return result;
 }
+#endif
 
 /*
  * If a given name is likely to be a user-capability, return the number of
 
 /*
  * 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;
        (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;
        }
     }
        struct user_table_entry const *p = lookup_user_capability(name);
        if (p != 0) {
            result = (int) p->ute_argc;
        }
     }
+#endif
     return result;
 }
 
     return result;
 }
 
@@ -1918,6 +1925,7 @@ check_params(TERMTYPE2 *tp, const char *name, char *value, int extended)
        s++;
     }
 
        s++;
     }
 
+#if NCURSES_XNAMES
     if (extended) {
        int check = is_user_capability(name);
        if (check != actual) {
     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;
     }
        }
        expected = actual;
     }
+#endif
 
     if (params[0]) {
        _nc_warning("%s refers to parameter 0 (%%p0), which is not allowed", name);
 
     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) {
            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);
            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);
            }
                _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)
 {
 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)
 
 /* other sanity-checks (things that we don't want in the normal
  * logic that reads a terminfo entry)
index 61c69daee19b45502e8c79a6f96efa453b81ae46..5673deff216dd231386111798e91e8d4bfe0f885 100644 (file)
@@ -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            *
  *                                                                          *
  * 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.                                                           *
  ****************************************************************************/
 /*
  * 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
  *
  * 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)
 {
 static void
 resize_menu(MENU ** menu)
 {
@@ -792,7 +792,7 @@ resize_menus(MENU * current)
     resize_menu(&mpTrace);
 #endif
 }
     resize_menu(&mpTrace);
 #endif
 }
-#endif
+#endif /* defined(KEY_RESIZE) && NCURSES_EXT_FUNCS */
 
 static void
 show_status(int ch, MENU * menu)
 
 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;
        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;
        case KEY_RESIZE:
            resize_menus(last_menu);
            continue;
index a3e5c55323c49ca3c56fcbc180e7919629bee613..c0a67137c7cb75dea9ecf8502598e467f1621373 100644 (file)
@@ -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            *
  *                                                                          *
  * 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
  */
  *
  * 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)
 {
 static void
 do_stuff(MYDATA * data)
 {
-    char *s;
     SCREEN *sp = data->sp;
     SCREEN *sp = data->sp;
+#if NCURSES_EXT_FUNCS
+    char *s;
     int my_code = 1234;
     const char *my_text = "\033[?m";
     int my_code = 1234;
     const char *my_text = "\033[?m";
+#endif
 
     set_curterm_sp(sp, data->term);
 
 
     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);
 
     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);
     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, '?');
     keyname_sp(sp, '?');
+#if NCURSES_EXT_FUNCS
     keyok_sp(sp, my_code, FALSE);
     keyok_sp(sp, my_code, TRUE);
     keyok_sp(sp, my_code, FALSE);
     keyok_sp(sp, my_code, TRUE);
+#endif
 
     savetty_sp(sp);
 
 
     savetty_sp(sp);
 
@@ -227,7 +233,9 @@ do_stuff(MYDATA * data)
     /*
      * These functions are low-level settings for ncurses.
      */
     /*
      * These functions are low-level settings for ncurses.
      */
+#if NCURSES_EXT_FUNCS
     set_tabsize_sp(sp, 5);     /* waddch */
     set_tabsize_sp(sp, 5);     /* waddch */
+#endif
     typeahead_sp(sp, FALSE);   /* waddch */
     use_env_sp(sp, FALSE);     /* newterm */
     use_tioctl_sp(sp, FALSE);  /* newterm */
     typeahead_sp(sp, FALSE);   /* waddch */
     use_env_sp(sp, FALSE);     /* newterm */
     use_tioctl_sp(sp, FALSE);  /* newterm */