]> ncurses.scripts.mit.edu Git - ncurses.git/commitdiff
ncurses 5.9 - patch 20141018
authorThomas E. Dickey <dickey@invisible-island.net>
Sun, 19 Oct 2014 02:16:50 +0000 (02:16 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sun, 19 Oct 2014 02:16:50 +0000 (02:16 +0000)
+ reviewed terminology 0.6.1, add function key definitions.  None of
  the vt100-compatibility issues were improved -TD
+ improve infocmp conversion of extended capabilities to termcap by
  correcting the limit check against parametrized[], as well as filling
  in a check if the string happens to have parameters, e.g., "xm"
  in recent changes.
+ add check for zero/negative dimensions for resizeterm and resize_term
  (report by Mike Gran).

14 files changed:
NEWS
dist.mk
misc/terminfo.src
ncurses/base/lib_mouse.c
ncurses/base/resizeterm.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec
progs/dump_entry.c
progs/dump_entry.h
progs/tic.c

diff --git a/NEWS b/NEWS
index f89cbee1658397dda3bf95056d9c1aa318af7936..e3828f289252697e63e8450e1ad9427555baf02c 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.2287 2014/10/11 17:49:17 tom Exp $
+-- $Id: NEWS,v 1.2291 2014/10/19 01:19:36 tom Exp $
 -------------------------------------------------------------------------------
 
 This is a log of changes that ncurses has gone through since Zeyd started
@@ -45,6 +45,16 @@ 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.
 
+20141018
+       + reviewed terminology 0.6.1, add function key definitions.  None of
+         the vt100-compatibility issues were improved -TD
+       + improve infocmp conversion of extended capabilities to termcap by
+         correcting the limit check against parametrized[], as well as filling
+         in a check if the string happens to have parameters, e.g., "xm"
+         in recent changes.
+       + add check for zero/negative dimensions for resizeterm and resize_term
+         (report by Mike Gran).
+
 20141011
        + add experimental support for xterm's 1005 mouse mode, to use in a
          demonstration of its limitations.
diff --git a/dist.mk b/dist.mk
index edf97eb83c71ff98a15da81485142769c5d9d9c7..f6ce09b9b82e8f3e61524c378c18a3271e56360f 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.1010 2014/10/09 01:02:28 tom Exp $
+# $Id: dist.mk,v 1.1011 2014/10/13 08:53:05 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 = 5
 NCURSES_MINOR = 9
-NCURSES_PATCH = 20141011
+NCURSES_PATCH = 20141018
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index 903f24129a9f336726404893455c8b9e2e49f2b7..a9d4225f5a3083ebd65a8efa681d5533c70666b4 100644 (file)
@@ -6,8 +6,8 @@
 # Report bugs and new terminal descriptions to
 #      bug-ncurses@gnu.org
 #
-#      $Revision: 1.524 $
-#      $Date: 2014/10/11 23:02:12 $
+#      $Revision: 1.525 $
+#      $Date: 2014/10/19 01:16:56 $
 #
 # 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
@@ -5702,7 +5702,7 @@ terminator|Terminator no line wrap,
 #### TERMINOLOGY
 # http://enlightenment.org
 #
-# Tested terminology-0.3.0, using tack and vttest.  This is not a vt100
+# Tested terminology-0.3.0, 0.6.1, using tack and vttest.  This is not a vt100
 # emulator, nor is it compatible with xterm, but it uses a few features from
 # both -TD
 #
@@ -5718,20 +5718,21 @@ terminator|Terminator no line wrap,
 #      no blink
 #      uses bce model for colors, but (see below) fails the vttest screens
 #      has partial support for 256color feature.
-#      tack cursor-keys:
+#      tack function-keys (a subset of xterm+pcf0), and
+#      tack cursor-keys (a subset of xterm+pce2):
 #                      ctrl+shift (ignored)
 #              2       shift
 #                      shift-alt modifier -> shift (2)
 #              3       alt
 #              4
 #              5       ctrl
-#      tack modifiers do not work for fkeys
+#      tack modifiers did not work for fkeys in 0.3.0; subset works in 0.6.1
 #      ctrl + khome/kend works - none of the other modifiers do
 # vttest -
 #      spits lots of messages from termptyesc.c especially in vttest.
 #      no 132-column mode
 #      fails menu 1, 2 (definitely not vt100-compatible)
-#      primary and
+#      primary (claims vt420 with several options, apparently none work) and
 #      secondary report says (perhaps... vt420): \E[>41;285;0c
 #      CHA, HPR, VPA, CNL, CPL work
 #      BCE with ED/EL - fail
@@ -5742,6 +5743,10 @@ terminator|Terminator no line wrap,
 #      X10 and Normal mouse work
 #      Any-event mouse works
 #      Mouse button-event works
+#
+# This description uses xterm+pcf0, which is misleading because the program
+# does not handle combinations of modifiers - but listing them all would
+# involve more effort than its developers spent -TD
 terminology|EFL-based terminal emulator,
        mc5i@, xon@,
        blink@, ed@, el@, el1@, invis=\E[8m, kLFT=\E[1;2D,
@@ -5756,7 +5761,7 @@ terminology|EFL-based terminal emulator,
        kLFT3=\E[1;3D, kLFT4=\E[1;4D, kLFT5=\E[1;5D,
        kLFT6=\E[1;6D, kLFT7=\E[1;7D, kRIT3=\E[1;3C,
        kRIT4=\E[1;4C, kRIT5=\E[1;5C, kRIT6=\E[1;6C,
-       kRIT7=\E[1;7C, kUP=\E[1;2A, use=vt100,
+       kRIT7=\E[1;7C, kUP=\E[1;2A, use=xterm+pcf0, use=vt100,
        use=xterm+256setaf,
 
 ######## UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS
@@ -23564,4 +23569,8 @@ v3220|LANPAR Vision II model 3220/3221/3222,
 # 2014-10-11
 #      + add xterm-x10mouse, xterm-x11mouse, etc. -TD
 #
+# 2014-10-18
+#      + reviewed terminology 0.6.1, add function key definitions.  None of
+#        the vt100-compatibility issues were improved -TD
+#
 ######## SHANTIH!  SHANTIH!  SHANTIH!
index cd46d0c9e21250db77404b061c7f9b2812341ee3..1b3fa4e51840c42f65a3cf36d0c446ce39b5802b 100644 (file)
@@ -84,7 +84,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_mouse.c,v 1.162 2014/10/12 00:03:37 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.163 2014/10/18 10:32:02 tom Exp $")
 
 #include <tic.h>
 
@@ -1097,7 +1097,7 @@ decode_xterm_1005(SCREEN *sp, MEVENT * eventp)
                            kbuf + grabbed, 1);
        if (res == -1)
            break;
-       grabbed += res;
+       grabbed += (size_t) res;
        if (grabbed > 1) {
            size_t check = 1;
            int n;
@@ -1105,10 +1105,11 @@ decode_xterm_1005(SCREEN *sp, MEVENT * eventp)
            for (n = 0; n < 2; ++n) {
                if (check >= grabbed)
                    break;
-               rc = _nc_conv_to_utf32(&coords[n], kbuf + check, grabbed - check);
+               rc = _nc_conv_to_utf32(&coords[n], kbuf + check, (unsigned)
+                                      (grabbed - check));
                if (!rc)
                    break;
-               check += rc;
+               check += (size_t) rc;
            }
            if (n >= 2)
                break;
@@ -1127,8 +1128,8 @@ decode_xterm_1005(SCREEN *sp, MEVENT * eventp)
 
     result = decode_X10_bstate(sp, eventp, UChar(kbuf[0]));
 
-    eventp->x = (coords[0] - ' ') - 1;
-    eventp->y = (coords[1] - ' ') - 1;
+    eventp->x = (int) (coords[0] - ' ') - 1;
+    eventp->y = (int) (coords[1] - ' ') - 1;
 
     return result;
 }
index 27e3e7f4d2d29198e6263b59f82ca7af0cd4d999..1eca2790fca0389cc28e5d8a52025ae6d595689e 100644 (file)
@@ -45,7 +45,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: resizeterm.c,v 1.46 2014/03/08 20:32:59 tom Exp $")
+MODULE_ID("$Id: resizeterm.c,v 1.47 2014/10/13 08:56:49 tom Exp $")
 
 /*
  * If we're trying to be reentrant, do not want any local statics.
@@ -347,7 +347,7 @@ NCURSES_SP_NAME(resize_term) (NCURSES_SP_DCLx int ToLines, int ToCols)
        (SP_PARM == 0) ? -1 : screen_lines(SP_PARM),
        (SP_PARM == 0) ? -1 : screen_columns(SP_PARM)));
 
-    if (SP_PARM == 0) {
+    if (SP_PARM == 0 || ToLines <= 0 || ToCols <= 0) {
        returnCode(ERR);
     }
 
@@ -466,7 +466,7 @@ NCURSES_SP_NAME(resizeterm) (NCURSES_SP_DCLx int ToLines, int ToCols)
        (SP_PARM == 0) ? -1 : screen_lines(SP_PARM),
        (SP_PARM == 0) ? -1 : screen_columns(SP_PARM)));
 
-    if (SP_PARM != 0) {
+    if (SP_PARM != 0 && ToLines > 0 && ToCols > 0) {
        result = OK;
        SP_PARM->_sig_winch = FALSE;
 
index 5f35b73d282c7b29a35a0e21962e6dbb4ef8dd8c..81d8caca1a8e8da0a11b07db177d7917664d8be8 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20141011) unstable; urgency=low
+ncurses6 (5.9-20141018) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Wed, 08 Oct 2014 21:02:28 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 13 Oct 2014 04:53:05 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 5f35b73d282c7b29a35a0e21962e6dbb4ef8dd8c..81d8caca1a8e8da0a11b07db177d7917664d8be8 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20141011) unstable; urgency=low
+ncurses6 (5.9-20141018) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Wed, 08 Oct 2014 21:02:28 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 13 Oct 2014 04:53:05 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index c3c8681379831c1900ea07110280189cfb18c453..e7542d4458faabb5fa102e629296add6dfdba337 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (5.9-20141011) unstable; urgency=low
+ncurses6 (5.9-20141018) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Wed, 08 Oct 2014 21:02:28 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Mon, 13 Oct 2014 04:53:05 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 6843c40f761144f849d35916f44a706abaf186af..cbff7e381fc5d842747aca81e4f3b7655a4f446f 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.65 2014/10/09 01:02:28 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.66 2014/10/13 08:53:05 tom Exp $\r
 \r
 ; TODO add examples\r
 ; TODO bump ABI to 6\r
@@ -10,7 +10,7 @@
 !define VERSION_MAJOR "5"\r
 !define VERSION_MINOR "9"\r
 !define VERSION_YYYY  "2014"\r
-!define VERSION_MMDD  "1011"\r
+!define VERSION_MMDD  "1018"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index 21108cfce21b77c9c2f85ca8c469f39e9d9cb23c..300e6848a57f5fdb3ad7dabb0e6f20b8264d384f 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 5.9
-Release: 20141011
+Release: 20141018
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 83035483ce8af065129e2227c36a6c456df49e6a..49583850c49913454f0c31cfd6d8a425b17cd6af 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 5.9
-Release: 20141011
+Release: 20141018
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 65de9f9bc1f10f9c648e1341075789a0c81a824b..0f6a8b05bab399521c8033541c3bb0f67aab74d5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -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.111 2013/12/15 01:05:20 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.114 2014/10/18 09:32:54 tom Exp $")
 
 #define INDENT                 8
 #define DISCARD(string) string = ABSENT_STRING
@@ -470,7 +470,7 @@ indent_DYN(DYNBUF * buffer, int level)
        strncpy_DYN(buffer, "\t", (size_t) 1);
 }
 
-static bool
+bool
 has_params(const char *src)
 {
     bool result = FALSE;
@@ -791,10 +791,13 @@ fmt_entry(TERMTYPE *tterm,
                            "%s@", name);
                WRAP_CONCAT;
            } else if (outform == F_TERMCAP || outform == F_TCONVERR) {
-               int params = ((i < (int) SIZEOF(parametrized))
-                             ? parametrized[i]
-                             : 0);
                char *srccap = _nc_tic_expand(capability, TRUE, numbers);
+               int params = (((i < (int) SIZEOF(parametrized)) &&
+                              (i < STRCOUNT))
+                             ? parametrized[i]
+                             : ((*srccap == 'k')
+                                ? 0
+                                : has_params(srccap)));
                char *cv = _nc_infotocap(name, srccap, params);
 
                if (cv == 0) {
index cb2a44fe7d4f8bddac5a93764f1bb2c9ead88a0d..8b618089d81d92e2ebc99f2c6871598a141025d9 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2013,2014 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            *
@@ -33,7 +33,7 @@
  ****************************************************************************/
 
 /*
- * $Id: dump_entry.h,v 1.33 2013/12/15 01:08:03 tom Exp $
+ * $Id: dump_entry.h,v 1.34 2014/10/18 09:34:15 tom Exp $
  *
  * Dump control definitions and variables
  */
@@ -67,6 +67,7 @@ typedef int (*PredFunc) (PredType, PredIdx);
 typedef void (*PredHook) (PredType, PredIdx, const char *);
 
 extern NCURSES_CONST char *nametrans(const char *);
+extern bool has_params(const char *src);
 extern int fmt_entry(TERMTYPE *, PredFunc, int, int, int, int);
 extern int show_entry(void);
 extern void compare_entry(PredHook, TERMTYPE *, bool);
index 618419c847ce5300104f99b998de7d00a7376069..763c2b790a0e9cac6fc4524275a0657d7084b26c 100644 (file)
@@ -48,7 +48,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.207 2014/06/15 00:36:45 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.208 2014/10/18 09:34:29 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -1891,12 +1891,15 @@ same_ti_tc(const char *ti, const char *tc, bool * embedded)
  * Check terminfo to termcap translation.
  */
 static void
-check_infotocap(TERMTYPE *tp, int i, char *value)
+check_infotocap(TERMTYPE *tp, int i, const char *value)
 {
     const char *name = ExtStrname(tp, i, strnames);
-    int params = ((i < (int) SIZEOF(parametrized))
+    int params = (((i < (int) SIZEOF(parametrized)) &&
+                  (i < STRCOUNT))
                  ? parametrized[i]
-                 : 0);
+                 : ((*value == 'k')
+                    ? 0
+                    : has_params(value)));
     int to_char = 0;
     char *ti_value;
     char *tc_value;