From: Thomas E. Dickey Date: Sun, 18 Feb 2018 01:45:21 +0000 (+0000) Subject: ncurses 6.1 - patch 20180217 X-Git-Tag: v6.2~99 X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=d545d5dd9889756f005fb63a843adb230b990493 ncurses 6.1 - patch 20180217 + remove incorrect free() from 20170617 changes (report by David Macek). + correct type for "U8" in user_caps.5; it is a number not boolean. + add a null-pointer check in safe_sprintf.c (report by Steven Noonan). + improve fix for Debian #882620 by reusing limit2 variable (report Julien Cristau, Sven Cristau). --- diff --git a/NEWS b/NEWS index 325753d6..ab0604c8 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.3080 2018/02/10 20:36:21 tom Exp $ +-- $Id: NEWS,v 1.3085 2018/02/17 21:27:10 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -45,6 +45,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. +20180217 + + remove incorrect free() from 20170617 changes (report by David Macek). + + correct type for "U8" in user_caps.5; it is a number not boolean. + + add a null-pointer check in safe_sprintf.c (report by Steven Noonan). + + improve fix for Debian #882620 by reusing limit2 variable (report + Julien Cristau, Sven Cristau). + 20180210 + modify misc/Makefile.in to install/uninstall explicit list in case the build-directory happens to have no ".pc" files when an uninstall diff --git a/VERSION b/VERSION index 9f7691aa..f4d4fbcc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20180210 +5:0:10 6.1 20180217 diff --git a/dist.mk b/dist.mk index 10379db3..0b00dac8 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.1210 2018/02/10 13:15:08 tom Exp $ +# $Id: dist.mk,v 1.1211 2018/02/11 20:16:59 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 = 1 -NCURSES_PATCH = 20180210 +NCURSES_PATCH = 20180217 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/man/user_caps.5 b/man/user_caps.5 index 04830cb8..592b35bc 100644 --- a/man/user_caps.5 +++ b/man/user_caps.5 @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: user_caps.5,v 1.6 2018/02/03 22:38:17 tom Exp $ +.\" $Id: user_caps.5,v 1.7 2018/02/17 19:07:01 tom Exp $ .TH user_caps 5 .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -211,7 +211,7 @@ As a trivial case, for example, one could define \fBRGB#1\fP to represent the standard eight ANSI colors, i.e., one bit per color. .TP 3 U8 -\fIboolean\fP, +\fInumber\fP, asserts that ncurses must use Unicode values for line-drawing characters, and that it should ignore the alternate character set capabilities when the locale uses UTF-8 encoding. diff --git a/ncurses/base/safe_sprintf.c b/ncurses/base/safe_sprintf.c index 6c17286b..22db3ba7 100644 --- a/ncurses/base/safe_sprintf.c +++ b/ncurses/base/safe_sprintf.c @@ -33,7 +33,7 @@ #include #include -MODULE_ID("$Id: safe_sprintf.c,v 1.29 2018/02/10 17:52:19 tom Exp $") +MODULE_ID("$Id: safe_sprintf.c,v 1.31 2018/02/17 21:19:41 tom Exp $") #if USE_SAFE_SPRINTF @@ -224,11 +224,7 @@ NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_DCLx { char *result = 0; -#if NCURSES_SP_FUNCS - (void) sp; -#endif - - if (fmt != 0) { + if (SP_PARM != 0 && fmt != 0) { #if USE_SAFE_SPRINTF va_list ap2; int len; diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 33cf2f96..a4b87e3b 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2018 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 * @@ -48,7 +48,7 @@ #include #endif -MODULE_ID("$Id: lib_setup.c,v 1.188 2017/07/01 18:24:50 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.189 2018/02/17 21:23:32 tom Exp $") /**************************************************************************** * @@ -722,8 +722,6 @@ TINFO_SETUP_TERM(TERMINAL **tp, termp->Filedes = (short) Filedes; termp->_termname = strdup(tname); } else { - _nc_free_termtype2(&TerminalType(termp)); - free(my_tcb); ret_error0(errret ? *errret : TGETENT_ERR, "Could not find any driver to handle this terminal.\n"); } diff --git a/ncurses/tinfo/write_entry.c b/ncurses/tinfo/write_entry.c index cc3f83ac..f55686fe 100644 --- a/ncurses/tinfo/write_entry.c +++ b/ncurses/tinfo/write_entry.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2015,2017 Free Software Foundation, Inc. * + * Copyright (c) 1998-2017,2018 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 * @@ -50,7 +50,7 @@ #define TRACE_NUM(n) /* nothing */ #endif -MODULE_ID("$Id: write_entry.c,v 1.101 2017/11/25 19:56:06 tom Exp $") +MODULE_ID("$Id: write_entry.c,v 1.102 2018/02/11 20:24:28 Julien.Cristau Exp $") static int total_written; static int total_parts; @@ -377,7 +377,7 @@ _nc_write_entry(TERMTYPE2 *const tp) start_time = 0; } - if (strlen(first_name) >= sizeof(filename) - (2 + LEAF_LEN)) { + if (strlen(first_name) >= limit2) { _nc_warning("terminal name too long."); saved = first_name[limit2]; first_name[limit2] = '\0'; diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index 674541a9..365a4294 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180210) unstable; urgency=low +ncurses6 (6.1+20180217) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 10 Feb 2018 08:15:08 -0500 + -- Thomas E. Dickey Sun, 11 Feb 2018 15:16:59 -0500 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 674541a9..365a4294 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180210) unstable; urgency=low +ncurses6 (6.1+20180217) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 10 Feb 2018 08:15:08 -0500 + -- Thomas E. Dickey Sun, 11 Feb 2018 15:16:59 -0500 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 31e4ae92..494e11ab 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180210) unstable; urgency=low +ncurses6 (6.1+20180217) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 10 Feb 2018 08:15:08 -0500 + -- Thomas E. Dickey Sun, 11 Feb 2018 15:16:59 -0500 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/debian/rules b/package/debian/rules index f5297f0c..6dd38f78 100755 --- a/package/debian/rules +++ b/package/debian/rules @@ -80,7 +80,7 @@ configure = \ --with-develop \ --with-extra-suffix=$(MY_ABI) \ --with-shared \ - --with-terminfo-dirs=$(MYDATA):/usr/share/terminfo \ + --with-terminfo-dirs=$(MYDATA):/lib/terminfo:/usr/share/terminfo \ --with-termlib \ --with-ticlib \ --with-trace \ diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index 49d42e5e..3fd4ae51 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.257 2018/02/10 13:15:08 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.258 2018/02/11 20:16:59 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "1" !define VERSION_YYYY "2018" -!define VERSION_MMDD "0210" +!define VERSION_MMDD "0217" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index ab944435..64861fa0 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.1 -Release: 20180210 +Release: 20180217 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index 3c95adaf..16b4d4d8 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.1 -Release: 20180210 +Release: 20180217 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/test/demo_defkey.c b/test/demo_defkey.c index 39b8f292..616a8557 100644 --- a/test/demo_defkey.c +++ b/test/demo_defkey.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2002-2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 2002-2017,2018 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_defkey.c,v 1.27 2017/04/09 23:57:56 tom Exp $ + * $Id: demo_defkey.c,v 1.28 2018/02/12 09:57:31 tom Exp $ * * Demonstrate the define_key() function. * Thomas Dickey - 2002/11/23 @@ -187,9 +187,9 @@ duplicate(WINDOW *win, NCURSES_CONST char *name, int code) const char *prefix = 0; char temp[BUFSIZ]; - if (!strncmp(value, "\033[", (size_t) 2)) { + if (!(strncmp) (value, "\033[", (size_t) 2)) { prefix = "\033O"; - } else if (!strncmp(value, "\033O", (size_t) 2)) { + } else if (!(strncmp) (value, "\033O", (size_t) 2)) { prefix = "\033["; } if (prefix != 0) { diff --git a/test/list_keys.c b/test/list_keys.c index 6df2b078..2000a44e 100644 --- a/test/list_keys.c +++ b/test/list_keys.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 2016,2017 Free Software Foundation, Inc. * + * Copyright (c) 2016-2017,2018 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 * @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: list_keys.c,v 1.22 2017/08/12 17:28:23 tom Exp $ + * $Id: list_keys.c,v 1.23 2018/02/12 09:57:31 tom Exp $ * * Author: Thomas E Dickey * @@ -298,7 +298,7 @@ list_keys(TERMINAL **terms, int count) Type(j) = ktOther; if (sscanf(strnames[j], "kf%d", &k) == 1) { Type(j) = ktFunction; - } else if (!strncmp(strnames[j], "kcu", 3)) { + } else if (!(strncmp) (strnames[j], "kcu", 3)) { Type(j) = ktCursor; } Name(j) = strnames[j]; diff --git a/test/picsmap.c b/test/picsmap.c index ccfe57b4..a1865182 100644 --- a/test/picsmap.c +++ b/test/picsmap.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: picsmap.c,v 1.116 2018/01/16 09:14:52 tom Exp $ + * $Id: picsmap.c,v 1.117 2018/02/12 09:57:31 tom Exp $ * * Author: Thomas E. Dickey * @@ -589,7 +589,7 @@ read_palette(const char *filename) if (*t == '-') { if (sscanf(t, "-%d%c", &num, &chr) == 2 && chr == 'c' && - !strncmp(strchr(t, chr), "color", 5)) { + !(strncmp) (strchr(t, chr), "color", 5)) { found = 1; } break; @@ -597,7 +597,7 @@ read_palette(const char *filename) ++t; } if (found && (t != s) - && strncmp(s, "xterm", (size_t) (t - s))) { + && (strncmp) (s, "xterm", (size_t) (t - s))) { sprintf(s, "xterm%s", filename + (t - s)); } else { continue; @@ -1204,7 +1204,7 @@ parse_xpm(char **data) /* should not happen... */ continue; } - if (!strncmp(cs, list[c], (size_t) cpp)) { + if (!(strncmp) (cs, list[c], (size_t) cpp)) { result->cells[which].ch = list[c][0]; result->cells[which].fg = c; result->fgcol[c].count++; @@ -1279,7 +1279,7 @@ parse_img(const char *filename) size_t n = strlen(filename); debugmsg2("...read %s", buffer); if (strlen(buffer) > n && - !strncmp(buffer, filename, n) && + !(strncmp) (buffer, filename, n) && isspace(UChar(buffer[n])) && sscanf(skip_word(buffer + n), " %dx%d ", &pic_x, &pic_y) == 2) { /* distort image to make it show normally on terminal */