From f44733b760290aa8f51c6c9e1e463254833bffcd Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Sun, 29 Mar 2020 01:03:54 +0000 Subject: [PATCH] ncurses 6.2 - patch 20200328 + correct length of buffer copied in dup_field(). + remove "$(srcdir)/" from path of library.gpr, needed for out-of-tree builds of Ada95 (patch by Adam Van Ymeren). --- Ada95/src/Makefile.in | 10 +++++----- NEWS | 7 ++++++- VERSION | 2 +- dist.mk | 4 ++-- form/fld_dup.c | 13 ++++++------- man/curs_print.3x | 4 ++-- man/form.3x | 4 ++-- man/form_field.3x | 4 ++-- man/form_field_buffer.3x | 4 ++-- man/form_field_new.3x | 6 +++--- man/form_field_userptr.3x | 4 ++-- man/form_fieldtype.3x | 4 ++-- man/form_new.3x | 4 ++-- man/form_requestname.3x | 6 +++--- man/form_userptr.3x | 4 ++-- man/menu_items.3x | 4 ++-- man/menu_mark.3x | 4 ++-- man/menu_new.3x | 4 ++-- man/menu_pattern.3x | 4 ++-- man/menu_requestname.3x | 6 +++--- man/menu_userptr.3x | 4 ++-- man/mitem_current.3x | 4 ++-- man/mitem_name.3x | 4 ++-- man/mitem_new.3x | 4 ++-- man/mitem_userptr.3x | 4 ++-- package/debian-mingw/changelog | 4 ++-- package/debian-mingw64/changelog | 4 ++-- package/debian/changelog | 4 ++-- package/mingw-ncurses.nsi | 4 ++-- package/mingw-ncurses.spec | 2 +- package/ncurses.spec | 2 +- package/ncursest.spec | 2 +- test/move_field.c | 9 +++++---- 33 files changed, 79 insertions(+), 74 deletions(-) diff --git a/Ada95/src/Makefile.in b/Ada95/src/Makefile.in index 384fa3cd..e0751da9 100644 --- a/Ada95/src/Makefile.in +++ b/Ada95/src/Makefile.in @@ -29,7 +29,7 @@ # # Author: Juergen Pfeifer, 1996 # -# $Id: Makefile.in,v 1.89 2020/02/02 23:34:34 tom Exp $ +# $Id: Makefile.in,v 1.90 2020/03/28 18:05:56 Adam.Van.Ymeren Exp $ # .SUFFIXES: @@ -273,9 +273,9 @@ STATIC_DIRS = \ @USE_GNAT_PROJECTS@ $(STATIC_DIRS) @USE_GNAT_PROJECTS@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@ @USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT) -@USE_GNAT_PROJECTS@ $(SHELL) $(srcdir)/library-cfg.sh static $(srcdir)/library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT) +@USE_GNAT_PROJECTS@ $(SHELL) $(srcdir)/library-cfg.sh static library.gpr $(CFLAGS_NORMAL) >$(GNAT_PROJECT) @USE_GNAT_PROJECTS@ @echo "Using GNAT Project:" -@USE_GNAT_PROJECTS@ @-$(SHELL) -c "diff -c $(srcdir)/library.gpr $(GNAT_PROJECT); exit 0" +@USE_GNAT_PROJECTS@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0" @USE_GNAT_PROJECTS@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=static @USE_GNAT_PROJECTS@ $(AR) $(ARFLAGS) $@ $(STATIC_C_OBJS) @USE_GNAT_PROJECTS@ -rm -f $(GNAT_PROJECT) @@ -311,9 +311,9 @@ SHARED_DIRS = \ @MAKE_ADA_SHAREDLIB@ cp $(SHARED_OBJS) $(BUILD_DIR)/dynamic-obj/ @MAKE_ADA_SHAREDLIB@ @cf_ada_config@gprconfig --batch --config=Ada --config=C,,,,@cf_ada_config_C@ @MAKE_ADA_SHAREDLIB@ -rm -f $(GNAT_PROJECT) -@MAKE_ADA_SHAREDLIB@ $(SHELL) $(srcdir)/library-cfg.sh dynamic $(srcdir)/library.gpr $(CFLAGS_SHARED) >$(GNAT_PROJECT) +@MAKE_ADA_SHAREDLIB@ $(SHELL) $(srcdir)/library-cfg.sh dynamic library.gpr $(CFLAGS_SHARED) >$(GNAT_PROJECT) @MAKE_ADA_SHAREDLIB@ @echo "Making Ada shared-lib:" -@MAKE_ADA_SHAREDLIB@ @-$(SHELL) -c "diff -c $(srcdir)/library.gpr $(GNAT_PROJECT); exit 0" +@MAKE_ADA_SHAREDLIB@ @-$(SHELL) -c "diff -c library.gpr $(GNAT_PROJECT); exit 0" @MAKE_ADA_SHAREDLIB@ $(ADAMAKE) $(ADAMAKEFLAGS) -XLIB_KIND=dynamic @MAKE_ADA_SHAREDLIB@ -rm -f $(GNAT_PROJECT) diff --git a/NEWS b/NEWS index de87c9ae..55186c76 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ -- sale, use or other dealings in this Software without prior written -- -- authorization. -- ------------------------------------------------------------------------------- --- $Id: NEWS,v 1.3466 2020/03/22 00:28:35 tom Exp $ +-- $Id: NEWS,v 1.3469 2020/03/28 23:33:04 tom Exp $ ------------------------------------------------------------------------------- This is a log of changes that ncurses has gone through since Zeyd started @@ -46,6 +46,11 @@ 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. +20200328 + + correct length of buffer copied in dup_field(). + + remove "$(srcdir)/" from path of library.gpr, needed for out-of-tree + builds of Ada95 (patch by Adam Van Ymeren). + 20200321 + improve configure-checks to reduce warnings about unused variables. + improve description of error-returns in waddch and waddnstr manual diff --git a/VERSION b/VERSION index f66c554c..b8900e05 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5:0:10 6.2 20200321 +5:0:10 6.2 20200328 diff --git a/dist.mk b/dist.mk index 7290f6ab..b7e827c5 100644 --- a/dist.mk +++ b/dist.mk @@ -26,7 +26,7 @@ # use or other dealings in this Software without prior written # # authorization. # ############################################################################## -# $Id: dist.mk,v 1.1342 2020/03/21 12:15:18 tom Exp $ +# $Id: dist.mk,v 1.1343 2020/03/28 10:37:50 tom Exp $ # Makefile for creating ncurses distributions. # # This only needs to be used directly as a makefile by developers, but @@ -38,7 +38,7 @@ SHELL = /bin/sh # These define the major/minor/patch versions of ncurses. NCURSES_MAJOR = 6 NCURSES_MINOR = 2 -NCURSES_PATCH = 20200321 +NCURSES_PATCH = 20200328 # We don't append the patch to the version, since this only applies to releases VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) diff --git a/form/fld_dup.c b/form/fld_dup.c index 9859a09f..cd100ef3 100644 --- a/form/fld_dup.c +++ b/form/fld_dup.c @@ -33,7 +33,7 @@ #include "form.priv.h" -MODULE_ID("$Id: fld_dup.c,v 1.15 2020/02/02 23:34:34 tom Exp $") +MODULE_ID("$Id: fld_dup.c,v 1.17 2020/03/29 00:39:41 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnform @@ -61,8 +61,8 @@ dup_field(FIELD *field, int frow, int fcol) { T((T_CREATE("field %p"), (void *)New_Field)); *New_Field = *_nc_Default_Field; - New_Field->frow = (short) frow; - New_Field->fcol = (short) fcol; + New_Field->frow = (short)frow; + New_Field->fcol = (short)fcol; New_Field->link = New_Field; New_Field->rows = field->rows; New_Field->cols = field->cols; @@ -80,13 +80,12 @@ dup_field(FIELD *field, int frow, int fcol) if (_nc_Copy_Type(New_Field, field)) { - size_t i, len; + size_t len; len = Total_Buffer_Size(New_Field); - if ((New_Field->buf = (FIELD_CELL *)malloc(len))) + if ((New_Field->buf = (FIELD_CELL *)malloc(len * 20))) { - for (i = 0; i < len; ++i) - New_Field->buf[i] = field->buf[i]; + memcpy(New_Field->buf, field->buf, len); returnField(New_Field); } } diff --git a/man/curs_print.3x b/man/curs_print.3x index edb5008d..0f526f8c 100644 --- a/man/curs_print.3x +++ b/man/curs_print.3x @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_print.3x,v 1.14 2020/02/02 23:34:34 tom Exp $ +.\" $Id: curs_print.3x,v 1.15 2020/03/28 19:06:28 tom Exp $ .TH curs_print 3X "" .SH NAME \fBmcprint\fR \- ship binary data to printer @@ -51,7 +51,7 @@ rule of thumb is to sleep for a second after shipping each 80-character line. .SH RETURN VALUE The \fBmcprint\fR function returns \fBERR\fR if the write operation aborted for some reason. -In this case, errno will contain either an error associated +In this case, \fBerrno\fP will contain either an error associated with \fBwrite\fP(2) or one of the following: .TP 5 ENODEV diff --git a/man/form.3x b/man/form.3x index 2115ddcf..91e91ed8 100644 --- a/man/form.3x +++ b/man/form.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form.3x,v 1.34 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form.3x,v 1.35 2020/03/28 19:06:28 tom Exp $ .TH form 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -163,7 +163,7 @@ unpost_form \fBform_post\fR(3X) .TE .SH RETURN VALUE Routines that return pointers return \fBNULL\fR on error, -and set errno to the corresponding error-code returned by functions +and set \fBerrno\fP to the corresponding error-code returned by functions returning an integer. Routines that return an integer return one of the following error codes: diff --git a/man/form_field.3x b/man/form_field.3x index 113604d6..b10e5af0 100644 --- a/man/form_field.3x +++ b/man/form_field.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field.3x,v 1.14 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_field.3x,v 1.15 2020/03/28 19:06:28 tom Exp $ .TH form_field 3X "" .SH NAME \fBform_field\fR \- make and break connections between fields and forms @@ -55,7 +55,7 @@ The function \fBmove_field\fR moves the given field (which must be disconnected) to a specified location on the screen. .SH RETURN VALUE The function \fBform_fields\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP The function \fBfield_count\fR returns \fBERR\fR if the \fIform\fP parameter is \fBNULL\fP. diff --git a/man/form_field_buffer.3x b/man/form_field_buffer.3x index 95e963e2..cf71d00d 100644 --- a/man/form_field_buffer.3x +++ b/man/form_field_buffer.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_buffer.3x,v 1.25 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_field_buffer.3x,v 1.26 2020/03/28 19:06:28 tom Exp $ .TH form_field_buffer 3X "" .ie \n(.g .ds `` \(lq .el .ds `` `` @@ -99,7 +99,7 @@ The function \fBset_max_field\fR sets the maximum size for a dynamic field. An argument of 0 turns off any maximum size threshold for that field. .SH RETURN VALUE The \fBfield_buffer\fR function returns NULL on error. -It sets errno according to their success: +It sets \fBerrno\fP according to their success: .TP 5 .B E_OK The routine succeeded. diff --git a/man/form_field_new.3x b/man/form_field_new.3x index 18ad3b9d..4b32c55d 100644 --- a/man/form_field_new.3x +++ b/man/form_field_new.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_new.3x,v 1.21 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_field_new.3x,v 1.22 2020/03/28 19:06:28 tom Exp $ .TH form_field_new 3X "" .SH NAME \fBnew_field\fR, @@ -67,9 +67,9 @@ Attribute data is separate. .PP The function \fBfree_field\fR de-allocates storage associated with a field. .SH RETURN VALUE -The function, \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return +The functions \fBnew_field\fR, \fBdup_field\fR, \fBlink_field\fR return \fBNULL\fR on error. -They set errno according to their success: +They set \fBerrno\fP according to their success: .TP 5 .B E_OK The routine succeeded. diff --git a/man/form_field_userptr.3x b/man/form_field_userptr.3x index 4d6aa57f..8a8427c5 100644 --- a/man/form_field_userptr.3x +++ b/man/form_field_userptr.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_field_userptr.3x,v 1.13 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_field_userptr.3x,v 1.14 2020/03/28 19:06:28 tom Exp $ .TH form_field_userptr 3X "" .SH NAME \fBset_field_userptr\fR, @@ -47,7 +47,7 @@ These functions get and set that field. .SH RETURN VALUE The function \fBfield_userptr\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP The function \fBset_field_userptr\fR returns \fBE_OK\fP (success). .SH SEE ALSO diff --git a/man/form_fieldtype.3x b/man/form_fieldtype.3x index dd350c2b..b4918420 100644 --- a/man/form_fieldtype.3x +++ b/man/form_fieldtype.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_fieldtype.3x,v 1.20 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_fieldtype.3x,v 1.21 2020/03/28 19:06:28 tom Exp $ .TH form_fieldtype 3X "" .SH NAME \fBform_fieldtype\fR \- define validation-field types @@ -99,7 +99,7 @@ These functions take the field pointer and an argument-block structure as arguments. .SH RETURN VALUE The pointer-valued routines return NULL on error. -They set errno according to their success: +They set \fBerrno\fP according to their success: .TP 5 .B E_OK The routine succeeded. diff --git a/man/form_new.3x b/man/form_new.3x index 25513bd6..dd2eefb6 100644 --- a/man/form_new.3x +++ b/man/form_new.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_new.3x,v 1.12 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_new.3x,v 1.13 2020/03/28 19:06:28 tom Exp $ .TH form_new 3X "" .SH NAME \fBnew_form\fR, @@ -48,7 +48,7 @@ The function \fBfree_form\fR disconnects \fIform\fR from its field array and frees the storage allocated for the form. .SH RETURN VALUE The function \fBnew_form\fR returns \fBNULL\fR on error. -It sets errno according to the function's success: +It sets \fBerrno\fP according to the function's success: .TP 5 .B E_OK The routine succeeded. diff --git a/man/form_requestname.3x b/man/form_requestname.3x index a816370a..0cad1ad0 100644 --- a/man/form_requestname.3x +++ b/man/form_requestname.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_requestname.3x,v 1.12 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_requestname.3x,v 1.13 2020/03/28 19:06:28 tom Exp $ .TH form_requestname 3X "" .SH NAME \fBform_request_by_name\fP, @@ -48,11 +48,11 @@ The function \fBform_request_by_name\fR searches in the name-table for a request with the given name and returns its request code. Otherwise E_NO_MATCH is returned. .SH RETURN VALUE -\fBform_request_name\fR returns \fBNULL\fR on error and sets errno +\fBform_request_name\fR returns \fBNULL\fR on error and sets \fBerrno\fP to \fBE_BAD_ARGUMENT\fR. .br \fBform_request_by_name\fR returns \fBE_NO_MATCH\fR on error. -It does not set errno. +It does not set \fBerrno\fP. .SH SEE ALSO \fBcurses\fR(3X), \fBform\fR(3X). .SH NOTES diff --git a/man/form_userptr.3x b/man/form_userptr.3x index 4af4e18f..266b13ef 100644 --- a/man/form_userptr.3x +++ b/man/form_userptr.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: form_userptr.3x,v 1.16 2020/02/02 23:34:34 tom Exp $ +.\" $Id: form_userptr.3x,v 1.17 2020/03/28 19:06:28 tom Exp $ .TH form_userptr 3X "" .SH NAME \fBset_form_userptr\fP, @@ -46,7 +46,7 @@ application-specific data (that is, the form-driver code leaves it alone). These functions get and set the form user pointer field. .SH RETURN VALUE The function \fBform_userptr\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP The function \fBset_form_userptr\fR returns \fBE_OK\fP (success). .SH SEE ALSO diff --git a/man/menu_items.3x b/man/menu_items.3x index 4d018022..939e034d 100644 --- a/man/menu_items.3x +++ b/man/menu_items.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_items.3x,v 1.14 2020/02/02 23:34:34 tom Exp $ +.\" $Id: menu_items.3x,v 1.15 2020/03/28 19:06:28 tom Exp $ .TH menu_items 3X "" .SH NAME \fBset_menu_items\fR, @@ -52,7 +52,7 @@ The function \fBmenu_items\fR returns the item array of the given menu. The function \fBitem_count\fR returns the count of items in \fImenu\fR. .SH RETURN VALUE The function \fBmenu_items\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP The function \fBitem_count\fR returns \fBERR\fR (the general \fBcurses\fR error return value) if its \fImenu\fP parameter is \fBNULL\fP. diff --git a/man/menu_mark.3x b/man/menu_mark.3x index 9ad0989f..0de4a27e 100644 --- a/man/menu_mark.3x +++ b/man/menu_mark.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_mark.3x,v 1.15 2020/02/02 23:34:34 tom Exp $ +.\" $Id: menu_mark.3x,v 1.16 2020/03/28 19:06:28 tom Exp $ .TH menu_mark 3X "" .SH NAME \fBset_menu_mark\fP, @@ -58,7 +58,7 @@ The function \fBmenu_mark\fR returns the menu's mark string (or \fBNULL\fR if there is none). .SH RETURN VALUE The function \fBmenu_mark\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP The function \fBset_menu_mark\fR may return the following error codes: .TP 5 diff --git a/man/menu_new.3x b/man/menu_new.3x index 46e415e8..7854376e 100644 --- a/man/menu_new.3x +++ b/man/menu_new.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_new.3x,v 1.15 2020/02/02 23:34:34 tom Exp $ +.\" $Id: menu_new.3x,v 1.16 2020/03/28 19:06:28 tom Exp $ .TH menu_new 3X "" .SH NAME \fBnew_menu\fP, @@ -48,7 +48,7 @@ The function \fBfree_menu\fR disconnects \fImenu\fR from its item array and frees the storage allocated for the menu. .SH RETURN VALUE The function \fBnew_menu\fR returns \fBNULL\fR on error. -It sets errno according to the function's failure: +It sets \fBerrno\fP according to the function's failure: .TP 5 .B E_NOT_CONNECTED No items are connected to the menu. diff --git a/man/menu_pattern.3x b/man/menu_pattern.3x index ce439b47..f7b34425 100644 --- a/man/menu_pattern.3x +++ b/man/menu_pattern.3x @@ -27,7 +27,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_pattern.3x,v 1.18 2020/02/02 23:34:34 tom Exp $ +.\" $Id: menu_pattern.3x,v 1.19 2020/03/28 19:06:28 tom Exp $ .TH menu_pattern 3X "" .SH NAME \fBset_menu_pattern\fP, @@ -57,7 +57,7 @@ The function \fBmenu_pattern\fR returns a pointer, which is \fBNULL\fR if the \fImenu\fP parameter is \fBNULL\fP. Otherwise, it is a pointer to a string which is empty if no pattern has been set. -It does not set errno. +It does not set \fBerrno\fP. .PP The function \fBset_menu_pattern\fR may return the following error codes: .TP 5 diff --git a/man/menu_requestname.3x b/man/menu_requestname.3x index c62ec503..30992c07 100644 --- a/man/menu_requestname.3x +++ b/man/menu_requestname.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_requestname.3x,v 1.12 2020/02/02 23:34:34 tom Exp $ +.\" $Id: menu_requestname.3x,v 1.13 2020/03/28 19:06:28 tom Exp $ .TH menu_requestname 3X "" .SH NAME \fBmenu_request_by_name\fP, @@ -49,10 +49,10 @@ with the given name and returns its request code. Otherwise E_NO_MATCH is returned. .SH RETURN VALUE \fBmenu_request_name\fR returns \fBNULL\fR on error -and sets errno to \fBE_BAD_ARGUMENT\fR. +and sets \fBerrno\fP to \fBE_BAD_ARGUMENT\fR. .br \fBmenu_request_by_name\fR returns \fBE_NO_MATCH\fR on error. -It does not set errno. +It does not set \fBerrno\fP. .SH SEE ALSO \fBcurses\fR(3X), \fBmenu\fR(3X). .SH NOTES diff --git a/man/menu_userptr.3x b/man/menu_userptr.3x index 15cc14b9..3ed7abbf 100644 --- a/man/menu_userptr.3x +++ b/man/menu_userptr.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: menu_userptr.3x,v 1.13 2020/02/02 23:34:34 tom Exp $ +.\" $Id: menu_userptr.3x,v 1.14 2020/03/28 19:06:28 tom Exp $ .TH menu_userptr 3X "" .SH NAME \fBset_menu_userptr\fP, @@ -46,7 +46,7 @@ application-specific data (that is, the menu-driver code leaves it alone). These functions get and set the menu user pointer field. .SH RETURN VALUE \fBmenu_userptr\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP \fBset_menu_userptr\fP returns \fBE_OK\fP (success). .SH SEE ALSO diff --git a/man/mitem_current.3x b/man/mitem_current.3x index b1736c73..360f7997 100644 --- a/man/mitem_current.3x +++ b/man/mitem_current.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_current.3x,v 1.17 2020/02/02 23:34:34 tom Exp $ +.\" $Id: mitem_current.3x,v 1.18 2020/03/28 19:06:28 tom Exp $ .TH mitem_current 3X "" .SH NAME \fBmitem_current\fR \- set and get current_menu_item @@ -63,7 +63,7 @@ The function \fBitem_index\fR returns the (zero-origin) index of \fIitem\fR in the menu's item pointer list. .SH RETURN VALUE \fBcurrent_item\fR returns a pointer (which may be \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP \fBtop_row\fR and \fBitem_index\fR return \fBERR\fR (the general \fBcurses\fR error value) if their \fImenu\fP parameter is \fBNULL\fP. diff --git a/man/mitem_name.3x b/man/mitem_name.3x index 0207a9ac..90ab3f74 100644 --- a/man/mitem_name.3x +++ b/man/mitem_name.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_name.3x,v 1.11 2020/02/02 23:34:34 tom Exp $ +.\" $Id: mitem_name.3x,v 1.12 2020/03/28 19:06:28 tom Exp $ .TH mitem_name 3X "" .SH NAME \fBitem_name\fR, @@ -47,7 +47,7 @@ The function \fBitem_description\fR returns the description part of the given item. .SH RETURN VALUE These routines return a pointer (which may be \fBNULL\fR). -They do not set errno. +They do not set \fBerrno\fP. .SH SEE ALSO \fBcurses\fR(3X), \fBmenu\fR(3X). .SH NOTES diff --git a/man/mitem_new.3x b/man/mitem_new.3x index 9f591f65..bc160f8c 100644 --- a/man/mitem_new.3x +++ b/man/mitem_new.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_new.3x,v 1.16 2020/02/02 23:34:34 tom Exp $ +.\" $Id: mitem_new.3x,v 1.17 2020/03/28 19:06:28 tom Exp $ .TH mitem_new 3X "" .SH NAME \fBnew_item\fP, @@ -56,7 +56,7 @@ is the responsibility of the application to release the memory for the name or the description of the item. .SH RETURN VALUE The function \fBnew_item\fR returns \fBNULL\fR on error. -It sets errno according to the function's failure: +It sets \fBerrno\fP according to the function's failure: .TP 5 .B E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. diff --git a/man/mitem_userptr.3x b/man/mitem_userptr.3x index f2639fda..e17dbc8d 100644 --- a/man/mitem_userptr.3x +++ b/man/mitem_userptr.3x @@ -28,7 +28,7 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: mitem_userptr.3x,v 1.14 2020/02/02 23:34:34 tom Exp $ +.\" $Id: mitem_userptr.3x,v 1.15 2020/03/28 19:06:28 tom Exp $ .TH mitem_userptr 3X "" .SH NAME \fBset_item_userptr\fP, @@ -47,7 +47,7 @@ These functions get and set that field. .SH RETURN VALUE The function \fBitem_userptr\fR returns a pointer (possibly \fBNULL\fR). -It does not set errno. +It does not set \fBerrno\fP. .PP The \fBset_item_userptr\fP always returns \fBE_OK\fP (success). . diff --git a/package/debian-mingw/changelog b/package/debian-mingw/changelog index efd4ba9e..20241500 100644 --- a/package/debian-mingw/changelog +++ b/package/debian-mingw/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200321) unstable; urgency=low +ncurses6 (6.2+20200328) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 21 Mar 2020 08:15:18 -0400 + -- Thomas E. Dickey Sat, 28 Mar 2020 06:37:50 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian-mingw64/changelog b/package/debian-mingw64/changelog index efd4ba9e..20241500 100644 --- a/package/debian-mingw64/changelog +++ b/package/debian-mingw64/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200321) unstable; urgency=low +ncurses6 (6.2+20200328) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 21 Mar 2020 08:15:18 -0400 + -- Thomas E. Dickey Sat, 28 Mar 2020 06:37:50 -0400 ncurses6 (5.9-20131005) unstable; urgency=low diff --git a/package/debian/changelog b/package/debian/changelog index 17cbc6aa..d405d563 100644 --- a/package/debian/changelog +++ b/package/debian/changelog @@ -1,8 +1,8 @@ -ncurses6 (6.2+20200321) unstable; urgency=low +ncurses6 (6.2+20200328) unstable; urgency=low * latest weekly patch - -- Thomas E. Dickey Sat, 21 Mar 2020 08:15:18 -0400 + -- Thomas E. Dickey Sat, 28 Mar 2020 06:37:50 -0400 ncurses6 (5.9-20120608) unstable; urgency=low diff --git a/package/mingw-ncurses.nsi b/package/mingw-ncurses.nsi index f1d0c0eb..4e80e5b0 100644 --- a/package/mingw-ncurses.nsi +++ b/package/mingw-ncurses.nsi @@ -1,4 +1,4 @@ -; $Id: mingw-ncurses.nsi,v 1.386 2020/03/21 12:15:18 tom Exp $ +; $Id: mingw-ncurses.nsi,v 1.387 2020/03/28 10:37:50 tom Exp $ ; TODO add examples ; TODO bump ABI to 6 @@ -10,7 +10,7 @@ !define VERSION_MAJOR "6" !define VERSION_MINOR "2" !define VERSION_YYYY "2020" -!define VERSION_MMDD "0321" +!define VERSION_MMDD "0328" !define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD} !define MY_ABI "5" diff --git a/package/mingw-ncurses.spec b/package/mingw-ncurses.spec index 5784ec01..2127aaf0 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.2 -Release: 20200321 +Release: 20200328 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncurses.spec b/package/ncurses.spec index c9912439..092ebfc3 100644 --- a/package/ncurses.spec +++ b/package/ncurses.spec @@ -1,7 +1,7 @@ Summary: shared libraries for terminal handling Name: ncurses6 Version: 6.2 -Release: 20200321 +Release: 20200328 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/package/ncursest.spec b/package/ncursest.spec index ee537bf7..3fb47ac0 100644 --- a/package/ncursest.spec +++ b/package/ncursest.spec @@ -1,7 +1,7 @@ Summary: Curses library with POSIX thread support. Name: ncursest6 Version: 6.2 -Release: 20200321 +Release: 20200328 License: X11 Group: Development/Libraries Source: ncurses-%{version}-%{release}.tgz diff --git a/test/move_field.c b/test/move_field.c index 7681225b..79b0b4df 100644 --- a/test/move_field.c +++ b/test/move_field.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: move_field.c,v 1.5 2020/03/21 22:04:03 tom Exp $ + * $Id: move_field.c,v 1.6 2020/03/28 17:43:03 tom Exp $ * * Demonstrate move_field(). */ @@ -269,7 +269,7 @@ my_edit_field(FORM *form, int *result) } static FIELD ** -copy_fields(FIELD **source, int length) +copy_fields(FIELD **source, size_t length) { FIELD **target = calloc(length + 1, sizeof(FIELD *)); memcpy(target, source, length * sizeof(FIELD *)); @@ -305,8 +305,9 @@ do_demo(FORM *form) FIELD *my_field = current_field(form); if (count > 0 && my_field != NULL) { - FIELD **old_fields = copy_fields(form_fields(form), count); - FIELD **new_fields = copy_fields(form_fields(form), count); + size_t needed = (size_t) count; + FIELD **old_fields = copy_fields(form_fields(form), needed); + FIELD **new_fields = copy_fields(form_fields(form), needed); int ch; if (old_fields != NULL && new_fields != NULL) { -- 2.44.0