-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2687 2016/10/23 00:03:47 tom Exp $
+-- $Id: NEWS,v 1.2689 2016/10/29 22:28:11 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.
+20161029
+ + add new function "unfocus_current_field" (Leon Winter)
+
20161022
+ modify tset -w (and tput reset) to update the program's copy of the
screensize if it was already set in the system, to improve tabstop
-5:0:9 6.0 20161022
+5:0:9 6.0 20161029
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1129 2016/10/21 22:47:18 tom Exp $
+# $Id: dist.mk,v 1.1130 2016/10/29 19:16:10 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 = 0
-NCURSES_PATCH = 20161022
+NCURSES_PATCH = 20161029
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 1998-2004,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2016 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: fld_current.c,v 1.12 2010/01/23 21:14:35 tom Exp $")
+MODULE_ID("$Id: fld_current.c,v 1.14 2016/10/29 22:30:10 tom Exp $")
/*---------------------------------------------------------------------------
| Facility : libnform
{
if (form->current != field)
{
- if (!_nc_Internal_Validation(form))
+ if (form->current && !_nc_Internal_Validation(form))
{
err = E_INVALID_FIELD;
}
RETURN(err);
}
+/*---------------------------------------------------------------------------
+| Facility : libnform
+| Function : int unfocus_current_field(FORM * form)
+|
+| Description : Removes focus from the current field.
+|
+| Return Values : E_OK - success
+| E_BAD_ARGUMENT - invalid form pointer
+| E_REQUEST_DENIED - there is no current field to unfocus
++--------------------------------------------------------------------------*/
+NCURSES_EXPORT(int)
+unfocus_current_field(FORM *const form)
+{
+ T((T_CALLED("unfocus_current_field(%p)"), (const void *)form));
+ if (form == 0)
+ {
+ RETURN(E_BAD_ARGUMENT);
+ }
+ else if (form->current == 0)
+ {
+ RETURN(E_REQUEST_DENIED);
+ }
+ _nc_Unset_Current_Field(form);
+ RETURN(E_OK);
+}
+
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : FIELD *current_field(const FORM * form)
/****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 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.25 2015/11/28 20:13:39 Leon.Winter Exp $ */
+/* $Id: form.h,v 0.26 2016/10/29 22:24:24 Leon.Winter Exp $ */
#ifndef FORM_H
#define FORM_H
extern NCURSES_EXPORT(int) set_form_win (FORM *,WINDOW *);
extern NCURSES_EXPORT(int) set_form_sub (FORM *,WINDOW *);
extern NCURSES_EXPORT(int) set_current_field (FORM *,FIELD *);
+extern NCURSES_EXPORT(int) unfocus_current_field (FORM *);
extern NCURSES_EXPORT(int) field_index (const FIELD *);
extern NCURSES_EXPORT(int) set_form_page (FORM *,int);
extern NCURSES_EXPORT(int) form_page (const FORM *);
/****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 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.39 2015/11/28 20:13:39 Leon.Winter Exp $ */
+/* $Id: form.priv.h,v 0.41 2016/10/29 22:30:23 tom Exp $ */
#ifndef FORM_PRIV_H
#define FORM_PRIV_H 1
extern NCURSES_EXPORT(bool) _nc_Internal_Validation (FORM*);
extern NCURSES_EXPORT(int) _nc_Set_Current_Field (FORM*, FIELD*);
extern NCURSES_EXPORT(int) _nc_Position_Form_Cursor (FORM*);
+extern NCURSES_EXPORT(void) _nc_Unset_Current_Field(FORM *form);
#if NCURSES_INTEROP_FUNCS
extern NCURSES_EXPORT(FIELDTYPE *) _nc_TYPE_INTEGER(void);
/****************************************************************************
- * Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 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.117 2015/11/28 20:39:09 tom Exp $")
+MODULE_ID("$Id: frm_driver.c,v 1.119 2016/10/29 22:30:10 tom Exp $")
/*----------------------------------------------------------------------------
This is the core module of the form library. It contains the majority
returnCode(res);
}
+/*
+ * Removes the focus from the current field of the form.
+ */
+void
+_nc_Unset_Current_Field(FORM *form)
+{
+ FIELD *field = form->current;
+
+ _nc_Refresh_Current_Field(form);
+ if (Field_Has_Option(field, O_PUBLIC))
+ {
+ if (field->drows > field->rows)
+ {
+ if (form->toprow == 0)
+ ClrStatus(field, _NEWTOP);
+ else
+ SetStatus(field, _NEWTOP);
+ }
+ else
+ {
+ if (Justification_Allowed(field))
+ {
+ Window_To_Buffer(form, field);
+ werase(form->w);
+ Perform_Justification(field, form->w);
+ if (Field_Has_Option(field, O_DYNAMIC_JUSTIFY) &&
+ (form->w->_parent == 0))
+ {
+ copywin(form->w,
+ Get_Form_Window(form),
+ 0,
+ 0,
+ field->frow,
+ field->fcol,
+ field->frow,
+ field->cols + field->fcol - 1,
+ 0);
+ wsyncup(Get_Form_Window(form));
+ }
+ else
+ {
+ wsyncup(form->w);
+ }
+ }
+ }
+ }
+ delwin(form->w);
+ form->w = (WINDOW *)0;
+ form->current = 0;
+}
+
/*---------------------------------------------------------------------------
| Facility : libnform
| Function : int _nc_Set_Current_Field(FORM * form,
T((T_CALLED("_nc_Set_Current_Field(%p,%p)"), (void *)form, (void *)newfield));
- if (!form || !newfield || !form->current || (newfield->form != form))
+ if (!form || !newfield || (newfield->form != form))
returnCode(E_BAD_ARGUMENT);
if ((form->status & _IN_DRIVER))
if ((field != newfield) ||
!(form->status & _POSTED))
{
- if ((form->w) &&
+ if (field && (form->w) &&
(Field_Has_Option(field, O_VISIBLE)) &&
(field->form->curpage == field->page))
- {
- _nc_Refresh_Current_Field(form);
- if (Field_Has_Option(field, O_PUBLIC))
- {
- if (field->drows > field->rows)
- {
- if (form->toprow == 0)
- ClrStatus(field, _NEWTOP);
- else
- SetStatus(field, _NEWTOP);
- }
- else
- {
- if (Justification_Allowed(field))
- {
- Window_To_Buffer(form, field);
- werase(form->w);
- Perform_Justification(field, form->w);
- if (Field_Has_Option(field, O_DYNAMIC_JUSTIFY) &&
- (form->w->_parent == 0))
- {
- copywin(form->w,
- Get_Form_Window(form),
- 0,
- 0,
- field->frow,
- field->fcol,
- field->frow,
- field->cols + field->fcol - 1,
- 0);
- wsyncup(Get_Form_Window(form));
- }
- else
- {
- wsyncup(form->w);
- }
- }
- }
- }
- delwin(form->w);
- form->w = (WINDOW *)0;
- }
+ _nc_Unset_Current_Field(form);
field = newfield;
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2014,2015 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2015,2016 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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form.3x,v 1.26 2015/08/02 18:14:50 tom Exp $
+.\" $Id: form.3x,v 1.28 2016/10/29 22:26:35 tom Exp $
.TH form 3X ""
.SH NAME
\fBform\fR \- curses extension for programming forms
set_form_win \fBform_win\fR(3X)
set_max_field \fBform_field_buffer\fR(3X)
set_new_page \fBform_new_page\fR(3X)
+unfocus_current_field \fBform_page\fR(3X)
unpost_form \fBform_post\fR(3X)
.TE
.SH RETURN VALUE
.SH PORTABILITY
These routines emulate the System V forms library. They were not supported on
Version 7 or BSD versions.
+.PP
+A few functions are extensions added for ncurses, e.g.,
+\fBform_driver_w\fP,
+\fBunfocus_current_field\fP.
.SH AUTHORS
Juergen Pfeifer. Manual pages and adaptation for ncurses by Eric
S. Raymond.
'\" t
.\"***************************************************************************
-.\" Copyright (c) 1998-2006,2010 Free Software Foundation, Inc. *
+.\" Copyright (c) 1998-2010,2016 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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: form_page.3x,v 1.12 2010/12/04 18:40:45 tom Exp $
+.\" $Id: form_page.3x,v 1.14 2016/10/29 22:27:24 tom Exp $
.TH form_page 3X ""
.SH NAME
\fBform_page\fR \- set and get form page number
.br
FIELD *current_field(const FORM *);
.br
+int unfocus_current_field(FORM *form);
+.br
int set_form_page(FORM *form, int n);
.br
int form_page(const FORM *form);
int field_index(const FIELD *field);
.br
.SH DESCRIPTION
-The function \fBset_current field\fR sets the current field of the given
+The function \fBset_current_field\fR sets the current field of the given
form; \fBcurrent_field\fR returns the current field of the given form.
.PP
+The function \fBunfocus_current_field\fR removes the focus from the current
+field of the form. In such state, inquiries via \fBcurrent_field\fR shall return
+a NULL pointer.
+.PP
The function \fBset_form_page\fR sets the form's page number (goes to page
\fIn\fR of the form).
.PP
.SH PORTABILITY
These routines emulate the System V forms library. They were not supported on
Version 7 or BSD versions.
+.PP
+The \fBunfocus_current_field\fP function is an ncurses extension.
.SH AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
S. Raymond.
-ncurses6 (6.0+20161022) unstable; urgency=low
+ncurses6 (6.0+20161029) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 21 Oct 2016 18:47:18 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 29 Oct 2016 15:16:10 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20161022) unstable; urgency=low
+ncurses6 (6.0+20161029) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 21 Oct 2016 18:47:18 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 29 Oct 2016 15:16:10 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20161022) unstable; urgency=low
+ncurses6 (6.0+20161029) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 21 Oct 2016 18:47:18 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 29 Oct 2016 15:16:10 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.181 2016/10/21 22:47:18 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.182 2016/10/29 19:16:10 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "0"\r
!define VERSION_YYYY "2016"\r
-!define VERSION_MMDD "1022"\r
+!define VERSION_MMDD "1029"\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.0
-Release: 20161022
+Release: 20161029
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
-# $Id: ncurses.map,v 1.35 2015/09/05 19:27:16 tom Exp $
+# $Id: ncurses.map,v 1.36 2016/10/30 01:06:37 tom Exp $
# script for shared library symbol-versioning using ld
#
# This file was generated by ncu-mapsyms
global:
wgetdelay;
local:
- _*;
_nc_mvcur;
_nc_mvcur_sp;
_nc_trace_mmask_t;
} NCURSES_5.8.20110226;
+NCURSES_6.0.current {
+ global:
+ unfocus_current_field;
+ local:
+ _*;
+ _nc_Unset_Current_Field;
+} NCURSES_5.9.20150530;
+
NCURSES_TIC_5.0.19991023 {
global:
_nc_capcmp;
keyname_sp;
keyok_sp;
killchar_sp;
+ longname_sp;
napms_sp;
new_prescr;
nocbreak_sp;
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.0
-Release: 20161022
+Release: 20161029
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
-# $Id: ncurses.sym,v 1.24 2015/09/05 19:36:49 tom Exp $
+# $Id: ncurses.sym,v 1.25 2016/10/30 00:45:38 tom Exp $
# script for shared library symbol-visibility using libtool
#
# This file was generated by ncu-mapsyms
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-wgetch-events --with-hashed-db --with-termlib --with-ticlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --with-broken_linker --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.current)
+# Configure options (6.0.20161029)
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --with-broken_linker --with-hashed-db --with-termlib --with-trace
link_field
link_fieldtype
longname
+longname_sp
mcprint
mcprint_sp
menu_back
typeahead_sp
unctrl
unctrl_sp
+unfocus_current_field
ungetch
ungetch_sp
ungetmouse
-# $Id: ncursest.map,v 1.31 2015/09/05 19:35:45 tom Exp $
+# $Id: ncursest.map,v 1.32 2016/10/30 01:08:04 tom Exp $
# script for shared library symbol-versioning using ld
#
# This file was generated by ncu-mapsyms
global:
wgetdelay;
local:
- _*;
_nc_mvcur;
_nc_mvcur_sp;
_nc_trace_mmask_t;
} NCURSEST_5.8.20110226;
+
+NCURSEST_6.0.current {
+ global:
+ unfocus_current_field;
+ local:
+ _*;
+ _nc_Unset_Current_Field;
+} NCURSEST_5.9.20150530;
-# $Id: ncursest.sym,v 1.26 2015/09/05 19:36:49 tom Exp $
+# $Id: ncursest.sym,v 1.27 2016/10/30 00:55:06 tom Exp $
# script for shared library symbol-visibility using libtool
#
# This file was generated by ncu-mapsyms
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-weak-symbols --with-pthread --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --enable-wgetch-events --with-hashed-db --with-pthread --with-termlib --with-ticlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --with-broken_linker --with-pthread --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.current)
+# Configure options (6.0.20161029)
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --enable-weak-symbols --with-pthread --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --enable-weak-symbols --with-pthread --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-reentrant --enable-sp-funcs --enable-weak-symbols --with-pthread --with-termlib --with-trace
typeahead_sp
unctrl
unctrl_sp
+unfocus_current_field
ungetch
ungetch_sp
ungetmouse
-# $Id: ncursestw.map,v 1.32 2015/09/05 19:35:05 tom Exp $
+# $Id: ncursestw.map,v 1.33 2016/10/30 01:09:53 tom Exp $
# script for shared library symbol-versioning using ld
#
# This file was generated by ncu-mapsyms
form_driver_w;
wgetdelay;
local:
- _*;
_nc_mvcur;
_nc_mvcur_sp;
_nc_trace_mmask_t;
} NCURSESTW_5.8.20110226;
+
+NCURSESTW_6.0.current {
+ global:
+ unfocus_current_field;
+ local:
+ _*;
+ _nc_Unset_Current_Field;
+} NCURSESTW_5.9.20150530;
-# $Id: ncursestw.sym,v 1.24 2015/09/05 19:36:49 tom Exp $
+# $Id: ncursestw.sym,v 1.25 2016/10/30 01:00:08 tom Exp $
# script for shared library symbol-visibility using libtool
#
# This file was generated by ncu-mapsyms
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --enable-wgetch-events --enable-widec --with-hashed-db --with-pthread --with-termlib --with-ticlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-weak-symbols --enable-widec --with-broken_linker --with-pthread --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.current)
+# Configure options (6.0.20161029)
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-reentrant --enable-sp-funcs --enable-weak-symbols --enable-widec --with-pthread --with-termlib --with-trace
typeahead_sp
unctrl
unctrl_sp
+unfocus_current_field
unget_wch
unget_wch_sp
ungetch
-# $Id: ncursesw.map,v 1.37 2015/09/05 19:33:48 tom Exp $
+# $Id: ncursesw.map,v 1.38 2016/10/30 01:11:09 tom Exp $
# script for shared library symbol-versioning using ld
#
# This file was generated by ncu-mapsyms
keyname_sp;
keyok_sp;
killchar_sp;
+ longname_sp;
napms_sp;
new_prescr;
nocbreak_sp;
form_driver_w;
wgetdelay;
local:
- _*;
_nc_mvcur;
_nc_mvcur_sp;
_nc_trace_mmask_t;
} NCURSESW_5.8.20110226;
+
+NCURSESW_6.0.current {
+ global:
+ unfocus_current_field;
+ local:
+ _*;
+ _nc_Unset_Current_Field;
+} NCURSESW_5.9.20150530;
-# $Id: ncursesw.sym,v 1.25 2015/09/05 19:36:49 tom Exp $
+# $Id: ncursesw.sym,v 1.26 2016/10/30 00:50:36 tom Exp $
# script for shared library symbol-visibility using libtool
#
# This file was generated by ncu-mapsyms
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-widec --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-wgetch-events --enable-widec --with-hashed-db --with-termlib --with-ticlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-widec --with-broken_linker --with-termlib --with-ticlib --with-trace
-# Configure options (6.0.current)
+# Configure options (6.0.20161029)
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-getcap --enable-getcap-cache --enable-hard-tabs --enable-termcap --enable-widec --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-interop --enable-widec --with-termlib --with-trace
# --disable-getcap --disable-leaks --disable-root-environ --disable-termcap --enable-hard-tabs --enable-sp-funcs --enable-widec --with-broken_linker --with-hashed-db --with-termlib --with-trace
link_field
link_fieldtype
longname
+longname_sp
mcprint
mcprint_sp
menu_back
typeahead_sp
unctrl
unctrl_sp
+unfocus_current_field
unget_wch
unget_wch_sp
ungetch