]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 6.2 - patch 20210418
authorThomas E. Dickey <dickey@invisible-island.net>
Mon, 19 Apr 2021 00:00:48 +0000 (00:00 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Mon, 19 Apr 2021 00:00:48 +0000 (00:00 +0000)
+ improve CF_LINK_FUNCS by ensuring that the source-file is closed
  before linking to the target.
+ add "check" rules for headers in c++, progs and test-directories.
+ build-fix for termsort module when configured with termcap (reports
  by Rajeev V Pillai, Rudi Heitbaum).

23 files changed:
NEWS
VERSION
aclocal.m4
c++/Makefile.in
configure
dist.mk
ncurses/tinfo/lib_print.c
ncurses/tinfo/read_termcap.c
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/MKtermsort.sh
progs/Makefile.in
progs/dump_entry.c
progs/dump_entry.h
progs/modules
progs/tput.c
test/Makefile.in
test/mk-test.awk

diff --git a/NEWS b/NEWS
index 1d0d1983fb9169e635959f68581540f7b86b989b..42fadc11bbd6fb77895147b9d1b56bda840ae7db 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,7 +26,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.3653 2021/04/17 22:26:02 tom Exp $
+-- $Id: NEWS,v 1.3656 2021/04/18 18:13:32 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
@@ -46,6 +46,13 @@ 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.
 
+20210418
+       + improve CF_LINK_FUNCS by ensuring that the source-file is closed
+         before linking to the target.
+       + add "check" rules for headers in c++, progs and test-directories.
+       + build-fix for termsort module when configured with termcap (reports
+         by Rajeev V Pillai, Rudi Heitbaum).
+
 20210417
        + extend --disable-pkg-ldflags option to also control whether $LDFLAGS
          from the build is provided in -config and .pc files (Debian #986764).
 20210417
        + extend --disable-pkg-ldflags option to also control whether $LDFLAGS
          from the build is provided in -config and .pc files (Debian #986764).
diff --git a/VERSION b/VERSION
index 057ef076efc0a32c5a70efe352e14284d1951103..5f83cc00a119f3781c6eef1c229d9af8a0604c2f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.2     20210417
+5:0:10 6.2     20210418
index 5878b039313530f9f2c74e559f104844e3ceac0e..b2bfcd5fe9746c895ec37f95d4b7e37de33487bd 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.957 2021/04/03 20:43:02 tom Exp $
+dnl $Id: aclocal.m4,v 1.958 2021/04/18 18:12:13 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -5094,7 +5094,7 @@ AC_SUBST(BROKEN_LINKER)
 
 ])dnl
 dnl ---------------------------------------------------------------------------
 
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_LINK_FUNCS version: 10 updated: 2021/04/03 15:45:02
+dnl CF_LINK_FUNCS version: 11 updated: 2021/04/18 14:08:47
 dnl -------------
 dnl Most Unix systems have both link and symlink, a few don't have symlink.
 dnl A few non-Unix systems implement symlink, but not link.
 dnl -------------
 dnl Most Unix systems have both link and symlink, a few don't have symlink.
 dnl A few non-Unix systems implement symlink, but not link.
@@ -5120,6 +5120,7 @@ else
                cf_cv_link_funcs=
                for cf_func in link symlink ; do
                        AC_TRY_RUN([
                cf_cv_link_funcs=
                for cf_func in link symlink ; do
                        AC_TRY_RUN([
+#include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #include <sys/types.h>
 #include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
@@ -5128,27 +5129,26 @@ else
 int main(void)
 {
        int fail = 0;
 int main(void)
 {
        int fail = 0;
-       char *src = "config.log";
+       char *src = "conftest.tmp";
        char *dst = "conftest.chk";
        char *dst = "conftest.chk";
-       struct stat src_sb;
-       struct stat dst_sb;
-
-       stat(src, &src_sb);
-       if ($cf_func("config.log", "conftest.chk") < 0) {
-               fail = 1;
-       } else if (stat(dst, &dst_sb) < 0) {
-               fail = 2;
-       } else {
-               long diff = (dst_sb.st_mtime - src_sb.st_mtime);
-               if (diff < 0)
-                       diff = -diff;
-               if (diff > 2)
-                       fail = 3;
+       struct stat src_sb, dst_sb;
+       FILE *fp = fopen(src, "w");
+       if (fp == 0) { fail = 3; } else {
+               fclose(fp); stat(src, &src_sb);
+               if ($cf_func(src, dst) < 0) {
+                       fail = 1;
+               } else if (stat(dst, &dst_sb) < 0) {
+                       fail = 2;
+               } else {
+                       long diff = (dst_sb.st_mtime - src_sb.st_mtime);
+                       if (diff < 0) diff = -diff;
+                       if (diff > 2) fail = 3;
+               }
        }
 #ifdef HAVE_UNLINK
        }
 #ifdef HAVE_UNLINK
-       unlink(dst);
+       unlink(dst); unlink(src);
 #else
 #else
-       remove(dst);
+       remove(dst); remove(src);
 #endif
        ${cf_cv_main_return:-return} (fail);
 }
 #endif
        ${cf_cv_main_return:-return} (fail);
 }
index a4f39e2ef65d11085aa616fa5ec58256aff04868..bd7fcb1c8474675bba249c70aae4e5d8647d0f02 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.129 2021/03/20 10:14:27 tom Exp $
+# $Id: Makefile.in,v 1.130 2021/04/18 15:13:58 tom Exp $
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2015,2016 Free Software Foundation, Inc.                    #
 ##############################################################################
 # Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2015,2016 Free Software Foundation, Inc.                    #
@@ -259,6 +259,18 @@ etip.h:    $(srcdir)/etip.h.in $(srcdir)/edit_cfg.sh
        cp $(srcdir)/etip.h.in $@
        $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
 
        cp $(srcdir)/etip.h.in $@
        $(SHELL) $(srcdir)/edit_cfg.sh ../include/ncurses_cfg.h $@
 
+# Verify that each header-file can be compiled without including another.
+check::
+       @$(SHELL) -c "for header in *.h;\
+               do \
+                       [ \$${header} = etip.h ] && continue; \
+                       echo \"** testing \$${header}\" ; \
+                       echo \"#include <\$${header}>\" >headers.cc; \
+                       echo \"int main(int argc, char **argv) { (void) argc; (void) argv; return 0; }\" >>headers.cc; \
+                       $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) headers.cc; \
+               done"
+       -@rm -f headers.*
+
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################
index 2a4fe9b2529be3f08953996d647cdedbfc892d28..4471f97bdb95930dc1ff711cec37213ce111432e 100755 (executable)
--- a/configure
+++ b/configure
@@ -9426,6 +9426,7 @@ else
 #line 9426 "configure"
 #include "confdefs.h"
 
 #line 9426 "configure"
 #include "confdefs.h"
 
+#include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
 #include <sys/types.h>
 #include <sys/stat.h>
 #ifdef HAVE_UNISTD_H
@@ -9434,27 +9435,26 @@ else
 int main(void)
 {
        int fail = 0;
 int main(void)
 {
        int fail = 0;
-       char *src = "config.log";
+       char *src = "conftest.tmp";
        char *dst = "conftest.chk";
        char *dst = "conftest.chk";
-       struct stat src_sb;
-       struct stat dst_sb;
-
-       stat(src, &src_sb);
-       if ($cf_func("config.log", "conftest.chk") < 0) {
-               fail = 1;
-       } else if (stat(dst, &dst_sb) < 0) {
-               fail = 2;
-       } else {
-               long diff = (dst_sb.st_mtime - src_sb.st_mtime);
-               if (diff < 0)
-                       diff = -diff;
-               if (diff > 2)
-                       fail = 3;
+       struct stat src_sb, dst_sb;
+       FILE *fp = fopen(src, "w");
+       if (fp == 0) { fail = 3; } else {
+               fclose(fp); stat(src, &src_sb);
+               if ($cf_func(src, dst) < 0) {
+                       fail = 1;
+               } else if (stat(dst, &dst_sb) < 0) {
+                       fail = 2;
+               } else {
+                       long diff = (dst_sb.st_mtime - src_sb.st_mtime);
+                       if (diff < 0) diff = -diff;
+                       if (diff > 2) fail = 3;
+               }
        }
 #ifdef HAVE_UNLINK
        }
 #ifdef HAVE_UNLINK
-       unlink(dst);
+       unlink(dst); unlink(src);
 #else
 #else
-       remove(dst);
+       remove(dst); remove(src);
 #endif
        ${cf_cv_main_return:-return} (fail);
 }
 #endif
        ${cf_cv_main_return:-return} (fail);
 }
diff --git a/dist.mk b/dist.mk
index 22671b59529a5a6f49e6c1eb8c8aed7899afda28..0a7b40bc56097df8603c693e6dcb9f695f1048ca 100644 (file)
--- a/dist.mk
+++ b/dist.mk
@@ -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: dist.mk,v 1.1410 2021/04/17 10:16:06 tom Exp $
+# $Id: dist.mk,v 1.1411 2021/04/18 10:23:11 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
@@ -38,7 +38,7 @@ SHELL = /bin/sh
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 2
 # These define the major/minor/patch versions of ncurses.
 NCURSES_MAJOR = 6
 NCURSES_MINOR = 2
-NCURSES_PATCH = 20210417
+NCURSES_PATCH = 20210418
 
 # 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 c256ba9989b350adafd5c647ba57c8c5aed4ec10..aa65041c71d004a80d46b1eace9a8c2d4e0c6230 100644 (file)
 #define CUR SP_TERMTYPE
 #endif
 
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_print.c,v 1.29 2021/04/17 16:12:54 tom Exp $")
+MODULE_ID("$Id: lib_print.c,v 1.30 2021/04/18 14:58:57 tom Exp $")
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
 /* ship binary character data to the printer via mc4/mc5/mc5p */
 {
     int result;
 
 NCURSES_EXPORT(int)
 NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len)
 /* ship binary character data to the printer via mc4/mc5/mc5p */
 {
     int result;
-    char *mybuf, *switchon;
+    char *mybuf = NULL, *switchon;
     size_t onsize, offsize;
     size_t need;
 
     size_t onsize, offsize;
     size_t need;
 
index fcb43a442b7aaecdb8d5035c32b68bba12912fb5..eb1c172d5af5fdf8f76da9a14f2cf17827977340 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey                                *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -57,7 +57,7 @@
 #include <sys/types.h>
 #include <tic.h>
 
 #include <sys/types.h>
 #include <tic.h>
 
-MODULE_ID("$Id: read_termcap.c,v 1.98 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: read_termcap.c,v 1.99 2021/04/18 11:43:38 tom Exp $")
 
 #if !PURE_TERMINFO
 
 
 #if !PURE_TERMINFO
 
@@ -1064,14 +1064,16 @@ _nc_read_termcap_entry(const char *const tn, TERMTYPE2 *const tp)
            }
        }
 
            }
        }
 
-#define PRIVATE_CAP "%s/.termcap"
+#define PRIVATE_CAP "%.*s/.termcap"
 
        if (use_terminfo_vars() && (h = getenv("HOME")) != NULL && *h != '\0'
            && (strlen(h) + sizeof(PRIVATE_CAP)) < PATH_MAX) {
            /* user's .termcap, if any, should override it */
            _nc_STRCPY(envhome, h, sizeof(envhome));
            _nc_SPRINTF(pathbuf, _nc_SLIMIT(sizeof(pathbuf))
 
        if (use_terminfo_vars() && (h = getenv("HOME")) != NULL && *h != '\0'
            && (strlen(h) + sizeof(PRIVATE_CAP)) < PATH_MAX) {
            /* user's .termcap, if any, should override it */
            _nc_STRCPY(envhome, h, sizeof(envhome));
            _nc_SPRINTF(pathbuf, _nc_SLIMIT(sizeof(pathbuf))
-                       PRIVATE_CAP, envhome);
+                       PRIVATE_CAP,
+                       (int) (sizeof(pathbuf) - sizeof(PRIVATE_CAP)),
+                       envhome);
            ADD_TC(pathbuf, filecount);
        }
     }
            ADD_TC(pathbuf, filecount);
        }
     }
index 1937d00f58a1a0737b44aa24b789b7965aecd5fe..82e09ba9a51ff8ed93b8cfeb3bcb07961a359cfd 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210417) unstable; urgency=low
+ncurses6 (6.2+20210418) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 17 Apr 2021 06:16:07 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 18 Apr 2021 06:23:11 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 1937d00f58a1a0737b44aa24b789b7965aecd5fe..82e09ba9a51ff8ed93b8cfeb3bcb07961a359cfd 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210417) unstable; urgency=low
+ncurses6 (6.2+20210418) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 17 Apr 2021 06:16:07 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 18 Apr 2021 06:23:11 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 93f56b65c6feecb0b270e4e63dbb690448eebed0..047a2564e94280f5a07845764de73226544315ee 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.2+20210417) unstable; urgency=low
+ncurses6 (6.2+20210418) unstable; urgency=low
 
   * latest weekly patch
 
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 17 Apr 2021 06:16:07 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sun, 18 Apr 2021 06:23:11 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 809f13560f9946469a813f769c7e75819859743a..023ace7b2e852d5c002fabed55bc8be2322c10f0 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.453 2021/04/17 10:16:06 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.454 2021/04/18 10:23:11 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 "2"\r
 !define VERSION_YYYY  "2021"\r
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "2"\r
 !define VERSION_YYYY  "2021"\r
-!define VERSION_MMDD  "0417"\r
+!define VERSION_MMDD  "0418"\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 5617c041c09d91761c7aa9a0695a148640e4646f..0b311c718e0b9a206589093e25a2fcda2fa19a15 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.2
-Release: 20210417
+Release: 20210418
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 1f92c3d46da18c19eee4aee3bf61c796460b7870..8ded1c5784ec4a7ebba9ec4eee22e375fbf11b2b 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.2
-Release: 20210417
+Release: 20210418
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 4eee924c4501029561a7f4e24a6343fdfa1bb7ae..e8c19006db0a889e8ae2900297cd09e8fecbf9f3 100644 (file)
@@ -1,7 +1,7 @@
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
 Summary: Curses library with POSIX thread support.
 Name: ncursest6
 Version: 6.2
-Release: 20210417
+Release: 20210418
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 7206bc1a92882e770fdb484f5ba856f9cc911e59..ca3232da4bdfc377856bc0797ec44ee234ab8e89 100755 (executable)
@@ -1,10 +1,10 @@
 #!/bin/sh
 #!/bin/sh
-# $Id: MKtermsort.sh,v 1.13 2020/02/02 23:34:34 tom Exp $
+# $Id: MKtermsort.sh,v 1.16 2021/04/18 20:12:50 tom Exp $
 #
 # MKtermsort.sh -- generate indirection vectors for the various sort methods
 #
 ##############################################################################
 #
 # MKtermsort.sh -- generate indirection vectors for the various sort methods
 #
 ##############################################################################
-# Copyright 2020 Thomas E. Dickey                                            #
+# Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2015,2017 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # Copyright 1998-2015,2017 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -48,14 +48,25 @@ DATA=${2-../include/Caps}
 
 data=data$$
 trap 'rm -f $data' 1 2 3 15
 
 data=data$$
 trap 'rm -f $data' 1 2 3 15
-sed -e 's/[    ][      ]*/     /g' < $DATA >$data
+sed -e 's/[    ][      ]*/     /g' < "$DATA" >$data
 DATA=$data
 
 DATA=$data
 
-echo "/*";
-echo " * termsort.c --- sort order arrays for use by infocmp.";
-echo " *";
-echo " * Note: this file is generated using MKtermsort.sh, do not edit by hand.";
-echo " */";
+cat <<EOF
+/*
+ * termsort.h --- sort order arrays for use by infocmp.
+ *
+ * Note: this file is generated using MKtermsort.sh, do not edit by hand.
+ */
+#ifndef _TERMSORT_H
+#define _TERMSORT_H 1
+#include <curses.h>
+
+#ifndef DUMP_ENTRY_H
+typedef unsigned PredType;
+typedef unsigned PredIdx;
+#endif
+
+EOF
 
 echo "static const PredIdx bool_terminfo_sort[] = {";
 $AWK <$DATA '
 
 echo "static const PredIdx bool_terminfo_sort[] = {";
 $AWK <$DATA '
@@ -165,7 +176,11 @@ $3 == "str" && substr($7, 1, 1) == "-"        {print "\tFALSE,\t/* ", $2, " */";
 $3 == "str" && substr($7, 1, 1) == "Y"        {print "\tTRUE,\t/* ", $2, " */"; valid = count++; }
 END { printf "#define OK_str_from_termcap %d\n", valid; }
 '
 $3 == "str" && substr($7, 1, 1) == "Y"        {print "\tTRUE,\t/* ", $2, " */"; valid = count++; }
 END { printf "#define OK_str_from_termcap %d\n", valid; }
 '
-echo "};";
-echo "";
+
+cat <<EOF
+};
+
+#endif /* _TERMSORT_H */
+EOF
 
 rm -f $data
 
 rm -f $data
index f2378d991e2fa2f3b005295ecb31515dec568406..e1502ddc34a3bd82d9da0222bdd7c1d3c565ea8b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.109 2021/04/17 15:32:22 tom Exp $
+# $Id: Makefile.in,v 1.110 2021/04/18 11:32:39 tom Exp $
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2016,2018 Free Software Foundation, Inc.                    #
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2016,2018 Free Software Foundation, Inc.                    #
@@ -133,7 +133,7 @@ LINT_OPTS   = @LINT_OPTS@
 LINT_LIBS      = -lncurses @LIBS@
 
 AUTO_SRC = \
 LINT_LIBS      = -lncurses @LIBS@
 
 AUTO_SRC = \
-       termsort.c \
+       termsort.h \
        transform.h
 
 # tic relies on direct access to the terminfo database
        transform.h
 
 # tic relies on direct access to the terminfo database
@@ -292,7 +292,7 @@ DEPS_TSET = \
 tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
        @ECHO_LD@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
 
 tset$x: $(DEPS_TSET) $(DEPS_CURSES) transform.h
        @ECHO_LD@ $(LINK) $(DEPS_TSET) $(LDFLAGS_TINFO) -o $@
 
-termsort.c: $(srcdir)/MKtermsort.sh
+termsort.h: $(srcdir)/MKtermsort.sh
        $(SHELL) $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
 
 #
        $(SHELL) $(srcdir)/MKtermsort.sh $(AWK) $(srcdir)/../include/@TERMINFO_CAPS@ >$@
 
 #
@@ -336,6 +336,17 @@ lint:
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c                           $(LINT_LIBS)
 
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tput.c                           $(LINT_LIBS)
        $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/tset.c                           $(LINT_LIBS)
 
+# Verify that each header-file can be compiled without including another.
+check:
+       @$(SHELL) -c "for header in *.h;\
+               do \
+                       echo \"** testing \$${header}\" ; \
+                       echo \"#include <\$${header}>\" >headers.c; \
+                       echo \"int main(void) { return 0; }\" >>headers.c; \
+                       $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
+               done"
+       -@rm -f headers.*
+
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################
 ###############################################################################
 # The remainder of this file is automatically generated during configuration
 ###############################################################################
index 2bc83ba1f024ef96594b8c8df37be451ef2caaac..dda1b681956a48390cb9413b3b05dd85c603b61f 100644 (file)
 #define __INTERNAL_CAPS_VISIBLE
 #include <progs.priv.h>
 
 #define __INTERNAL_CAPS_VISIBLE
 #include <progs.priv.h>
 
-#include "dump_entry.h"
-#include "termsort.c"          /* this C file is generated */
+#include <dump_entry.h>
+#include <termsort.h>          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
 #include <parametrized.h>      /* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.185 2021/04/17 15:24:04 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.186 2021/04/18 11:33:08 tom Exp $")
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
 
 #define DISCARD(string) string = ABSENT_STRING
 #define PRINTF (void) printf
index 98551914cd63c9f9c3c42a225b0f6b894e4ca775..39e856fb6171dd2560175b8abb6a13f4ff3d91a6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey                                     *
+ * Copyright 2018-2020,2021 Thomas E. Dickey                                *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * Copyright 1998-2016,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
  ****************************************************************************/
 
 /*
- * $Id: dump_entry.h,v 1.43 2020/11/14 18:16:57 tom Exp $
+ * $Id: dump_entry.h,v 1.44 2021/04/18 19:56:09 tom Exp $
  *
  * Dump control definitions and variables
  */
  *
  * Dump control definitions and variables
  */
 #define CMP_STRING     2       /* comparison on strings */
 #define CMP_USE                3       /* comparison on use capabilities */
 
 #define CMP_STRING     2       /* comparison on strings */
 #define CMP_USE                3       /* comparison on use capabilities */
 
+#ifndef _TERMSORT_H
 typedef unsigned PredType;
 typedef unsigned PredIdx;
 typedef unsigned PredType;
 typedef unsigned PredIdx;
+#endif
+
 typedef int (*PredFunc) (PredType, PredIdx);
 typedef void (*PredHook) (PredType, PredIdx, const char *);
 
 typedef int (*PredFunc) (PredType, PredIdx);
 typedef void (*PredHook) (PredType, PredIdx, const char *);
 
index 72662de4cdbdb1a07c380e4e480866d7560465b3..349061ff55429867e0536a028578cd25ca12e2c9 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: modules,v 1.23 2021/04/17 16:05:34 tom Exp $
+# $Id: modules,v 1.25 2021/04/18 17:21:03 tom Exp $
 # Program modules (some are in ncurses lib!)
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Program modules (some are in ncurses lib!)
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
@@ -37,12 +37,12 @@ clear               progs           $(srcdir)       $(HEADER_DEPS) tty_settings.h
 tic            progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h $(srcdir)/tparm_type.h
 toe            progs           $(srcdir)       $(HEADER_DEPS)             $(INCDIR)/hashed_db.h
 clear_cmd      progs           $(srcdir)       $(HEADER_DEPS) clear_cmd.h
 tic            progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/dump_entry.h $(srcdir)/tparm_type.h
 toe            progs           $(srcdir)       $(HEADER_DEPS)             $(INCDIR)/hashed_db.h
 clear_cmd      progs           $(srcdir)       $(HEADER_DEPS) clear_cmd.h
-dump_entry     progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h ../include/parametrized.h $(INCDIR)/capdefaults.c termsort.c
+dump_entry     progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h ../include/parametrized.h $(INCDIR)/capdefaults.c termsort.h
 infocmp                progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h
 reset_cmd      progs           $(srcdir)       $(HEADER_DEPS) reset_cmd.h tty_settings.h
 tabs           progs           $(srcdir)       $(HEADER_DEPS)
 tparm_type     progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/tparm_type.h
 infocmp                progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/dump_entry.h
 reset_cmd      progs           $(srcdir)       $(HEADER_DEPS) reset_cmd.h tty_settings.h
 tabs           progs           $(srcdir)       $(HEADER_DEPS)
 tparm_type     progs           $(srcdir)       $(HEADER_DEPS)             $(srcdir)/tparm_type.h
-tput           progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/tparm_type.h termsort.c reset_cmd.h tty_settings.h
+tput           progs           $(srcdir)       $(HEADER_DEPS) transform.h $(srcdir)/tparm_type.h reset_cmd.h tty_settings.h
 tset           progs           $(srcdir)       $(HEADER_DEPS) transform.h ../include/termcap.h reset_cmd.h  tty_settings.h
 transform      progs           $(srcdir)       $(HEADER_DEPS) transform.h
 tty_settings   progs           $(srcdir)       $(HEADER_DEPS) tty_settings.h
 tset           progs           $(srcdir)       $(HEADER_DEPS) transform.h ../include/termcap.h reset_cmd.h  tty_settings.h
 transform      progs           $(srcdir)       $(HEADER_DEPS) transform.h
 tty_settings   progs           $(srcdir)       $(HEADER_DEPS) tty_settings.h
index 94539251382b55800f81c4f107bc8aa2ee7658c2..027fab9c8fbbe9f465477443788fdeae77c8fc1b 100644 (file)
 #include <clear_cmd.h>
 #include <reset_cmd.h>
 
 #include <clear_cmd.h>
 #include <reset_cmd.h>
 
-#if !PURE_TERMINFO
-#include <termsort.c>
-#endif
 #include <transform.h>
 #include <tty_settings.h>
 
 #include <transform.h>
 #include <tty_settings.h>
 
-MODULE_ID("$Id: tput.c,v 1.88 2021/04/17 15:34:16 tom Exp $")
+MODULE_ID("$Id: tput.c,v 1.90 2021/04/18 17:18:19 tom Exp $")
 
 #define PUTS(s)                fputs(s, stdout)
 
 
 #define PUTS(s)                fputs(s, stdout)
 
index b511d71a213e58dff1e173670d87f030002c1a4a..e6edb9a691e33500c00fea7b122b795ee7e4fddb 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.126 2021/03/13 20:55:43 tom Exp $
+# $Id: Makefile.in,v 1.127 2021/04/18 11:48:06 tom Exp $
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2017,2018 Free Software Foundation, Inc.                    #
 ##############################################################################
 # Copyright 2020,2021 Thomas E. Dickey                                       #
 # Copyright 1998-2017,2018 Free Software Foundation, Inc.                    #
@@ -153,4 +153,15 @@ HEADER_DEPS        = \
        $(incdir)/unctrl.h \
        $(INCDIR)/nc_alloc.h
 
        $(incdir)/unctrl.h \
        $(INCDIR)/nc_alloc.h
 
+# Verify that each header-file can be compiled without including another.
+check::
+       @$(SHELL) -c "for header in *.h;\
+               do \
+                       echo \"** testing \$${header}\" ; \
+                       echo \"#include <\$${header}>\" >headers.c; \
+                       echo \"int main(void) { return 0; }\" >>headers.c; \
+                       $(CC) -c $(CFLAGS) $(CPPFLAGS) headers.c; \
+               done"
+       -@rm -f headers.*
+
 # The rest is generated from the "programs" and "modules" files...
 # The rest is generated from the "programs" and "modules" files...
index ac4203aaac56a3d4b10d7f2b61123cce167c1c9c..25b3738111c30cbaa4a45f045c69eb804e5c0bfd 100644 (file)
@@ -1,6 +1,6 @@
-# $Id: mk-test.awk,v 1.23 2020/02/02 23:34:34 tom Exp $
+# $Id: mk-test.awk,v 1.24 2021/04/18 11:49:55 tom Exp $
 ##############################################################################
 ##############################################################################
-# Copyright 2019,2020 Thomas E. Dickey                                       #
+# Copyright 2019-2020,2021 Thomas E. Dickey                                  #
 # Copyright 2006-2017,2018 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
 # Copyright 2006-2017,2018 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -81,7 +81,7 @@ END   {
        print   ""
        print   "sources:"
        print   ""
        print   ""
        print   "sources:"
        print   ""
-       print   "check:"
+       print   "check::"
        print   "       @ echo The test-programs are interactive"
        print   "tags:"
        print   "       $(CTAGS) *.[ch]"
        print   "       @ echo The test-programs are interactive"
        print   "tags:"
        print   "       $(CTAGS) *.[ch]"