ncurses 6.1 - patch 20180414
authorThomas E. Dickey <dickey@invisible-island.net>
Sat, 14 Apr 2018 22:50:05 +0000 (22:50 +0000)
committerThomas E. Dickey <dickey@invisible-island.net>
Sat, 14 Apr 2018 22:50:05 +0000 (22:50 +0000)
+ modify form library to optionally delay cursor movement on a field
  edge/boundary (patch by Leon Winter).
+ modify form library to avoid unnecessary update of cursor position in
  non-public fields (patch by Leon Winter).
+ remove unused _nc_import_termtype2() function.
+ also add/improve null-pointer checks in other places
+ add a null-pointer check in _nc_parse_entry to handle an error when
  a use-name is invalid syntax (report by Chung-Yi Lin).

22 files changed:
NEWS
VERSION
dist.mk
form/form.h
form/form.priv.h
form/frm_driver.c
ncurses/curses.priv.h
ncurses/llib-lncursestw
ncurses/llib-lncursesw
ncurses/llib-ltinfotw
ncurses/llib-ltinfow
ncurses/tinfo/alloc_entry.c
ncurses/tinfo/alloc_ttype.c
ncurses/tinfo/comp_parse.c
ncurses/tinfo/parse_entry.c
ncurses/tinfo/read_entry.c
package/debian-mingw/changelog
package/debian-mingw64/changelog
package/debian/changelog
package/mingw-ncurses.nsi
package/mingw-ncurses.spec
package/ncurses.spec

diff --git a/NEWS b/NEWS
index 6027e9a8a4572f072907fd017e83464c03779bf6..1811e57b7fdfd1d810df339db74abc18f0721837 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.3111 2018/04/08 00:56:30 tom Exp $
+-- $Id: NEWS,v 1.3115 2018/04/14 21:22:06 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.
 
+20180414
+       + modify form library to optionally delay cursor movement on a field
+         edge/boundary (patch by Leon Winter).
+       + modify form library to avoid unnecessary update of cursor position in
+         non-public fields (patch by Leon Winter).
+       + remove unused _nc_import_termtype2() function.
+       + also add/improve null-pointer checks in other places
+       + add a null-pointer check in _nc_parse_entry to handle an error when
+         a use-name is invalid syntax (report by Chung-Yi Lin).
+
 20180407
        + clarify in manual pages that vwprintw and vwscanw are obsolete,
          not part of X/Open Curses since 2007.
diff --git a/VERSION b/VERSION
index 087738b277cc5ccb7ded1b88b6f80a2ce53e434b..1aed567445313da0cee161d9d115c47603cb0be0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5:0:10 6.1     20180407
+5:0:10 6.1     20180414
diff --git a/dist.mk b/dist.mk
index 0496e0ec157bce07f06a99dbcd5b9cf3bcff8bc0..adae67edd6298d6026a1ce131a7e5fa3ff195766 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.1218 2018/04/07 13:38:08 tom Exp $
+# $Id: dist.mk,v 1.1219 2018/04/14 16:58:18 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 = 20180407
+NCURSES_PATCH = 20180414
 
 # We don't append the patch to the version, since this only applies to releases
 VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
index f11807f593df6c35a04c9fb2d18a91a338fe2f30..1d4c241d65af766048b208bb97ba6254db2e2c4c 100644 (file)
@@ -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            *
@@ -30,7 +30,7 @@
  *   Author:  Juergen Pfeifer, 1995,1997                                    *
  ****************************************************************************/
 
-/* $Id: form.h,v 0.27 2017/02/11 16:35:42 tom Exp $ */
+/* $Id: form.h,v 0.28 2018/04/14 21:06:21 Leon.Winter Exp $ */
 
 #ifndef FORM_H
 #define FORM_H
@@ -222,6 +222,7 @@ typedef void (*Form_Hook)(FORM *);
 #define O_STATIC               (0x0200U)
 #define O_DYNAMIC_JUSTIFY      (0x0400U)       /* ncurses extension    */
 #define O_NO_LEFT_STRIP                (0x0800U)       /* ncurses extension    */
+#define O_EDGE_INSERT_STAY      (0x1000U)      /* ncurses extension    */
 
 /* form options */
 #define O_NL_OVERLOAD          (0x0001U)
index ad25ec2d2fbfac69361925bed1fe7b9c2d0b0d69..e48a9f26e68af399e0bd9c8ccf8c6263304b82c2 100644 (file)
@@ -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            *
@@ -30,7 +30,7 @@
  *   Author:  Juergen Pfeifer, 1995,1997                                    *
  ****************************************************************************/
 
-/* $Id: form.priv.h,v 0.42 2017/02/11 16:12:19 tom Exp $ */
+/* $Id: form.priv.h,v 0.43 2018/04/14 21:06:14 Leon.Winter Exp $ */
 
 #ifndef FORM_PRIV_H
 #define FORM_PRIV_H 1
@@ -166,7 +166,8 @@ TypeArgument;
 #define ALL_FIELD_OPTS (Field_Options)( \
                        STD_FIELD_OPTS |\
                        O_DYNAMIC_JUSTIFY |\
-                       O_NO_LEFT_STRIP)
+                       O_NO_LEFT_STRIP |\
+                       O_EDGE_INSERT_STAY)
 
 #define C_BLANK ' '
 #define is_blank(c) ((c)==C_BLANK)
index 837b02a1b6d49f37679432c49f08446e11b8f3ae..3e1ccd64e9cd6cffcd196eb0babbd61b4a1d826b 100644 (file)
@@ -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            *
@@ -32,7 +32,7 @@
 
 #include "form.priv.h"
 
-MODULE_ID("$Id: frm_driver.c,v 1.123 2017/09/09 22:35:49 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.125 2018/04/14 21:18:03 Leon.Winter Exp $")
 
 /*----------------------------------------------------------------------------
   This is the core module of the form library. It contains the majority
@@ -830,6 +830,7 @@ _nc_Position_Form_Cursor(FORM *form)
 {
   FIELD *field;
   WINDOW *formwin;
+  int row, col;
 
   if (!form)
     return (E_BAD_ARGUMENT);
@@ -840,14 +841,17 @@ _nc_Position_Form_Cursor(FORM *form)
   field = form->current;
   formwin = Get_Form_Window(form);
 
-  wmove(form->w, form->currow, form->curcol);
+  col = Field_Has_Option(field, O_PUBLIC) ? form->curcol : form->begincol;
+  row = Field_Has_Option(field, O_PUBLIC) ? form->currow : form->toprow;
+
+  wmove(form->w, row, col);
   if (Has_Invisible_Parts(field))
     {
       /* in this case fieldwin isn't derived from formwin, so we have
          to move the cursor in formwin by hand... */
       wmove(formwin,
-           field->frow + form->currow - form->toprow,
-           field->fcol + form->curcol - form->begincol);
+           field->frow + row - form->toprow,
+           field->fcol + col - form->begincol);
       wcursyncup(formwin);
     }
   else
@@ -866,6 +870,7 @@ _nc_Position_Form_Cursor(FORM *form)
 |                    E_BAD_ARGUMENT    - invalid form pointer
 |                    E_SYSTEM_ERROR    - general error
 +--------------------------------------------------------------------------*/
+static bool move_after_insert = true;
 NCURSES_EXPORT(int)
 _nc_Refresh_Current_Field(FORM *form)
 {
@@ -897,7 +902,8 @@ _nc_Refresh_Current_Field(FORM *form)
              else
                {
                  if (form->curcol >= (form->begincol + field->cols))
-                   form->begincol = form->curcol - field->cols + 1;
+                   form->begincol = form->curcol - field->cols
+                     + (move_after_insert ? 1 : 0);
                }
              copywin(form->w,
                      formwin,
@@ -4184,6 +4190,12 @@ Data_Entry(FORM *form, int c)
          bool End_Of_Field = (((field->drows - 1) == form->currow) &&
                               ((field->dcols - 1) == form->curcol));
 
+         if (Field_Has_Option(field, O_EDGE_INSERT_STAY))
+           move_after_insert = !!(form->curcol
+                                  - form->begincol
+                                  - field->cols
+                                  + 1);
+
          SetStatus(form, _WINDOW_MODIFIED);
          if (End_Of_Field && !Growable(field) && (Field_Has_Option(field, O_AUTOSKIP)))
            result = Inter_Field_Navigation(FN_Next_Field, form);
@@ -4348,6 +4360,8 @@ form_driver(FORM *form, int c)
   const Binding_Info *BI = (Binding_Info *) 0;
   int res = E_UNKNOWN_COMMAND;
 
+  move_after_insert = true;
+
   T((T_CALLED("form_driver(%p,%d)"), (void *)form, c));
 
   if (!form)
index 46430e8acd109109adeb4ee8a71de25b76f526f8..0186578d221078132f5ebadb18e72c5a5aa9db0e 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.599 2018/04/07 21:47:46 tom Exp $
+ * $Id: curses.priv.h,v 1.600 2018/04/14 19:28:44 tom Exp $
  *
  *     curses.priv.h
  *
@@ -2209,11 +2209,9 @@ extern NCURSES_EXPORT(const TERMTYPE2 *) _nc_fallback2 (const char *);
 #if NCURSES_EXT_NUMBERS
 extern NCURSES_EXPORT(void) _nc_copy_termtype2 (TERMTYPE2 *, const TERMTYPE2 *);
 extern NCURSES_EXPORT(void) _nc_export_termtype2(TERMTYPE *, const TERMTYPE2 *);
-extern NCURSES_EXPORT(void) _nc_import_termtype2(TERMTYPE2 *, const TERMTYPE *);
 #else
 #define _nc_copy_termtype2(dst,src) _nc_copy_termtype((dst),(src))
 #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
index 8088e8b714f94bdea606727bb324d23640fcd605..6800e6076ecafafa59ef45c3db4133dfa74fbef0 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2009-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 2009-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            *
@@ -34,6 +34,7 @@
 /* ./tty/hardscroll.c */
 
 #include <curses.priv.h>
+
 #undef _nc_oldnums
 int    *_nc_oldnums;
 
@@ -3769,12 +3770,6 @@ void     _nc_export_termtype2(
                const TERMTYPE2 *src)
                { /* void */ }
 
-#undef _nc_import_termtype2
-void   _nc_import_termtype2(
-               TERMTYPE2 *dst, 
-               const TERMTYPE *src)
-               { /* void */ }
-
 /* ./codes.c */
 
 #undef _nc_boolcodes
index 10f608dea3ce7971677fbced674c42fe51c0f750..7d0dc1baa54255dc2fef3f078dc829d92287df54 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2001-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 2001-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            *
@@ -3760,12 +3760,6 @@ void     _nc_export_termtype2(
                const TERMTYPE2 *src)
                { /* void */ }
 
-#undef _nc_import_termtype2
-void   _nc_import_termtype2(
-               TERMTYPE2 *dst, 
-               const TERMTYPE *src)
-               { /* void */ }
-
 /* ./codes.c */
 
 #undef boolcodes
index 83b025d25ea2429f8e756292c347405bab735557..0ce438d06b84f6dcc0e6245b179a7fdc80d2e52c 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2012-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 2012-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            *
@@ -110,12 +110,6 @@ void       _nc_export_termtype2(
                const TERMTYPE2 *src)
                { /* void */ }
 
-#undef _nc_import_termtype2
-void   _nc_import_termtype2(
-               TERMTYPE2 *dst, 
-               const TERMTYPE *src)
-               { /* void */ }
-
 /* ./codes.c */
 
 #undef _nc_boolcodes
index 5b8411c2260a1c1e0bfca6ff7258e37363589bd1..9ab9de0bc873f9eaba579869b572b6987962c175 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 2012-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 2012-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            *
@@ -110,12 +110,6 @@ void       _nc_export_termtype2(
                const TERMTYPE2 *src)
                { /* void */ }
 
-#undef _nc_import_termtype2
-void   _nc_import_termtype2(
-               TERMTYPE2 *dst, 
-               const TERMTYPE *src)
-               { /* void */ }
-
 /* ./codes.c */
 
 #undef boolcodes
index 09374d6e77f87181ced81f2d13bc652e3d472b8b..fe7892f4c6184275f806211cec537631213c2a4b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2013,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            *
@@ -47,7 +47,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_entry.c,v 1.61 2017/08/25 09:09:08 tom Exp $")
+MODULE_ID("$Id: alloc_entry.c,v 1.62 2018/04/14 20:32:09 tom Exp $")
 
 #define ABSENT_OFFSET    -1
 #define CANCELLED_OFFSET -2
@@ -229,6 +229,9 @@ _nc_merge_entry(ENTRY * const target, ENTRY * const source)
     TERMTYPE2 *from = &(source->tterm);
     unsigned i;
 
+    if (source == 0 || from == 0 || target == 0 || to == 0)
+       return;
+
 #if NCURSES_XNAMES
     _nc_align_termtype(to, from);
 #endif
index 4a1b691382c86fb6551f9c2d8063342d7c3fb18e..6e830d0fdf003eb17af7664df63286b75a27542e 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1999-2016,2017 Free Software Foundation, Inc.              *
+ * Copyright (c) 1999-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            *
@@ -42,7 +42,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: alloc_ttype.c,v 1.29 2017/04/09 23:15:34 tom Exp $")
+MODULE_ID("$Id: alloc_ttype.c,v 1.30 2018/04/14 19:24:54 tom Exp $")
 
 #if NCURSES_XNAMES
 /*
@@ -388,12 +388,16 @@ adjust_cancels(TERMTYPE2 *to, TERMTYPE2 *from)
 NCURSES_EXPORT(void)
 _nc_align_termtype(TERMTYPE2 *to, TERMTYPE2 *from)
 {
-    int na = (int) NUM_EXT_NAMES(to);
-    int nb = (int) NUM_EXT_NAMES(from);
+    int na;
+    int nb;
     char **ext_Names;
 
-    DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)", na, to->term_names,
-             nb, from->term_names));
+    na = to ? ((int) NUM_EXT_NAMES(to)) : 0;
+    nb = from ? ((int) NUM_EXT_NAMES(from)) : 0;
+
+    DEBUG(2, ("align_termtype to(%d:%s), from(%d:%s)",
+             na, to ? NonNull(to->term_names) : "?",
+             nb, from ? NonNull(from->term_names) : "?"));
 
     if (na != 0 || nb != 0) {
        int ext_Booleans, ext_Numbers, ext_Strings;
@@ -592,12 +596,4 @@ _nc_export_termtype2(TERMTYPE *dst, const TERMTYPE2 *src)
     DEBUG(2, ("_nc_export_termtype2..."));
     copy_termtype((TERMTYPE2 *) dst, src, srcINT);
 }
-
-/* FIXME - this will go away when conversion is complete */
-NCURSES_EXPORT(void)
-_nc_import_termtype2(TERMTYPE2 *dst, const TERMTYPE *src)
-{
-    DEBUG(2, ("_nc_import_termtype2..."));
-    copy_termtype(dst, (const TERMTYPE2 *) src, dstINT);
-}
 #endif /* NCURSES_EXT_NUMBERS */
index 6aa0e0396d382f5dd41b718112d523ab18971239..b97332ebc990c007f33975cfdc4eca57ac1db062 100644 (file)
@@ -47,7 +47,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: comp_parse.c,v 1.101 2018/02/24 22:33:40 tom Exp $")
+MODULE_ID("$Id: comp_parse.c,v 1.105 2018/04/14 20:33:44 tom Exp $")
 
 static void sanity_check2(TERMTYPE2 *, bool);
 NCURSES_IMPEXP void NCURSES_API(*_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2;
@@ -271,9 +271,13 @@ find_capname(TERMTYPE2 *p, const char *name)
 {
     unsigned num_names = NUM_EXT_NAMES(p);
     unsigned n;
-    for (n = 0; n < num_names; ++n) {
-       if (!strcmp(p->ext_Names[n], name))
-           break;
+    if (name != 0) {
+       for (n = 0; n < num_names; ++n) {
+           if (!strcmp(p->ext_Names[n], name))
+               break;
+       }
+    } else {
+       n = num_names + 1;
     }
     return n;
 }
@@ -320,6 +324,11 @@ name_of_captype(int which)
     return result;
 }
 
+#define valid_TERMTYPE2(p) \
+       ((p) != 0 && \
+        (p)->term_names != 0 && \
+        (p)->ext_Names != 0)
+
 /*
  * Disallow changing the type of an extended capability when doing a "use"
  * if one or the other is a string.
@@ -328,42 +337,45 @@ static int
 invalid_merge(TERMTYPE2 *to, TERMTYPE2 *from)
 {
     int rc = FALSE;
-    char *to_name = _nc_first_name(to->term_names);
-    char *from_name = strdup(_nc_first_name(from->term_names));
-    unsigned num_names = NUM_EXT_NAMES(from);
-    unsigned n;
-
-    for (n = 0; n < num_names; ++n) {
-       const char *capname = from->ext_Names[n];
-       int tt = extended_captype(to, find_capname(to, capname));
-       int tf = extended_captype(from, n);
-
-       if (tt <= STRING
-           && tf <= STRING
-           && (tt == STRING) != (tf == STRING)) {
-           if (from_name != 0 && strcmp(to_name, from_name)) {
-               DEBUG(2,
-                     ("merge of %s to %s changes type of %s from %s to %s",
-                      from_name,
-                      to_name,
-                      from->ext_Names[n],
-                      name_of_captype(tf),
-                      name_of_captype(tt)));
-           } else {
-               DEBUG(2, ("merge of %s changes type of %s from %s to %s",
-                         to_name,
-                         from->ext_Names[n],
-                         name_of_captype(tf),
-                         name_of_captype(tt)));
+    if (valid_TERMTYPE2(to)
+       && valid_TERMTYPE2(from)) {
+       char *to_name = _nc_first_name(to->term_names);
+       char *from_name = strdup(_nc_first_name(from->term_names));
+       unsigned num_names = NUM_EXT_NAMES(from);
+       unsigned n;
+
+       for (n = 0; n < num_names; ++n) {
+           const char *capname = from->ext_Names[n];
+           int tt = extended_captype(to, find_capname(to, capname));
+           int tf = extended_captype(from, n);
+
+           if (tt <= STRING
+               && tf <= STRING
+               && (tt == STRING) != (tf == STRING)) {
+               if (from_name != 0 && strcmp(to_name, from_name)) {
+                   DEBUG(2,
+                         ("merge of %s to %s changes type of %s from %s to %s",
+                          from_name,
+                          to_name,
+                          from->ext_Names[n],
+                          name_of_captype(tf),
+                          name_of_captype(tt)));
+               } else {
+                   DEBUG(2, ("merge of %s changes type of %s from %s to %s",
+                             to_name,
+                             from->ext_Names[n],
+                             name_of_captype(tf),
+                             name_of_captype(tt)));
+               }
+               _nc_warning("merge changes type of %s from %s to %s",
+                           from->ext_Names[n],
+                           name_of_captype(tf),
+                           name_of_captype(tt));
+               rc = TRUE;
            }
-           _nc_warning("merge changes type of %s from %s to %s",
-                       from->ext_Names[n],
-                       name_of_captype(tf),
-                       name_of_captype(tt));
-           rc = TRUE;
        }
+       free(from_name);
     }
-    free(from_name);
     return rc;
 }
 #define validate_merge(p, q) \
@@ -425,6 +437,9 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
            char *lookfor = qp->uses[i].name;
            long lookline = qp->uses[i].line;
 
+           if (lookfor == 0)
+               continue;
+
            foundit = FALSE;
 
            _nc_set_type(child);
@@ -502,7 +517,8 @@ _nc_resolve_uses2(bool fullresolve, bool literal)
                     * subsequent pass.
                     */
                    for (i = 0; i < qp->nuses; i++)
-                       if (qp->uses[i].link->nuses) {
+                       if (qp->uses[i].link
+                           && qp->uses[i].link->nuses) {
                            DEBUG(2, ("%s: use entry %d unresolved",
                                      _nc_first_name(qp->tterm.term_names), i));
                            goto incomplete;
index 2b54f45d6d49911e5a03838057089c4c078dc689..437f12235fd83c0ba16a6d04506ce1d4bb5d8491 100644 (file)
@@ -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            *
@@ -47,7 +47,7 @@
 #include <ctype.h>
 #include <tic.h>
 
-MODULE_ID("$Id: parse_entry.c,v 1.92 2017/08/26 19:49:50 tom Exp $")
+MODULE_ID("$Id: parse_entry.c,v 1.93 2018/04/14 17:41:12 tom Exp $")
 
 #ifdef LINT
 static short const parametrized[] =
@@ -493,7 +493,7 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
                    entryp->tterm.Numbers[entry_ptr->nte_index] = MAX_NUMBER;
                } else {
                    entryp->tterm.Numbers[entry_ptr->nte_index] =
-                       (NCURSES_INT2) _nc_curr_token.tk_valnumber;
+                       (NCURSES_INT2) _nc_curr_token.tk_valnumber;
                }
                break;
 
@@ -543,9 +543,11 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
                 * Otherwise, look for a base entry that will already
                 * have picked up defaults via translation.
                 */
-               for (i = 0; i < entryp->nuses; i++)
-                   if (!strchr((char *) entryp->uses[i].name, '+'))
+               for (i = 0; i < entryp->nuses; i++) {
+                   if (entryp->uses[i].name != 0
+                       && !strchr(entryp->uses[i].name, '+'))
                        has_base_entry = TRUE;
+               }
            }
 
            postprocess_termcap(&entryp->tterm, has_base_entry);
index 44811512fbaec600b1fbbb339ba1e8e1a864ca4c..e56c5a1ff14057a463c33c7eb7a7b9e6d7d9a654 100644 (file)
@@ -41,7 +41,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.147 2018/04/01 01:32:39 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.148 2018/04/14 17:43:37 tom Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
@@ -837,6 +837,9 @@ _nc_read_entry2(const char *const name, char *const filename, TERMTYPE2 *const t
 {
     int code = TGETENT_NO;
 
+    if (name == 0)
+       return _nc_read_entry2("", filename, tp);
+
     _nc_SPRINTF(filename, _nc_SLIMIT(PATH_MAX)
                "%.*s", PATH_MAX - 1, name);
 
index 8a9f376c3ef0066ac329a25af3bd1c45de5178f0..6aeabb2001db81f47fd58cb14c715819578916c3 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20180407) unstable; urgency=low
+ncurses6 (6.1+20180414) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 07 Apr 2018 09:38:08 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Apr 2018 12:58:18 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 8a9f376c3ef0066ac329a25af3bd1c45de5178f0..6aeabb2001db81f47fd58cb14c715819578916c3 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20180407) unstable; urgency=low
+ncurses6 (6.1+20180414) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 07 Apr 2018 09:38:08 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Apr 2018 12:58:18 -0400
 
 ncurses6 (5.9-20131005) unstable; urgency=low
 
index 754b5d1f78a4ef0b86bd65a0c499ac101af764ef..839b40fc23b8e25a39f83387abf14c1c88622c88 100644 (file)
@@ -1,8 +1,8 @@
-ncurses6 (6.1+20180407) unstable; urgency=low
+ncurses6 (6.1+20180414) unstable; urgency=low
 
   * latest weekly patch
 
- -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 07 Apr 2018 09:38:08 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net>  Sat, 14 Apr 2018 12:58:18 -0400
 
 ncurses6 (5.9-20120608) unstable; urgency=low
 
index 2fd8e42cfeb5609b0fd61255bf6ef30901360f64..b049bc96fa11015c4b58a0ff6f04f7a21250ecad 100644 (file)
@@ -1,4 +1,4 @@
-; $Id: mingw-ncurses.nsi,v 1.265 2018/04/07 13:38:08 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.266 2018/04/14 16:58:18 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 "1"\r
 !define VERSION_YYYY  "2018"\r
-!define VERSION_MMDD  "0407"\r
+!define VERSION_MMDD  "0414"\r
 !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
 \r
 !define MY_ABI   "5"\r
index eb534f4993383ccfad0272823eebcf70e25b3c7e..9a5ba082fe83b6c38a9bcbb4b8f0e8b50106f2a1 100644 (file)
@@ -3,7 +3,7 @@
 Summary: shared libraries for terminal handling
 Name: mingw32-ncurses6
 Version: 6.1
-Release: 20180407
+Release: 20180414
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz
index 34175e418ed6ac020c0040cdfc5dcdfcef908032..3a75edcce4e946ca3fb841a8920d48c9d5d1fc92 100644 (file)
@@ -1,7 +1,7 @@
 Summary: shared libraries for terminal handling
 Name: ncurses6
 Version: 6.1
-Release: 20180407
+Release: 20180414
 License: X11
 Group: Development/Libraries
 Source: ncurses-%{version}-%{release}.tgz