-- 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
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.
-5:0:10 6.1 20180407
+5:0:10 6.1 20180414
# 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
# 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)
/****************************************************************************
- * 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 *
* 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
#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)
/****************************************************************************
- * 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 *
* 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
#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)
/****************************************************************************
- * 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 *
#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
{
FIELD *field;
WINDOW *formwin;
+ int row, col;
if (!form)
return (E_BAD_ARGUMENT);
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
| 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)
{
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,
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);
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)
****************************************************************************/
/*
- * $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
*
#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
/****************************************************************************
- * 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 *
/* ./tty/hardscroll.c */
#include <curses.priv.h>
+
#undef _nc_oldnums
int *_nc_oldnums;
const TERMTYPE2 *src)
{ /* void */ }
-#undef _nc_import_termtype2
-void _nc_import_termtype2(
- TERMTYPE2 *dst,
- const TERMTYPE *src)
- { /* void */ }
-
/* ./codes.c */
#undef _nc_boolcodes
/****************************************************************************
- * 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 *
const TERMTYPE2 *src)
{ /* void */ }
-#undef _nc_import_termtype2
-void _nc_import_termtype2(
- TERMTYPE2 *dst,
- const TERMTYPE *src)
- { /* void */ }
-
/* ./codes.c */
#undef boolcodes
/****************************************************************************
- * 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 *
const TERMTYPE2 *src)
{ /* void */ }
-#undef _nc_import_termtype2
-void _nc_import_termtype2(
- TERMTYPE2 *dst,
- const TERMTYPE *src)
- { /* void */ }
-
/* ./codes.c */
#undef _nc_boolcodes
/****************************************************************************
- * 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 *
const TERMTYPE2 *src)
{ /* void */ }
-#undef _nc_import_termtype2
-void _nc_import_termtype2(
- TERMTYPE2 *dst,
- const TERMTYPE *src)
- { /* void */ }
-
/* ./codes.c */
#undef boolcodes
/****************************************************************************
- * 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 *
#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
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
/****************************************************************************
- * 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 *
#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
/*
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;
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 */
#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;
{
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;
}
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.
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) \
char *lookfor = qp->uses[i].name;
long lookline = qp->uses[i].line;
+ if (lookfor == 0)
+ continue;
+
foundit = FALSE;
_nc_set_type(child);
* 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;
/****************************************************************************
- * 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 *
#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[] =
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;
* 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);
#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))
{
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);
-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
-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
-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
-; $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
!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
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
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