ncurses 6.0 - patch 20150711
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Jul 2015 01:32:50 +0000 (01:32 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 12 Jul 2015 01:32:50 +0000 (01:32 +0000)
+ modify scripts to build/use test-packages for the pthreads
  configuration of ncurses6.
+ add references to ttytype and termcap symbols in demo_terminfo.c and
  demo_termcap.c to ensure that when building ncursest.map, etc., that
  the corresponding names such as _nc_ttytype are added to the list of
  versioned symbols (report by Werner Fink)
+ fix regression from 20150704 (report/patch by Werner Fink).

20 files changed:
NEWS
VERSION
dist.mk
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/debian/control
package/debian/rules
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
package/ncursest.map
package/ncursest.sym
package/ncursestw.map
package/ncursestw.sym
progs/dump_entry.c
test/demo_termcap.c
test/demo_terminfo.c
test/package/debian/control
test/package/debian/rules

diff --git a/NEWS b/NEWS
index 25963a851e19ac791eac87e1809fec2d7dcc2293..eebc208119fe238d1ea3d4ae5dc54649b7757f4c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,7 +25,7 @@
 -- sale, use or other dealings in this Software without prior written        --
 -- authorization.                                                            --
 -------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2451 2015/07/04 21:01:57 tom Exp $
+-- $Id: NEWS,v 1.2455 2015/07/11 22:54:54 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,15 @@ 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.
 
+20150711
+       + modify scripts to build/use test-packages for the pthreads
+         configuration of ncurses6.
+       + add references to ttytype and termcap symbols in demo_terminfo.c and
+         demo_termcap.c to ensure that when building ncursest.map, etc., that
+         the corresponding names such as _nc_ttytype are added to the list of
+         versioned symbols (report by Werner Fink)
+       + fix regression from 20150704 (report/patch by Werner Fink).
+
 20150704
        + fix a few problems reported by Coverity.
        + fix comparison against "/usr/include" in misc/gen-pkgconfig.in
diff --git a/VERSION b/VERSION
index 1052e27e79a279024e3a207724ca235fa6288f33..cbc4b9a3e8e9fd4cfd2fc2337759cbdfb375d942 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:9  6.0     20150704
+5:0:9  6.0     20150711
diff --git a/dist.mk b/dist.mk
index 4ebae2ed910c3224648d2eee73768599c6c8eca3..ea942e8ddaf262efea882f21c348302bc7d71c5b 100644 (file)
--- 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.1058 2015/07/03 23:28:48 tom Exp $
+# $Id: dist.mk,v 1.1059 2015/07/07 08:04:53 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 = 0
-NCURSES_PATCH = 20150704
+NCURSES_PATCH = 20150711
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 7a38e3ee0009880b90910bded1713f576976a385..df3bf6daee719d1e3b63b5674ccaaff73661fa5c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20150704) unstable; urgency=low
+ncurses6 (6.0+20150711) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 03 Jul 2015 19:28:49 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 07 Jul 2015 04:04:53 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 7a38e3ee0009880b90910bded1713f576976a385..df3bf6daee719d1e3b63b5674ccaaff73661fa5c 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20150704) unstable; urgency=low
+ncurses6 (6.0+20150711) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 03 Jul 2015 19:28:49 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 07 Jul 2015 04:04:53 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index c1a26a319ea1b6ad3e740e508a9692b1e3beaa69..21412223a9c368611dc45b53f1aca05b39b50613 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.0+20150704) unstable; urgency=low
+ncurses6 (6.0+20150711) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Fri, 03 Jul 2015 19:28:48 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Tue, 07 Jul 2015 04:04:53 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 8f80f25c78c1b905074dc68b675bca66bbbc09b9..4c6e82c28875c1b896fbf36667b6bc3f17ae5289 100644 (file)
@@ -14,3 +14,12 @@ Description: shared libraries for terminal handling
  updating character screens with reasonable optimization.
  .
  This package is used for testing ABI 6.
+
+Package: ncursest6
+Architecture: any
+Depends: ${misc:Depends}
+Description: shared libraries for terminal handling
+ The ncurses library routines are a terminal-independent method of
+ updating character screens with reasonable optimization.
+ .
+ This package is used for testing ABI 6 with pthreads.
index 83d99d35152a70555f4b8417dec5f17c71270b3d..e77fd692224b230ff9f34e7bd5568c32b7875017 100644 (file)
@@ -6,6 +6,10 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# packages
+PACKAGES.indep = # ncurses6-docs
+PACKAGES.arch  = ncurses6 ncursest6
+
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -17,7 +21,8 @@ CC_STRICT = $(CC_NORMAL) -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissi
 MY_ABI=6
 MY_DIR=/usr
 MYDATA=/usr/local/ncurses/share/terminfo
-BUILD_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
+NORMAL_DIR=$(CURDIR)/debian/ncurses$(MY_ABI)
+THREAD_DIR=$(CURDIR)/debian/ncursest$(MY_ABI)
 
 CFLAGS   = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL)
 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
@@ -40,15 +45,13 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
         INSTALL_PROGRAM += -s
 endif
 
+verbose = # -v
 
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-
+configure = \
        $(RPATH_ENV) \
        CFLAGS="$(CFLAGS)" \
        CPPFLAGS="$(CPPFLAGS)" \
-       LDFLAGS="$(LDFLAGS)" ./configure $(RPATH_OPT) \
+       LDFLAGS="$(LDFLAGS)" ../../configure $(RPATH_OPT) \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=$(MY_DIR) \
@@ -81,58 +84,124 @@ configure-stamp:
                --without-debug \
                --without-normal
 
-       touch configure-stamp
+NCURSES6_DIR = $(CURDIR)/debian/ncurses6
+NCURSEST6_DIR = $(CURDIR)/debian/ncursest6
+
+.PHONY: all config build install binary clean config-indep config-arch \
+    build-indep build-arch install-indep install-arch binary-indep \
+    binary-arch
 
-build: build-stamp
-build-stamp: configure-stamp
+all: build
+
+config: config-indep config-arch
+build: build-indep build-arch
+install: install-indep install-arch
+binary: binary-indep binary-arch
+clean:
        dh_testdir
+       dh_testroot
+       dh_clean $(verbose)
+       rm -rf t
 
-       $(MAKE)
+config-indep: $(PACKAGES.indep:%=config-%-stamp)
+config-arch: $(PACKAGES.arch:%=config-%-stamp)
 
-       touch build-stamp
+build-indep: $(PACKAGES.indep:%=build-%-stamp)
+build-arch: $(PACKAGES.arch:%=build-%-stamp)
 
-clean:
+install-indep: $(PACKAGES.indep:%=install-%-stamp)
+install-arch: $(PACKAGES.arch:%=install-%-stamp)
+
+config-ncurses6-stamp:
+       dh_testdir
+       rm -rf t/ncurses6
+       mkdir -p t/ncurses6
+       cd t/ncurses6; $(configure)
+       touch $@
+
+config-ncursest6-stamp:
+       dh_testdir
+       rm -rf t/ncursest6
+       mkdir -p t/ncursest6
+       cd t/ncursest6; $(configure) \
+               --enable-interop \
+               --enable-sp-funcs \
+               --program-suffix=t$(MY_ABI) \
+               --with-pthread
+       touch $@
+
+build-ncurses6-stamp: config-ncurses6-stamp
+       dh_testdir
+
+       $(MAKE) -C t/ncurses6
+
+       touch $@
+
+build-ncursest6-stamp: config-ncursest6-stamp
+       dh_testdir
+
+       $(MAKE) -C t/ncursest6
+
+       touch $@
+
+install-ncurses6-stamp: build-ncurses6-stamp
        dh_testdir
        dh_testroot
+       dh_installdirs $(verbose)
+       dh_prep        $(verbose) -pncurses6
 
-       [ ! -f makefile ] || $(MAKE) distclean
+       $(MAKE) -C t/ncurses6 install.libs install.progs DESTDIR=$(NCURSES6_DIR)
+       $(MAKE) -C t/ncurses6/test ncurses LOCAL_LIBDIR=$(MY_DIR)/lib
 
-       rm -f configure-stamp build-stamp install-stamp
+       mv t/ncurses6/test/ncurses $(NCURSES6_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
 
-       dh_clean
+       touch $@
 
-install: install-stamp
-install-stamp: build-stamp
+install-ncursest6-stamp: build-ncursest6-stamp
        dh_testdir
        dh_testroot
-       dh_clean -k
-       dh_installdirs
+       dh_installdirs $(verbose)
+       dh_prep        $(verbose) -pncursest6
 
-       $(MAKE) install.libs install.progs DESTDIR=$(BUILD_DIR)
+       $(MAKE) -C t/ncursest6 install.libs install.progs DESTDIR=$(NCURSEST6_DIR)
+       $(MAKE) -C t/ncursest6/test ncurses LOCAL_LIBDIR=$(MY_DIR)/lib
 
-       ( cd test && make ncurses LOCAL_LIBDIR=$(MY_DIR)/lib )
-       mv test/ncurses $(BUILD_DIR)$(MY_DIR)/bin/ncurses$(MY_ABI)
+       mv t/ncursest6/test/ncurses $(NCURSEST6_DIR)$(MY_DIR)/bin/ncursest$(MY_ABI)
 
-       touch install-stamp
+       touch $@
 
 # Build architecture-independent files here.
-binary-indep: build install
-# No binary-indep target.
+binary-indep: install-indep
+ifneq ($(PACKAGES.indep),)
+       rm -f $(PACKAGES.indep:%=install-%-stamp)
+       dh_testdir
+       dh_testroot
+       dh_installdocs       $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installman        $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installexamples   $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installchangelogs $(verbose) $(PACKAGES.indep:%=-p%) NEWS
+       dh_compress          $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_fixperms          $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installdeb        $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_gencontrol        $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_md5sums           $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_builddeb          $(verbose) $(PACKAGES.indep:%=-p%)
+endif
 
 # Build architecture-dependent files here.
-binary-arch: build install
+binary-arch: install-arch
+ifneq ($(PACKAGES.arch),)
+       rm -f $(PACKAGES.arch:%=install-%-stamp)
        dh_testdir
        dh_testroot
-       dh_installchangelogs NEWS
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_makeshlibs
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install install-stamp
+       dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%)  NEWS
+       dh_strip             $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_compress          $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_fixperms          $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_installdeb        $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_makeshlibs        $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_shlibdeps         $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_gencontrol        $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_md5sums           $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_builddeb          $(verbose) $(PACKAGES.arch:%=-p%)
+endif
index 8986cb2b382d1f43032c853987649b586b3759c8..32775ef5f8fea40a73104af39e68b5536a843a0c 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.111 2015/07/03 23:28:48 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.112 2015/07/07 08:04:53 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "6"\r
 !define VERSION_MINOR "0"\r
 !define VERSION_YYYY  "2015"\r
-!define VERSION_MMDD  "0704"\r
+!define VERSION_MMDD  "0711"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index ac0bc931d1da6d6946eed937c53b4c63f76c3c69..d20e04b027838e99013b957b11a13cda4239fbd8 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.0
-Release: 20150704
+Release: 20150711
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 84d45badfe7e3425491d6d8d940d14932f154800..9e760ef7046865f8c5dce71f6e3d67d4fa2c5a65 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.0
-Release: 20150704
+Release: 20150711
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index eabdf0281af8cb24311ea33817a0ec8377383bcf..766b80dfcb9bd3e77f246dc0040d742de11ce43d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursest.map,v 1.29 2015/06/27 22:23:14 tom Exp $
+# $Id: ncursest.map,v 1.30 2015/07/11 13:01:10 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -362,13 +362,13 @@ NCURSES_TINFO_5.7.20081102 {
                _nc_strfnames;
                _nc_strnames;
                _nc_tracechar;
+               _nc_ttytype;
                _nc_use_tracef;
                set_tabsize;
        local:
                _nc__nc_tputs_trace;
                _nc_keyname;
                _nc_mutex_init;
-               _nc_ttytype;
                _nc_unctrl;
 } NCURSES_TINFO_5.6.20061217;
 
index 498f07a1b15517202b36fd55b41bcc10e7e4182c..4c2f2092b0324322edda383a06739b8286bf5aff 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursest.sym,v 1.24 2015/06/27 22:30:00 tom Exp $
+# $Id: ncursest.sym,v 1.25 2015/07/11 23:33:50 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -222,6 +222,7 @@ _nc_tracechar
 _nc_tracing
 _nc_trans_string
 _nc_trim_sgr0
+_nc_ttytype
 _nc_unicode_locale
 _nc_update_screensize
 _nc_use_tracef
index a2be0f7a3f01334f90bb19ccf4cd59b532a59efc..7e6789bfdd7dcb81d77577e9bb24381746642500 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursestw.map,v 1.30 2015/06/27 22:27:57 tom Exp $
+# $Id: ncursestw.map,v 1.31 2015/07/11 13:02:44 tom Exp $
 # script for shared library symbol-versioning using ld
 #
 # This file was generated by ncu-mapsyms
@@ -362,6 +362,7 @@ NCURSES_TINFO_5.7.20081102 {
                _nc_strfnames;
                _nc_strnames;
                _nc_tracechar;
+               _nc_ttytype;
                _nc_use_tracef;
                _nc_viswbuf;
                _nc_viswbufn;
@@ -373,7 +374,6 @@ NCURSES_TINFO_5.7.20081102 {
                _nc__nc_tputs_trace;
                _nc_keyname;
                _nc_mutex_init;
-               _nc_ttytype;
                _nc_unctrl;
                _nc_viswbuf2;
 } NCURSES_TINFO_5.6.20061217;
index 717ca864b0dd883323136af8a5a33a8a1c701e66..a175653140395d1f8a64b21c719ea73c2af0f14f 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: ncursestw.sym,v 1.22 2015/06/27 22:29:28 tom Exp $
+# $Id: ncursestw.sym,v 1.23 2015/07/11 23:33:35 tom Exp $
 # script for shared library symbol-visibility using libtool
 #
 # This file was generated by ncu-mapsyms
@@ -222,6 +222,7 @@ _nc_tracechar
 _nc_tracing
 _nc_trans_string
 _nc_trim_sgr0
+_nc_ttytype
 _nc_unicode_locale
 _nc_update_screensize
 _nc_use_tracef
index f8b4c22e9f816b47ac3a414751b043327805d3bb..d59a925d55110a41c4df66c8fe5de65ba8e3b369 100644 (file)
@@ -39,7 +39,7 @@
 #include "termsort.c"          /* this C file is generated */
 #include <parametrized.h>      /* so is this */
 
-MODULE_ID("$Id: dump_entry.c,v 1.117 2015/07/05 00:01:04 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.118 2015/07/07 08:06:39 Werner.Fink Exp $")
 
 #define INDENT                 8
 #define DISCARD(string) string = ABSENT_STRING
@@ -778,8 +778,10 @@ fmt_entry(TERMTYPE *tterm,
                    trimmed_sgr0 = _nc_trim_sgr0(tterm);
                    if (strcmp(capability, trimmed_sgr0))
                        capability = trimmed_sgr0;
-                   else
-                       free(trimmed_sgr0);
+                   else {
+                       if (trimmed_sgr0 != exit_attribute_mode)
+                           free(trimmed_sgr0);
+                   }
 
                    set_attributes = my_sgr;
                }
index 2a29266f6bb50ef3b6fe0eff0a4776e9a4c33243..17ff3f373902ff1d1eaeb974ceb01bced11e81f6 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2005-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 2005-2014,2015 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            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: demo_termcap.c,v 1.46 2014/10/10 00:35:43 tom Exp $
+ * $Id: demo_termcap.c,v 1.47 2015/07/10 23:36:16 tom Exp $
  *
  * A simple demo of the termcap interface.
  */
 #endif
 #endif
 
+#ifdef NCURSES_VERSION
+#include <termcap.h>
+#endif
+
 static void
 failed(const char *msg)
 {
@@ -162,6 +166,72 @@ free_dblist(void)
     }
 }
 
+static void
+show_string(const char *name, const char *value)
+{
+    printf(FNAME(str), name);
+    if (value == ((char *) -1)) {
+       printf("CANCELLED");
+    } else if (value == ((char *) 0)) {
+       printf("ABSENT");
+    } else {
+       while (*value != 0) {
+           int ch = UChar(*value++);
+           switch (ch) {
+           case '\177':
+               fputs("^?", stdout);
+               break;
+           case '\033':
+               fputs("\\E", stdout);
+               break;
+           case '\b':
+               fputs("\\b", stdout);
+               break;
+           case '\f':
+               fputs("\\f", stdout);
+               break;
+           case '\n':
+               fputs("\\n", stdout);
+               break;
+           case '\r':
+               fputs("\\r", stdout);
+               break;
+           case ' ':
+               fputs("\\s", stdout);
+               break;
+           case '\t':
+               fputs("\\t", stdout);
+               break;
+           case '^':
+               fputs("\\^", stdout);
+               break;
+           case ':':
+               fputs("\\072", stdout);
+               break;
+           case '\\':
+               fputs("\\\\", stdout);
+               break;
+           default:
+               if (isgraph(ch))
+                   fputc(ch, stdout);
+               else if (ch < 32)
+                   printf("^%c", ch + '@');
+               else
+                   printf("\\%03o", ch);
+               break;
+           }
+       }
+    }
+    printf("\n");
+}
+
+static void
+show_number(const char *name, int value)
+{
+    printf(FNAME(num), name);
+    printf(" %d\n", value);
+}
+
 static void
 dumpit(NCURSES_CONST char *cap)
 {
@@ -184,61 +254,13 @@ dumpit(NCURSES_CONST char *cap)
             * Note that the strings returned are mostly terminfo format, since
             * ncurses does not convert except for a handful of special cases.
             */
-           printf(FNAME(str), cap);
-           while (*str != 0) {
-               int ch = UChar(*str++);
-               switch (ch) {
-               case '\177':
-                   fputs("^?", stdout);
-                   break;
-               case '\033':
-                   fputs("\\E", stdout);
-                   break;
-               case '\b':
-                   fputs("\\b", stdout);
-                   break;
-               case '\f':
-                   fputs("\\f", stdout);
-                   break;
-               case '\n':
-                   fputs("\\n", stdout);
-                   break;
-               case '\r':
-                   fputs("\\r", stdout);
-                   break;
-               case ' ':
-                   fputs("\\s", stdout);
-                   break;
-               case '\t':
-                   fputs("\\t", stdout);
-                   break;
-               case '^':
-                   fputs("\\^", stdout);
-                   break;
-               case ':':
-                   fputs("\\072", stdout);
-                   break;
-               case '\\':
-                   fputs("\\\\", stdout);
-                   break;
-               default:
-                   if (isgraph(ch))
-                       fputc(ch, stdout);
-                   else if (ch < 32)
-                       printf("^%c", ch + '@');
-                   else
-                       printf("\\%03o", ch);
-                   break;
-               }
-           }
-           printf("\n");
+           show_string(cap, str);
        }
     } else if ((num = tgetnum(cap)) >= 0) {
        total_values++;
        total_n_values++;
        if (!q_opt) {
-           printf(FNAME(num), cap);
-           printf(" %d\n", num);
+           show_number(cap, num);
        }
     } else if (tgetflag(cap) > 0) {
        total_values++;
@@ -712,6 +734,7 @@ usage(void)
        " -q       quiet (prints only counts)",
        " -r COUNT repeat for given count",
        " -s       print string-capabilities",
+       " -v       print termcap-variables",
 #ifdef NCURSES_VERSION
        " -x       print extended capabilities",
 #endif
@@ -729,12 +752,13 @@ main(int argc, char *argv[])
     int n;
     char *name;
     bool a_opt = FALSE;
+    bool v_opt = FALSE;
     char *input_name = 0;
 
     int repeat;
     int r_opt = 1;
 
-    while ((n = getopt(argc, argv, "abd:e:i:nqr:sxy")) != -1) {
+    while ((n = getopt(argc, argv, "abd:e:i:nqr:svxy")) != -1) {
        switch (n) {
        case 'a':
            a_opt = TRUE;
@@ -764,6 +788,9 @@ main(int argc, char *argv[])
        case 's':
            s_opt = TRUE;
            break;
+       case 'v':
+           v_opt = TRUE;
+           break;
 #if NCURSES_XNAMES
        case 'x':
            x_opt = TRUE;
@@ -836,6 +863,13 @@ main(int argc, char *argv[])
     printf("%ld values (%ld booleans, %ld numbers, %ld strings)\n",
           total_values, total_b_values, total_n_values, total_s_values);
 
+    if (v_opt) {
+       show_number("PC", PC);
+       show_string("UP", UP);
+       show_string("BC", BC);
+       show_number("ospeed", ospeed);
+    }
+
     free_dblist();
 
     ExitProgram(EXIT_SUCCESS);
index 3b44a0bbcff445018a4f344ada172e4a1a138481..8e6ae1ca63fdd07e89eb992b45f12f1970efef4c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2009-2013,2014 Free Software Foundation, Inc.              *
+ * Copyright (c) 2009-2014,2015 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            *
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: demo_terminfo.c,v 1.38 2014/10/10 00:35:28 tom Exp $
+ * $Id: demo_terminfo.c,v 1.39 2015/07/10 23:45:44 tom Exp $
  *
  * A simple demo of the terminfo interface.
  */
@@ -266,6 +266,10 @@ abcdefghijklmnopqrstuvwxyz_";
     if (!q_opt)
        printf("Terminal type \"%s\"\n", name);
     setupterm((NCURSES_CONST char *) name, 1, (int *) 0);
+    if (!q_opt) {
+       if (strcmp(name, ttytype))
+           printf("... actual \"%s\"\n", ttytype);
+    }
 
     for (length = 1; length <= MAX_FORCE; ++length) {
        /* set all digits to zeros */
index 520ad422ee93bf135018c6eb838fc74033b6b98b..f4cc43a3af5ab66aca538cb8bc4bee74721ccdf9 100644 (file)
@@ -14,3 +14,13 @@ Description: ncurses-examples - example/test programs from ncurses
  .
  This package installs in "bin/ncurses-examples" to avoid conflict with other
  packages.
+
+Package: ncursest-examples
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: ncurses-examples - example/test programs from ncurses
+ These are the example/test programs from the ncurses distribution, using
+ the thread configuration.
+ .
+ This package installs in "bin/ncursest-examples" to avoid conflict with other
+ packages.
index 8079b19301b4400f71df69576274ffb860f0f6f7..bed7a82a76cc7c8f090efe83436be64857d04476 100644 (file)
@@ -6,6 +6,13 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# packages
+NCURSES_PKG = ncurses-examples
+NCURSEST_PKG = ncursest-examples
+
+PACKAGES.indep = # ncurses-examples-docs
+PACKAGES.arch  = $(NCURSES_PKG) $(NCURSEST_PKG)
+
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -22,69 +29,130 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
         INSTALL_PROGRAM += -s
 endif
 
+verbose = # -v
 
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-
-       CFLAGS="$(CFLAGS)" ./configure \
+configure = \
+       CFLAGS="$(CFLAGS)" ../../configure \
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
-               --bindir=\$${prefix}/bin/ncurses-examples \
                --prefix=/usr \
-               --with-screen=ncursesw6 \
                --disable-rpath-hack
 
-       touch configure-stamp
+.PHONY: all config build install binary clean config-indep config-arch \
+    build-indep build-arch install-indep install-arch binary-indep \
+    binary-arch
+
+all: build
 
-build: build-stamp
-build-stamp: configure-stamp
+config: config-indep config-arch
+build: build-indep build-arch
+install: install-indep install-arch
+binary: binary-indep binary-arch
+clean:
        dh_testdir
+       dh_testroot
+       dh_clean $(verbose)
+       rm -rf t
 
-       $(MAKE)
+config-indep: $(PACKAGES.indep:%=config-%-stamp)
+config-arch: $(PACKAGES.arch:%=config-%-stamp)
 
-       touch build-stamp
+build-indep: $(PACKAGES.indep:%=build-%-stamp)
+build-arch: $(PACKAGES.arch:%=build-%-stamp)
 
-clean:
+install-indep: $(PACKAGES.indep:%=install-%-stamp)
+install-arch: $(PACKAGES.arch:%=install-%-stamp)
+
+config-$(NCURSES_PKG)-stamp:
        dh_testdir
-       dh_testroot
 
-       [ ! -f makefile ] || $(MAKE) distclean
+       rm -rf t/ncurses6
+       mkdir -p t/ncurses6
 
-       rm -f configure-stamp build-stamp install-stamp
+       cd t/ncurses6; $(configure) \
+               --bindir=\$${prefix}/bin/$(NCURSES_PKG) \
+               --with-screen=ncursesw6
 
-       dh_clean
+       touch $@
 
-install: install-stamp
-install-stamp: build-stamp
+config-$(NCURSEST_PKG)-stamp:
+       dh_testdir
+
+       rm -rf t/ncursest6
+       mkdir -p t/ncursest6
+
+       cd t/ncursest6; $(configure) \
+               --bindir=\$${prefix}/bin/$(NCURSEST_PKG) \
+               --with-screen=ncursestw6
+
+       touch $@
+
+build-$(NCURSES_PKG)-stamp: config-$(NCURSES_PKG)-stamp
+       dh_testdir
+
+       $(MAKE) -C t/ncurses6
+
+       touch $@
+
+build-$(NCURSEST_PKG)-stamp: config-$(NCURSEST_PKG)-stamp
+       dh_testdir
+
+       $(MAKE) -C t/ncursest6
+
+       touch $@
+
+install-$(NCURSES_PKG)-stamp: build-$(NCURSES_PKG)-stamp
        dh_testdir
        dh_testroot
-       dh_clean -k
-       dh_installdirs
+       dh_installdirs $(verbose)
+       dh_prep        $(verbose) -p$(NCURSES_PKG)
+
+       $(MAKE) -C t/ncurses6 install DESTDIR=$(CURDIR)/debian/$(NCURSES_PKG)
 
-       $(MAKE) install DESTDIR=$(CURDIR)/debian/ncurses-examples
+       touch $@
 
-       touch install-stamp
+install-$(NCURSEST_PKG)-stamp: build-$(NCURSEST_PKG)-stamp
+       dh_testdir
+       dh_testroot
+       dh_installdirs $(verbose)
+       dh_prep        $(verbose) -p$(NCURSEST_PKG)
+
+       $(MAKE) -C t/ncursest6 install DESTDIR=$(CURDIR)/debian/$(NCURSEST_PKG)
+
+       touch $@
 
 # Build architecture-independent files here.
-binary-indep: build install
-# No binary-indep target.
+binary-indep: install-indep
+ifneq ($(PACKAGES.indep),)
+       rm -f $(PACKAGES.indep:%=install-%-stamp)
+       dh_testdir
+       dh_testroot
+       dh_installdocs       $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installman        $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installexamples   $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installchangelogs $(verbose) $(PACKAGES.indep:%=-p%) NEWS
+       dh_compress          $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_fixperms          $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_installdeb        $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_gencontrol        $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_md5sums           $(verbose) $(PACKAGES.indep:%=-p%)
+       dh_builddeb          $(verbose) $(PACKAGES.indep:%=-p%)
+endif
 
 # Build architecture-dependent files here.
-binary-arch: build install
+binary-arch: install-arch
+ifneq ($(PACKAGES.arch),)
+       rm -f $(PACKAGES.arch:%=install-%-stamp)
        dh_testdir
        dh_testroot
-       dh_installdocs
-       dh_installexamples
-       dh_installchangelogs NEWS
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install install-stamp
+       dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%)  NEWS
+       dh_strip             $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_compress          $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_fixperms          $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_installdeb        $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_makeshlibs        $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_shlibdeps         $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_gencontrol        $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_md5sums           $(verbose) $(PACKAGES.arch:%=-p%)
+       dh_builddeb          $(verbose) $(PACKAGES.arch:%=-p%)
+endif