From: Thomas E. Dickey Date: Sat, 28 Apr 2018 22:44:02 +0000 (+0000) Subject: ncurses 6.1 - patch 20180428 X-Git-Tag: v6.2~91 X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff_plain;h=ed8a29294ebe0c24db40d32e9a4e0268afb6529d;ds=sidebyside ncurses 6.1 - patch 20180428 + document new form-extension O_EDGE_INSERT_STAY (report by Leon Winter). + correct error-returns listed in manual pages for a few form functions (report by Leon Winter). + add a check in form-library for null-pointer dereference: unfocus_current_field (form); form_driver (form, REQ_VALIDATION); (patch by Leon Winter). --- diff --git a/NEWS b/NEWS index 1811e57b..4ce3258f 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.3115 2018/04/14 21:22:06 tom Exp $ +-- $Id: NEWS,v 1.3119 2018/04/28 21:26:58 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. +20180428 + + document new form-extension O_EDGE_INSERT_STAY (report by Leon + Winter). + + correct error-returns listed in manual pages for a few form functions + (report by Leon Winter). + + add a check in form-library for null-pointer dereference: + unfocus_current_field (form); + form_driver (form, REQ_VALIDATION); + (patch by Leon Winter). + 20180414 + modify form library to optionally delay cursor movement on a field edge/boundary (patch by Leon Winter). @@ -61,7 +71,7 @@ it is not possible to add this information. + use "const" in some prototypes rather than NCURSES_CONST where X/Open Curses was updated to do this, e.g., wscanw, newterm, the terminfo interface. Also use "const" for consistency in the termcap - interface, which was withdrawn by X/Open Curses in Issue 5 (2007). + interface, which was withdrawn by X/Open Curses in Issue 5 (2007). As of Issue 7, X/Open Curses still lacks "const" for certain return values, e.g., keyname(). diff --git a/VERSION b/VERSION index 1aed5674..b5aa960b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.1 20180414 +5:0:10 6.1 20180428 diff --git a/dist.mk b/dist.mk index adae67ed..05ba0a0b 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.1219 2018/04/14 16:58:18 tom Exp $ +# $Id: dist.mk,v 1.1221 2018/04/28 14:18:55 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 = 20180414 +NCURSES_PATCH = 20180428 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/frm_driver.c b/form/frm_driver.c index 3e1ccd64..b07ca7cd 100644 --- a/form/frm_driver.c +++ b/form/frm_driver.c @@ -32,7 +32,7 @@ #include "form.priv.h" -MODULE_ID("$Id: frm_driver.c,v 1.125 2018/04/14 21:18:03 Leon.Winter Exp $") +MODULE_ID("$Id: frm_driver.c,v 1.126 2018/04/28 19:03:36 Leon.Winter Exp $") /*---------------------------------------------------------------------------- This is the core module of the form library. It contains the majority @@ -4367,7 +4367,7 @@ form_driver(FORM *form, int c) if (!form) RETURN(E_BAD_ARGUMENT); - if (!(form->field)) + if (!(form->field) || !(form->current)) RETURN(E_NOT_CONNECTED); assert(form->page); diff --git a/man/form_driver.3x b/man/form_driver.3x index a40be36e..ff33cff3 100644 --- a/man/form_driver.3x +++ b/man/form_driver.3x @@ -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 * @@ -26,7 +26,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_driver.3x,v 1.28 2017/11/18 23:47:37 tom Exp $ +.\" $Id: form_driver.3x,v 1.29 2018/04/28 19:58:58 tom Exp $ .TH form_driver 3X "" .de bP .ie n .IP \(bu 4 @@ -233,6 +233,9 @@ The form has not been posted. .B E_INVALID_FIELD Contents of field is invalid. .TP 5 +.B E_NOT_CONNECTED +No fields are connected to the form. +.TP 5 .B E_REQUEST_DENIED The form driver could not process the request. .TP 5 diff --git a/man/form_field_opts.3x b/man/form_field_opts.3x index 374626b8..58991d3b 100644 --- a/man/form_field_opts.3x +++ b/man/form_field_opts.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2015,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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_opts.3x,v 1.20 2015/12/05 23:53:43 tom Exp $ +.\" $Id: form_field_opts.3x,v 1.21 2018/04/28 21:24:57 tom Exp $ .TH form_field_opts 3X "" .SH NAME \fBset_field_opts\fP, @@ -101,6 +101,15 @@ Permit dynamic fields to be justified, like static fields. .TP 5 O_NO_LEFT_STRIP Preserve leading whitespace in the field buffer, which is normally discarded. +.TP 5 +O_EDGE_INSERT_STAY +When inserting into a field up to the boundary position, +optionally delay the scrolling, +so that the last inserted character remains visible, +but advance the cursor to reflect the insertion. +This allows the form library to display the +inserted character in one-character fields +as well as allowing the library to maintain consistent state. .SH RETURN VALUE Except for \fBfield_opts\fR, each routine returns one of the following: .TP 5 diff --git a/man/form_new_page.3x b/man/form_new_page.3x index e7113809..6bbd8afe 100644 --- a/man/form_new_page.3x +++ b/man/form_new_page.3x @@ -1,6 +1,6 @@ '\" t .\"*************************************************************************** -.\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc. * +.\" Copyright (c) 1998-2015,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 * @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_new_page.3x,v 1.11 2015/12/05 23:42:45 tom Exp $ +.\" $Id: form_new_page.3x,v 1.12 2018/04/28 19:58:50 tom Exp $ .TH form_new_page 3X "" .SH NAME \fBset_new_page\fR, @@ -48,14 +48,11 @@ a page beginning on its form. .SH RETURN VALUE The function \fBnew_page\fR returns \fBTRUE\fR or \fBFALSE\fR. .PP -The function \fBset_new_page\fR return one of the following: +The function \fBset_new_page\fR returns one of the following: .TP 5 .B E_OK The routine succeeded. .TP 5 -.B E_SYSTEM_ERROR -System error occurred (see \fBerrno\fR). -.TP 5 .B E_CONNECTED The given field is already connected to a form. .SH SEE ALSO diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index 6aeabb20..7bfef6df 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180414) unstable; urgency=low +ncurses6 (6.1+20180428) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 14 Apr 2018 12:58:18 -0400 + -- Thomas E. Dickey Sat, 28 Apr 2018 10:18:56 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index 6aeabb20..7bfef6df 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180414) unstable; urgency=low +ncurses6 (6.1+20180428) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 14 Apr 2018 12:58:18 -0400 + -- Thomas E. Dickey Sat, 28 Apr 2018 10:18:56 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 839b40fc..a31019e1 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.1+20180414) unstable; urgency=low +ncurses6 (6.1+20180428) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 14 Apr 2018 12:58:18 -0400 + -- Thomas E. Dickey Sat, 28 Apr 2018 10:18:56 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index b049bc96..e105da1d 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.266 2018/04/14 16:58:18 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.268 2018/04/28 14:18:55 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 "0414" +!define VERSION_MMDD "0428" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 9a5ba082..48a645b3 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: 20180414 +Release: 20180428 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index 3a75edcc..d83ff220 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: 20180414 +Release: 20180428 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz