From c99e3eba2cce1c3bd7fa1b4a2eb4554e52ebe264 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 12 Jul 2015 01:32:50 +0000 Subject: [PATCH] ncurses 6.0 - patch 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). --- NEWS | 11 ++- VERSION | 2 +- dist.mk | 4 +- package/debian-mingw/changelog | 4 +- package/debian-mingw64/changelog | 4 +- package/debian/changelog | 4 +- package/debian/control | 9 ++ package/debian/rules | 147 ++++++++++++++++++++++-------- package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.map | 4 +- package/ncursest.sym | 3 +- package/ncursestw.map | 4 +- package/ncursestw.sym | 3 +- progs/dump_entry.c | 8 +- test/demo_termcap.c | 140 ++++++++++++++++++----------- test/demo_terminfo.c | 8 +- test/package/debian/control | 10 +++ test/package/debian/rules | 148 ++++++++++++++++++++++--------- 20 files changed, 364 insertions(+), 157 deletions(-) diff --git a/NEWS b/NEWS index 25963a85..eebc2081 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.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 1052e27e..cbc4b9a3 100644 --- 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 4ebae2ed..ea942e8d 100644 --- a/dist.mk +++ b/dist.mk @@ -25,7 +25,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.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) diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index 7a38e3ee..df3bf6da 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.0+20150704) unstable; urgency=low +ncurses6 (6.0+20150711) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Fri, 03 Jul 2015 19:28:49 -0400 + -- Thomas E. Dickey Tue, 07 Jul 2015 04:04:53 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 7a38e3ee..df3bf6da 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.0+20150704) unstable; urgency=low +ncurses6 (6.0+20150711) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Fri, 03 Jul 2015 19:28:49 -0400 + -- Thomas E. Dickey Tue, 07 Jul 2015 04:04:53 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index c1a26a31..21412223 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.0+20150704) unstable; urgency=low +ncurses6 (6.0+20150711) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Fri, 03 Jul 2015 19:28:48 -0400 + -- Thomas E. Dickey Tue, 07 Jul 2015 04:04:53 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/debian/control b/package/debian/control index 8f80f25c..4c6e82c2 100644 --- a/package/debian/control +++ b/package/debian/control @@ -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. diff --git a/package/debian/rules b/package/debian/rules index 83d99d35..e77fd692 100644 --- a/package/debian/rules +++ b/package/debian/rules @@ -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 diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 8986cb2b..32775ef5 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.111 2015/07/03 23:28:48 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.112 2015/07/07 08:04:53 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "0" !define VERSION_YYYY "2015" -!define VERSION_MMDD "0704" +!define VERSION_MMDD "0711" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index ac0bc931..d20e04b0 100644 --- a/package/mingw-ncurses.spec +++ b/package/mingw-ncurses.spec @@ -3,7 +3,7 @@ Summary: shared libraries for terminal handling Name: mingw32-ncurses6 Version: 6.0 -Release: 20150704 +Release: 20150711 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index 84d45bad..9e760ef7 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -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 diff --git a/package/ncursest.map b/package/ncursest.map index eabdf028..766b80df 100644 --- a/package/ncursest.map +++ b/package/ncursest.map @@ -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; diff --git a/package/ncursest.sym b/package/ncursest.sym index 498f07a1..4c2f2092 100644 --- a/package/ncursest.sym +++ b/package/ncursest.sym @@ -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 diff --git a/package/ncursestw.map b/package/ncursestw.map index a2be0f7a..7e6789bf 100644 --- a/package/ncursestw.map +++ b/package/ncursestw.map @@ -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; diff --git a/package/ncursestw.sym b/package/ncursestw.sym index 717ca864..a1756531 100644 --- a/package/ncursestw.sym +++ b/package/ncursestw.sym @@ -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 diff --git a/progs/dump_entry.c b/progs/dump_entry.c index f8b4c22e..d59a925d 100644 --- a/progs/dump_entry.c +++ b/progs/dump_entry.c @@ -39,7 +39,7 @@ #include "termsort.c" /* this C file is generated */ #include /* 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; } diff --git a/test/demo_termcap.c b/test/demo_termcap.c index 2a29266f..17ff3f37 100644 --- a/test/demo_termcap.c +++ b/test/demo_termcap.c @@ -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. */ @@ -46,6 +46,10 @@ #endif #endif +#ifdef NCURSES_VERSION +#include +#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); diff --git a/test/demo_terminfo.c b/test/demo_terminfo.c index 3b44a0bb..8e6ae1ca 100644 --- a/test/demo_terminfo.c +++ b/test/demo_terminfo.c @@ -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 */ diff --git a/test/package/debian/control b/test/package/debian/control index 520ad422..f4cc43a3 100644 --- a/test/package/debian/control +++ b/test/package/debian/control @@ -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. diff --git a/test/package/debian/rules b/test/package/debian/rules index 8079b193..bed7a82a 100644 --- a/test/package/debian/rules +++ b/test/package/debian/rules @@ -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 -- 2.44.0