From a2016785091d241ca289fbac5b40bfc7f0432737 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 16 Jul 2017 00:53:16 +0000 Subject: [PATCH] ncurses 6.0 - patch 20170715 + modify command-line parameters for "convert" used in picsmap to work with ImageMagick 6.8 and newer. + fix build-problem with tack and ABI-5 (Debian #868328). + repair termcap-format from tic/infocmp broken in 20170701 fixes (Debian #868266). + reformat terminfo.src with 20170513 updates. + improve test-packages to address lintian warnings. --- MANIFEST | 4 + NEWS | 11 +- VERSION | 2 +- dist.mk | 4 +- misc/terminfo.src | 42 ++++--- ncurses/curses.priv.h | 4 +- package/debian-mingw/changelog | 4 +- .../mingw32-ncurses6.lintian-overrides | 7 ++ package/debian-mingw/rules | 24 ++-- package/debian-mingw64/changelog | 4 +- .../mingw64-ncurses6.lintian-overrides | 7 ++ package/debian-mingw64/rules | 24 ++-- package/debian/changelog | 4 +- package/debian/control | 4 +- package/debian/ncurses6.lintian-overrides | 17 +++ package/debian/ncursest6.lintian-overrides | 17 +++ package/debian/rules | 4 + package/mingw-ncurses.nsi | 4 +- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- progs/dump_entry.c | 113 +++++++++++++----- progs/progs.priv.h | 3 +- progs/tic.c | 5 +- test/picsmap.c | 16 ++- 24 files changed, 233 insertions(+), 95 deletions(-) create mode 100644 package/debian-mingw/mingw32-ncurses6.lintian-overrides create mode 100644 package/debian-mingw64/mingw64-ncurses6.lintian-overrides create mode 100644 package/debian/ncurses6.lintian-overrides create mode 100644 package/debian/ncursest6.lintian-overrides diff --git a/MANIFEST b/MANIFEST index c620dd2e..8a2ecf55 100644 --- a/MANIFEST +++ b/MANIFEST @@ -997,6 +997,7 @@ ./package/debian-mingw/compat ./package/debian-mingw/control ./package/debian-mingw/copyright +./package/debian-mingw/mingw32-ncurses6.lintian-overrides ./package/debian-mingw/rules ./package/debian-mingw/source/format ./package/debian-mingw/watch @@ -1004,6 +1005,7 @@ ./package/debian-mingw64/compat ./package/debian-mingw64/control ./package/debian-mingw64/copyright +./package/debian-mingw64/mingw64-ncurses6.lintian-overrides ./package/debian-mingw64/rules ./package/debian-mingw64/source/format ./package/debian-mingw64/watch @@ -1011,6 +1013,8 @@ ./package/debian/compat ./package/debian/control ./package/debian/copyright +./package/debian/ncurses6.lintian-overrides +./package/debian/ncursest6.lintian-overrides ./package/debian/rules ./package/debian/source/format ./package/debian/watch diff --git a/NEWS b/NEWS index c2cf2811..feeb7e9c 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.2882 2017/07/09 00:25:16 tom Exp $ +-- $Id: NEWS,v 1.2888 2017/07/15 22:29:41 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. +20170715 + + modify command-line parameters for "convert" used in picsmap to work + with ImageMagick 6.8 and newer. + + fix build-problem with tack and ABI-5 (Debian #868328). + + repair termcap-format from tic/infocmp broken in 20170701 fixes + (Debian #868266). + + reformat terminfo.src with 20170513 updates. + + improve test-packages to address lintian warnings. + 20170708 + add a note to tic manual page about -W versus -f options. + correct a limit-check in fixes from 20170701 (report by Sven Joachim). diff --git a/VERSION b/VERSION index e3d69d29..5a64f676 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:9 6.0 20170708 +5:0:9 6.0 20170715 diff --git a/dist.mk b/dist.mk index 09d7aca2..9af26998 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.1171 2017/07/02 14:32:53 tom Exp $ +# $Id: dist.mk,v 1.1172 2017/07/13 00:15:27 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 = 20170708 +NCURSES_PATCH = 20170715 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/misc/terminfo.src b/misc/terminfo.src index b16f2678..ee3fab31 100644 --- a/misc/terminfo.src +++ b/misc/terminfo.src @@ -6,8 +6,8 @@ # Report bugs and new terminal descriptions to # bug-ncurses@gnu.org # -# $Revision: 1.602 $ -# $Date: 2017/04/22 20:18:54 $ +# $Revision: 1.603 $ +# $Date: 2017/05/14 01:32:04 $ # # The original header is preserved below for reference. It is noted that there # is a "newer" version which differs in some cosmetic details (but actually @@ -356,7 +356,8 @@ ansi+idl1, ansi+idl, dl=\E[%p1%dM, il=\E[%p1%dL, use=ansi+idl1, ansi+idc, - dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, rmir=\E[4l, smir=\E[4h, + dch1=\E[P, ich=\E[%p1%d@, ich1=\E[@, rmir=\E[4l, + smir=\E[4h, ansi+arrows, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, khome=\E[H, @@ -723,7 +724,7 @@ nansi.sysk|nansisysk|PC-DOS Public Domain NANSI.SYS with keypad redefined for vi # tw52|tw52-color|Toswin window manager with color, bce, - colors#16, pairs#256, + colors#16, pairs#0x100, oc=\Eb?\Ec0, op=\Eb?\Ec0, setab=\Ec%?%p1%{0}%=%t?%e%p1%{7}%=%t0%e%p1%{15}%=%t7%e%p1 %{48}%+%c, @@ -745,7 +746,7 @@ tt52|Atari TT medium and high resolution, lines#30, use=at-color, st52-color|at-color|atari-color|atari_st-color|Atari ST with color, bce, - colors#16, pairs#256, + colors#16, pairs#0x100, is2=\Ev\Eq\Ee\Eb1\Ec0, rs2=\Ev\Eq\Ee\Eb1\Ec0, setab=\Ec%?%p1%{0}%=%t1%e%p1%{1}%=%t2%e%p1%{2}%=%t3%e%p1%{3} %=%t>%e%p1%{4}%=%t4%e%p1%{5}%=%t7%e%p1%{6}%=%t5%e%p1 @@ -1525,7 +1526,7 @@ xnuppc+200x75|Darwin PowerPC Console 200x75 support (1600x1200 pixels), cols#200, lines#75, xnuppc+256x96|Darwin PowerPC Console 256x96 support (2048x1536 pixels), - cols#256, lines#96, + cols#0x100, lines#96, # These are different combinations of the building blocks @@ -1842,7 +1843,7 @@ kon|kon2|jfbterm|Kanji ON Linux console, # Not used here, the program recognizes escapes for italic, underline and # dim, rendering those as green, cyan and gray respectively. fbterm|FbTerm for Linux with framebuffer, - colors#256, pairs#32767, + colors#0x100, pairs#0x7fff, acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i \316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u \264v\301w\302x\263y\363z\362{\343|\330}\234~\376, @@ -1857,7 +1858,7 @@ fbterm|FbTerm for Linux with framebuffer, # you use a 512-character console font. This uses bold for bright # foreground colors and blink for bright background colors. linux-16color|linux console with 16 colors, - colors#16, ncv#42, pairs#256, + colors#16, ncv#42, pairs#0x100, setab=\E[4%p1%{8}%m%d%?%p1%{7}%>%t;5%e;25%;m, setaf=\E[3%p1%{8}%m%d%?%p1%{7}%>%t;1%e;21%;m, use=linux, @@ -4403,7 +4404,7 @@ xterm-16color|xterm with 16 colors like aixterm, # xterm patch #111 (1999/7/10) -TD xterm+256color|xterm 256-color feature, ccc, - colors#256, pairs#32767, + colors#0x100, pairs#0x7fff, initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%* %{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, oc=\E]104\007, @@ -4416,7 +4417,7 @@ xterm+256color|xterm 256-color feature, # palette is hardcoded... xterm+256setaf|xterm 256-color (set-only), ccc@, - colors#256, pairs#32767, + colors#0x100, pairs#0x7fff, initc@, setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48; 5;%p1%d%;m, @@ -6018,7 +6019,7 @@ st-256color|stterm-256color|simpleterm with 256 colors, # e) removed km terminator|Terminator no line wrap, eo, mir, msgr, xenl, xon, - colors#256, cols#80, it#8, lines#24, lm#0, pairs#32767, + colors#0x100, cols#80, it#8, lines#24, lm#0, pairs#0x7fff, acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bold=\E[1m, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?25h, cr=\r, csr=\E[%i%p1%d;%p2%dr, @@ -6575,7 +6576,7 @@ dvtm|dynamic virtual terminal manager, vpa=\E[%i%p1%dd, dvtm-256color|dynamic virtual terminal manager with 256 colors, - colors#256, pairs#32767, + colors#0x100, pairs#0x7fff, setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48; 5;%p1%d%;m, setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5 @@ -12328,7 +12329,7 @@ att500|att513|AT&T 513 using page mode, # The capability sets form length att5310|att5320|AT&T Model 53210 or 5320 matrix printer, xhpa, xvpa, - bufsz#8192, cols#132, cps#120, it#8, lines#66, orc#10, + bufsz#0x2000, cols#132, cps#120, it#8, lines#66, orc#10, orhi#100, orl#12, orvi#72, cpi=%?%p1%{10}%=%t\E[w%e%p1%{12}%=%t\E[2w%e%p1%{5}%=%t\E[5w %e%p1%{13}%=%p1%{14}%=%O%t\E[3w%e%p1%{16}%=%p1%{17}%=%O @@ -13817,7 +13818,7 @@ citoh-comp|citoh in compressed, use=citoh, # citoh has infinite cols because we don't want lp ever inserting \n\t**. citoh-prop|citoh-ps|ips|citoh in proportional spacing mode, - cols#32767, + cols#0x7fff, is1=\EP, use=citoh, citoh-6lpi|citoh in 6 lines per inch mode, is3=\EA, use=citoh, @@ -14574,7 +14575,7 @@ dgkeys+15|Private entry describing 15 DG mode special keys, # dgunix+fixed|Fixed color info for DG D430C terminals in DG-UNIX mode, bce, - colors#16, ncv#53, pairs#256, + colors#16, ncv#53, pairs#0x100, op=\036Ad\036Bd, setab=\036B%p1%?%p1%{8}%<%t%{2}%&%?%p1%{1}%&%t%{4}%|%;%?%p1 %{4}%&%t%{1}%|%;%;%{48}%+%c, @@ -14600,7 +14601,7 @@ dg+color8|Color info for Data General D220 and D230C terminals in ANSI mode, %d%?%gD%t;2%;%?%gU%t;4%;%?%gB%t;5%;%?%gR%t;7%;m, dg+color|Color info for Data General D470C terminals in ANSI mode, - colors#16, ncv#53, pairs#256, + colors#16, ncv#53, pairs#0x100, setab=\E[%?%p1%{8}%<%t4%p1%e=%p1%{2}%&%?%p1%{1}%&%t%{4}%|%; %?%p1%{4}%&%t%{1}%|%;%;%d%?%gD%t;2%;%?%gU%t;4%;%?%gB%t ;5%;%?%gR%t;7%;m, @@ -14626,7 +14627,7 @@ dgmode+color8|Color info for Data General D220/D230C terminals in DG mode, setb=\036B%p1%{48}%+%c, setf=\036A%p1%{48}%+%c, dgmode+color|Color info for Data General D470C terminals in DG mode, - colors#16, pairs#256, + colors#16, pairs#0x100, setab=\036B%p1%?%p1%{8}%<%t%{2}%&%?%p1%{1}%&%t%{4}%|%;%?%p1 %{4}%&%t%{1}%|%;%;%{48}%+%c, setaf=\036A%p1%?%p1%{8}%<%t%{2}%&%?%p1%{1}%&%t%{4}%|%;%?%p1 @@ -16108,7 +16109,7 @@ ibm+color|IBM color definitions, %p1%{3}%=%t33m%e%p1%{4}%=%t34m%e%p1%{5}%=%t35m%e%p1%{6} %=%t36m%e%p1%{7}%=%t97m%;, ibm+16color|IBM aixterm color definitions, - colors#16, pairs#256, + colors#16, pairs#0x100, setab=\E[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm, setaf=\E[%?%p1%{8}%<%t%p1%{30}%+%e%p1%{82}%+%;%dm, setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e @@ -19116,7 +19117,7 @@ amiga-8bit|Amiga ANSI using 8-bit controls, # requires use of appropriate preferences settings. amiga-vnc|Amiga using VNC console (black on light gray), am, da, db, msgr, ndscr, - btns#1, colors#16, cols#80, lines#24, lm#0, ncv#0, pairs#256, + btns#1, colors#16, cols#80, lines#24, lm#0, ncv#0, pairs#0x100, bel=^G, blink=\E[7;2m, bold=\E[1m, civis=\E[0p, clear=\E[H\E[J, cnorm=\E[p\E[>?6l, cr=\r, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=\E[D, @@ -25115,4 +25116,7 @@ v3220|LANPAR Vision II model 3220/3221/3222, # + restore rmir/smir in ansi+idc to better match original ansiterm+idc, # add alias ansiterm (report by Robert King). # +# 2017-05-13 +# + reformatted using hexadecimal numbers to improve readability -TD +# ######## SHANTIH! SHANTIH! SHANTIH! diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 3a3b7446..df9fe2ea 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.580 2017/07/01 17:56:12 tom Exp $ + * $Id: curses.priv.h,v 1.581 2017/07/15 20:17:01 tom Exp $ * * curses.priv.h * @@ -2168,6 +2168,8 @@ extern NCURSES_EXPORT(void) _nc_import_termtype2(TERMTYPE2 *, const TERMTYPE *); #define _nc_export_termtype2(dst,src) /* nothing */ #define _nc_import_termtype2(dst,src) /* nothing */ #define _nc_free_termtype2(t) _nc_free_termtype(t) +/* also... */ +#define _nc_read_entry2 _nc_read_entry #endif #if NO_LEAKS diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index f94a865d..88186a4d 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.0+20170708) unstable; urgency=low +ncurses6 (6.0+20170715) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 02 Jul 2017 10:32:53 -0400 + -- Thomas E. Dickey Wed, 12 Jul 2017 20:15:27 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw/mingw32-ncurses6.lintian-overrides b/package/debian-mingw/mingw32-ncurses6.lintian-overrides new file mode 100644 index 00000000..ed565e43 --- /dev/null +++ b/package/debian-mingw/mingw32-ncurses6.lintian-overrides @@ -0,0 +1,7 @@ +mingw32-ncurses6: latest-debian-changelog-entry-changed-to-native + +mingw32-ncurses6: non-standard-dir-in-usr +mingw32-ncurses6: file-in-unusual-dir + +mingw32-ncurses6: binary-without-manpage +mingw32-ncurses6: executable-not-elf-or-script diff --git a/package/debian-mingw/rules b/package/debian-mingw/rules index 6ac4c431..953dafb3 100755 --- a/package/debian-mingw/rules +++ b/package/debian-mingw/rules @@ -23,6 +23,8 @@ MINGW_TMP = $(CURDIR)/debian/mingw32-ncurses6 CFLAGS = $(CC_NORMAL) +verbose = # -v + CONFIG_OPTIONS = \ --disable-echo \ --disable-db-install \ @@ -101,7 +103,7 @@ install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k - dh_installdirs + dh_installdirs $(verbose) $(MAKE) install.libs DESTDIR=$(MINGW_TMP) @@ -121,16 +123,18 @@ binary-indep: build install # Build architecture-dependent files here. binary-arch: build install dh_testdir - dh_testroot - dh_installchangelogs NEWS + dh_testroot $(verbose) + dh_lintian $(verbose) + dh_installdocs $(verbose) + dh_installchangelogs $(verbose) NEWS # dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb + dh_compress $(verbose) + dh_fixperms $(verbose) + dh_installdeb $(verbose) + dh_shlibdeps $(verbose) + dh_gencontrol $(verbose) + dh_md5sums $(verbose) + dh_builddeb $(verbose) binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install install-stamp diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index f94a865d..88186a4d 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.0+20170708) unstable; urgency=low +ncurses6 (6.0+20170715) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 02 Jul 2017 10:32:53 -0400 + -- Thomas E. Dickey Wed, 12 Jul 2017 20:15:27 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/mingw64-ncurses6.lintian-overrides b/package/debian-mingw64/mingw64-ncurses6.lintian-overrides new file mode 100644 index 00000000..9e8f8544 --- /dev/null +++ b/package/debian-mingw64/mingw64-ncurses6.lintian-overrides @@ -0,0 +1,7 @@ +mingw64-ncurses6: latest-debian-changelog-entry-changed-to-native + +mingw64-ncurses6: non-standard-dir-in-usr +mingw64-ncurses6: file-in-unusual-dir + +mingw64-ncurses6: binary-without-manpage +mingw64-ncurses6: executable-not-elf-or-script diff --git a/package/debian-mingw64/rules b/package/debian-mingw64/rules index 04a21a3c..6391527a 100755 --- a/package/debian-mingw64/rules +++ b/package/debian-mingw64/rules @@ -23,6 +23,8 @@ MINGW_TMP = $(CURDIR)/debian/mingw64-ncurses6 CFLAGS = $(CC_NORMAL) +verbose = # -v + CONFIG_OPTIONS = \ --disable-echo \ --disable-db-install \ @@ -101,7 +103,7 @@ install-stamp: build-stamp dh_testdir dh_testroot dh_clean -k - dh_installdirs + dh_installdirs $(verbose) $(MAKE) install.libs DESTDIR=$(MINGW_TMP) @@ -121,16 +123,18 @@ binary-indep: build install # Build architecture-dependent files here. binary-arch: build install dh_testdir - dh_testroot - dh_installchangelogs NEWS + dh_testroot $(verbose) + dh_lintian $(verbose) + dh_installdocs $(verbose) + dh_installchangelogs $(verbose) NEWS # dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb + dh_compress $(verbose) + dh_fixperms $(verbose) + dh_installdeb $(verbose) + dh_shlibdeps $(verbose) + dh_gencontrol $(verbose) + dh_md5sums $(verbose) + dh_builddeb $(verbose) binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install install-stamp diff --git a/package/debian/changelog b/package/debian/changelog index 39e01c1a..7a564ec4 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.0+20170708) unstable; urgency=low +ncurses6 (6.0+20170715) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sun, 02 Jul 2017 10:32:53 -0400 + -- Thomas E. Dickey Wed, 12 Jul 2017 20:15:27 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/debian/control b/package/debian/control index 8118544c..afa7e861 100644 --- a/package/debian/control +++ b/package/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.8.2 Package: ncurses6 Architecture: any -Depends: ${misc:Depends} +Depends: ${misc:Depends}, libc6 (>= 2.4) Description: shared libraries for terminal handling The ncurses library routines are a terminal-independent method of updating character screens with reasonable optimization. @@ -17,7 +17,7 @@ Description: shared libraries for terminal handling Package: ncursest6 Architecture: any -Depends: ${misc:Depends} +Depends: ${misc:Depends}, libc6 (>= 2.4) Description: shared libraries for terminal handling The ncurses library routines are a terminal-independent method of updating character screens with reasonable optimization. diff --git a/package/debian/ncurses6.lintian-overrides b/package/debian/ncurses6.lintian-overrides new file mode 100644 index 00000000..94397471 --- /dev/null +++ b/package/debian/ncurses6.lintian-overrides @@ -0,0 +1,17 @@ +# This is intentional. +ncurses6: package-name-doesnt-match-sonames libformw6-6 libmenuw6-6 libncurses++w6-6 libncursesw6-6 libpanelw6-6 libticw6-6 libtinfow6-6 +ncurses6: binary-or-shlib-defines-rpath usr/bin/ncurses6 /usr/lib + +# This works around a bug in Debian's build-scripts. +ncurses6: latest-debian-changelog-entry-changed-to-native + +ncurses6: hardening-no-fortify-functions usr/lib/libncurses++w6.so.6.0 + +# This is intentional. +ncurses6: binary-without-manpage +ncurses6: non-dev-pkg-with-shlib-symlink +ncurses6: embedded-library usr/lib/libtinfow6.so.6.0: ncurses + +ncurses6: postinst-must-call-ldconfig usr/lib/libtinfow6.so.6.0 + +# vile: confmode diff --git a/package/debian/ncursest6.lintian-overrides b/package/debian/ncursest6.lintian-overrides new file mode 100644 index 00000000..1fd4f6d4 --- /dev/null +++ b/package/debian/ncursest6.lintian-overrides @@ -0,0 +1,17 @@ +# This is intentional. +ncursest6: package-name-doesnt-match-sonames libformtw6-6 libmenutw6-6 libncurses++tw6-6 libncursestw6-6 libpaneltw6-6 libtictw6-6 libtinfotw6-6 +ncursest6: binary-or-shlib-defines-rpath usr/bin/ncursest6 /usr/lib + +# This works around a bug in Debian's build-scripts. +ncursest6: latest-debian-changelog-entry-changed-to-native + +ncursest6: hardening-no-fortify-functions usr/lib/libncurses++tw6.so.6.0 + +# This is intentional. +ncursest6: binary-without-manpage +ncursest6: non-dev-pkg-with-shlib-symlink +ncursest6: embedded-library usr/lib/libtinfotw6.so.6.0: ncurses + +ncursest6: postinst-must-call-ldconfig usr/lib/libtinfotw6.so.6.0 + +# vile: confmode diff --git a/package/debian/rules b/package/debian/rules index 9d0eb980..6bca0466 100755 --- a/package/debian/rules +++ b/package/debian/rules @@ -25,6 +25,7 @@ NORMAL_DIR=$(CURDIR)/debian/ncurses$(MY_ABI) THREAD_DIR=$(CURDIR)/debian/ncursest$(MY_ABI) CFLAGS = $(shell dpkg-buildflags --get CFLAGS) $(CC_NORMAL) +CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) @@ -207,6 +208,7 @@ ifneq ($(PACKAGES.indep),) rm -f $(PACKAGES.indep:%=install-%-stamp) dh_testdir dh_testroot + dh_lintian $(verbose) $(PACKAGES.arch:%=-p%) dh_installdocs $(verbose) $(PACKAGES.indep:%=-p%) dh_installman $(verbose) $(PACKAGES.indep:%=-p%) dh_installexamples $(verbose) $(PACKAGES.indep:%=-p%) @@ -225,6 +227,8 @@ ifneq ($(PACKAGES.arch),) rm -f $(PACKAGES.arch:%=install-%-stamp) dh_testdir dh_testroot + dh_lintian $(verbose) $(PACKAGES.arch:%=-p%) + dh_installdocs $(verbose) $(PACKAGES.arch:%=-p%) dh_installchangelogs $(verbose) $(PACKAGES.arch:%=-p%) NEWS dh_strip $(verbose) $(PACKAGES.arch:%=-p%) dh_compress $(verbose) $(PACKAGES.arch:%=-p%) diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index ab481a9c..7a28d0b6 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.219 2017/07/02 14:32:53 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.220 2017/07/13 00:15:27 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 "2017" -!define VERSION_MMDD "0708" +!define VERSION_MMDD "0715" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 7b55116d..acbb5609 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: 20170708 +Release: 20170715 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index d7b8f98e..5c84f17e 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: 20170708 +Release: 20170715 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/progs/dump_entry.c b/progs/dump_entry.c index e21e05e0..3efe05f4 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.155 2017/07/08 18:34:53 tom Exp $") +MODULE_ID("$Id: dump_entry.c,v 1.167 2017/07/15 21:22:01 tom Exp $") #define DISCARD(string) string = ABSENT_STRING #define PRINTF (void) printf @@ -499,8 +499,9 @@ find_split(const char *src, int step, int size) int ch = UChar(src[step + n]); if (ch == '%') { int need = op_length(src, step + n); - if ((n + need) > size) + if ((n + need) > size) { mark = n; + } break; } } @@ -553,22 +554,34 @@ fill_spaces(const char *src) return result; } +typedef enum { + wOFF = 0 + ,w1ST = 1 + ,w2ND = 2 + ,wEND = 4 + ,wERR = 8 +} WRAPMODE; + +#define wrap_1ST(mode) ((mode)&w1ST) +#define wrap_END(mode) ((mode)&wEND) +#define wrap_ERR(mode) ((mode)&wERR) + static void -wrap_concat(const char *src) +wrap_concat(const char *src, int need, unsigned mode) { - int need = (int) strlen(src); int gaps = (int) strlen(separator); int want = gaps + need; did_wrap = (width <= 0); - if (column > indent + if (wrap_1ST(mode) + && column > indent && column + want > width) { force_wrap(); } - if (wrapped && + if ((wrap_END(mode) && !wrap_ERR(mode)) && + wrapped && (width >= 0) && - (column + want) > width && - (!TcOutput() || strncmp(src, "..", 2))) { + (column + want) > width) { int step = 0; int used = width > WRAPPED ? width : WRAPPED; int size; @@ -583,18 +596,29 @@ wrap_concat(const char *src) if (TcOutput()) trailer = "\\\n\t "; - if ((p = strchr(fill, '=')) != 0) { + if (!TcOutput() && (p = strchr(fill, '=')) != 0) { base = (int) (p + 1 - fill); if (base > 8) base = 8; _nc_SPRINTF(align, _nc_SLIMIT(align) "%*s", base, " "); + } else if (column > 8) { + base = column - 8; + if (base > 8) + base = 8; + _nc_SPRINTF(align, _nc_SLIMIT(align) "%*s", base, " "); } else { align[base] = '\0'; } /* "pretty" overrides wrapping if it already split the line */ if (!pretty || strchr(fill, '\n') == 0) { + int tag = 0; + + if (TcOutput() && outbuf.used && !wrap_1ST(mode)) { + tag = 3; + } + while ((column + (need + gaps)) > used) { - size = used; + size = used - tag; if (step) { strcpy_DYN(&outbuf, align); size -= base; @@ -609,6 +633,7 @@ wrap_concat(const char *src) if (need > 0) { force_wrap(); did_wrap = TRUE; + tag = 0; } } } @@ -617,18 +642,39 @@ wrap_concat(const char *src) strcpy_DYN(&outbuf, align); strcpy_DYN(&outbuf, fill + step); } - strcpy_DYN(&outbuf, separator); + if (wrap_END(mode)) + strcpy_DYN(&outbuf, separator); trailer = my_t; force_wrap(); free(fill); } else { strcpy_DYN(&outbuf, src); - strcpy_DYN(&outbuf, separator); - column += need; + if (wrap_END(mode)) + strcpy_DYN(&outbuf, separator); + column += (int) strlen(src); } } +static void +wrap_concat1(const char *src) +{ + int need = (int) strlen(src); + wrap_concat(src, need, w1ST | wEND); +} + +static void +wrap_concat3(const char *name, const char *eqls, const char *value) +{ + int nlen = (int) strlen(name); + int elen = (int) strlen(eqls); + int vlen = (int) strlen(value); + + wrap_concat(name, nlen + elen + vlen, w1ST); + wrap_concat(eqls, elen + vlen, w2ND); + wrap_concat(value, vlen, wEND); +} + #define IGNORE_SEP_TRAIL(first,last,sep_trail) \ if ((size_t)(last - first) > sizeof(sep_trail)-1 \ && !strncmp(first, sep_trail, sizeof(sep_trail)-1)) \ @@ -841,9 +887,7 @@ fmt_entry(TERMTYPE2 *tterm, PredIdx num_strings = 0; bool outcount = 0; -#define WRAP_CONCAT1(s) wrap_concat(s); outcount = TRUE -#define WRAP_CONCAT2(a,b) wrap_concat(a); WRAP_CONCAT1(b) -#define WRAP_CONCAT3(a,b,c) wrap_concat(a); WRAP_CONCAT2(b,c) +#define WRAP_CONCAT1(s) wrap_concat1(s); outcount = TRUE #define WRAP_CONCAT WRAP_CONCAT1(buffer) len = 12; /* terminfo file-header */ @@ -1052,7 +1096,7 @@ fmt_entry(TERMTYPE2 *tterm, continue; } else { char *s = srccap, *d = buffer; - WRAP_CONCAT3("..", name, "="); + int need = 3 + (int) strlen(name); while ((*d = *s++) != 0) { if ((d - buffer + 1) >= (int) sizeof(buffer)) { fprintf(stderr, @@ -1069,11 +1113,20 @@ fmt_entry(TERMTYPE2 *tterm, *++d = *s++; } d++; + *d = '\0'; } - WRAP_CONCAT; + need += (int) (d - buffer); + wrap_concat("..", need, w1ST | wERR); + need -= 2; + wrap_concat(name, need, wOFF | wERR); + need -= (int) strlen(name); + wrap_concat("=", need, w2ND | wERR); + need -= 1; + wrap_concat(buffer, need, wEND | wERR); + outcount = TRUE; } } else { - WRAP_CONCAT3(name, "=", cv); + wrap_concat3(name, "=", cv); } len += (int) strlen(capability) + 1; } else { @@ -1406,12 +1459,12 @@ dump_entry(TERMTYPE2 *tterm, char numbuf[80]; if (quickdump & 1) { if (outbuf.used) - wrap_concat("\n"); - wrap_concat("hex:"); + wrap_concat1("\n"); + wrap_concat1("hex:"); for (n = 0; n < offset; ++n) { _nc_SPRINTF(numbuf, _nc_SLIMIT(sizeof(numbuf)) "%02X", UChar(bigbuf[n])); - wrap_concat(numbuf); + wrap_concat1(numbuf); } } if (quickdump & 2) { @@ -1419,24 +1472,24 @@ dump_entry(TERMTYPE2 *tterm, {0, 0}; int value = 0; if (outbuf.used) - wrap_concat("\n"); - wrap_concat("b64:"); + wrap_concat1("\n"); + wrap_concat1("b64:"); for (n = 0; n < offset; ++n) { encode_b64(numbuf, bigbuf, n, &value); - wrap_concat(numbuf); + wrap_concat1(numbuf); } switch (n % 3) { case 0: break; case 1: encode_b64(numbuf, padding, 1, &value); - wrap_concat(numbuf); - wrap_concat("=="); + wrap_concat1(numbuf); + wrap_concat1("=="); break; case 2: encode_b64(numbuf, padding, 1, &value); - wrap_concat(numbuf); - wrap_concat("="); + wrap_concat1(numbuf); + wrap_concat1("="); break; } } @@ -1564,7 +1617,7 @@ dump_uses(const char *name, bool infodump) trim_trailing(); _nc_SPRINTF(buffer, _nc_SLIMIT(sizeof(buffer)) "%s%s", infodump ? "use=" : "tc=", name); - wrap_concat(buffer); + wrap_concat1(buffer); } int diff --git a/progs/progs.priv.h b/progs/progs.priv.h index 85d3acc6..e621bcdd 100644 --- a/progs/progs.priv.h +++ b/progs/progs.priv.h @@ -30,7 +30,7 @@ * Author: Thomas E. Dickey 1997-on * ****************************************************************************/ /* - * $Id: progs.priv.h,v 1.43 2017/04/06 23:02:26 tom Exp $ + * $Id: progs.priv.h,v 1.44 2017/07/15 18:26:07 tom Exp $ * * progs.priv.h * @@ -218,6 +218,7 @@ extern int optind; #if NCURSES_EXT_NUMBERS #else #define _nc_free_termtype2(t) _nc_free_termtype(t) +#define _nc_read_entry2(n,f,t) _nc_read_entry(n,f,t) #endif #endif /* PROGS_PRIV_H */ diff --git a/progs/tic.c b/progs/tic.c index cfcbc359..c5d78e5a 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.232 2017/04/13 09:12:05 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.233 2017/07/15 17:40:19 tom Exp $") #define STDIN_NAME "" @@ -976,7 +976,8 @@ main(int argc, char *argv[]) if (len > (infodump ? MAX_TERMINFO_LENGTH : MAX_TERMCAP_LENGTH)) (void) fprintf(stderr, - "warning: resolved %s entry is %d bytes long\n", + "%s: resolved %s entry is %d bytes long\n", + _nc_progname, _nc_first_name(qp->tterm.term_names), len); } diff --git a/test/picsmap.c b/test/picsmap.c index 92e233d7..e360062a 100644 --- a/test/picsmap.c +++ b/test/picsmap.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: picsmap.c,v 1.50 2017/06/11 00:37:27 tom Exp $ + * $Id: picsmap.c,v 1.52 2017/07/15 22:25:06 tom Exp $ * * Author: Thomas E. Dickey * @@ -814,7 +814,8 @@ parse_img(const char *filename) if (pic_x <= 0 || pic_y <= 0) goto finish; - sprintf(cmd, "convert -resize %dx%d\\! -thumbnail %dx \"%s\" txt:-", + sprintf(cmd, "convert " "-resize %dx%d\\! " "-thumbnail %dx \"%s\" " + "-define txt:compliance=SVG txt:-", pic_x, pic_y, width, filename); if ((pp = popen(cmd, "r")) != 0) { @@ -843,10 +844,11 @@ parse_img(const char *filename) } } else { /* subsequent lines begin "col,row: (r,g,b,a) #RGB" */ - int r, g, b; + int r, g, b, nocolor; unsigned check; int which, c; - char *s = strchr(buffer, '#'); + char *t; + char *s = t = strchr(buffer, '#'); if (s != 0) { /* after the "#RGB", there are differences - just ignore */ while (*s != '\0' && !isspace(UChar(*s))) @@ -854,10 +856,12 @@ parse_img(const char *filename) *++s = '\0'; } if (match_c(buffer, - "%d,%d: (%d,%d,%d,255) #%x ", + "%d,%d: (%d,%d,%d,%d) #%x ", &col, &row, - &r, &g, &b, + &r, &g, &b, &nocolor, &check)) { + if ((s - t) > 8) /* 6 hex digits vs 8 */ + check /= 256; if (r > 255 || g > 255 || b > 255 || -- 2.45.0