-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2779 2017/03/18 19:17:44 tom Exp $
+-- $Id: NEWS,v 1.2782 2017/03/25 23:37:12 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.
+20170325
+ + fix a memory leak in the window-list when creating multiple screens
+ (reports by Andres Martinelli, Debian #783486).
+ + reviewed calls from link_test.c, added a few more null-pointer
+ checks.
+ + add a null-pointer check in ungetmouse, in case mousemask was not
+ called (report by "Kau").
+ + updated curs_sp_funcs.3x for new functions.
+
20170318
+ change TERMINAL structure in term.h to make it opaque. Some
applications misuse its members, e.g., directly modifying it
-5:0:9 6.0 20170318
+5:0:9 6.0 20170325
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1152 2017/03/12 09:25:40 tom Exp $
+# $Id: dist.mk,v 1.1153 2017/03/19 00:59:07 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 = 20170318
+NCURSES_PATCH = 20170325
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-/* $Id: curses.wide,v 1.46 2014/02/01 22:00:32 tom Exp $ */
+/* $Id: curses.wide,v 1.49 2017/03/26 00:04:04 tom Exp $ */
/*
* vile:cmode:
* This file is part of ncurses, designed to be appended after curses.h.in
#define wins_wstr(w,t) wins_nwstr((w),(t),-1)
#if !NCURSES_OPAQUE
-#define wgetbkgrnd(win,wch) ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK)
+#define wgetbkgrnd(win,wch) ((0 != (const void*)(wch)) ? ((win) ? (*(wch) = (win)->_bkgrnd) : *(wch), OK) : ERR)
#endif
#define mvadd_wch(y,x,c) mvwadd_wch(stdscr,(y),(x),(c))
.\"***************************************************************************
-.\" Copyright (c) 2002-2012,2015 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2015,2017 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: curs_bkgrnd.3x,v 1.6 2015/07/21 00:18:42 tom Exp $
+.\" $Id: curs_bkgrnd.3x,v 1.7 2017/03/25 21:49:00 tom Exp $
.de bP
.IP \(bu 4
..
.PP
The \fBgetbkgrnd\fR function returns the given window's current background
character/attribute pair via the \fBwch\fR pointer.
+If the given window pointer is null,
+the character is not updated (but no error returned).
.SH NOTES
Note that
\fBbkgrnd\fR,
The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value.
.PP
Upon successful completion, the other functions return \fBOK\fR.
-Otherwise, they return \fBERR\fR.
+Otherwise, they return \fBERR\fR:
+.bP
A null window pointer is treated as an error.
+.bP
+A null character pointer is treated as an error.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_bkgd\fR(3X)
.\"***************************************************************************
-.\" Copyright (c) 2010-2013,2015 Free Software Foundation, Inc. *
+.\" Copyright (c) 2010-2015,2017 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: curs_sp_funcs.3x,v 1.7 2015/12/05 20:33:14 tom Exp $
+.\" $Id: curs_sp_funcs.3x,v 1.8 2017/03/25 18:08:33 tom Exp $
.TH curs_sp_funcs 3X ""
.na
.hy 0
\fB#include <curses.h>\fR
.nf
.sp
+\fBint alloc_pair_sp(SCREEN*, int, int);\fR
+.br
\fBint assume_default_colors_sp(SCREEN*, int, int);\fR
.br
\fBint baudrate_sp(SCREEN*);\fR
.br
\fBint filter_sp(SCREEN*);\fR
.br
+\fBint find_pair_sp(SCREEN*, int, int);\fR
+.br
+\fBint free_pair_sp(SCREEN*, int);\fR
+.br
\fBint flash_sp(SCREEN*);\fR
.br
\fBint flushinp_sp(SCREEN*);\fR
.br
\fBchar killchar_sp(SCREEN*);\fR
.br
+\fBchar* longname_sp(SCREEN*);\fR
+.br
\fBint mcprint_sp(SCREEN*, char *, int);\fR
.br
\fBint mouseinterval_sp(SCREEN*, int);\fR
.br
\fBvoid use_env_sp(SCREEN*, bool);\fR
.br
+\fBvoid use_tioctl_sp (SCREEN *, bool)\fR
+.br
\fBint use_legacy_coding_sp(SCREEN*, int);\fR
.br
\fBint vid_attr_sp(SCREEN*, attr_t, short, void *);\fR
/****************************************************************************
- * Copyright (c) 1998-2011,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 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 <curses.priv.h>
-MODULE_ID("$Id: lib_addstr.c,v 1.53 2016/01/16 21:00:53 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.54 2017/03/25 21:10:03 tom Exp $")
NCURSES_EXPORT(int)
waddnstr(WINDOW *win, const char *astr, int n)
T((T_CALLED("waddchnstr(%p,%p,%d)"), (void *) win, (const void *) astr, n));
- if (!win)
+ if (!win || !astr)
returnCode(ERR);
y = win->_cury;
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_dft_fgbg.c,v 1.28 2017/03/01 00:09:42 tom Exp $")
+MODULE_ID("$Id: lib_dft_fgbg.c,v 1.29 2017/03/25 21:00:49 tom Exp $")
/*
* Modify the behavior of color-pair 0 so that the library doesn't assume that
int code = ERR;
T((T_CALLED("assume_default_colors(%p,%d,%d)"), (void *) SP_PARM, fg, bg));
+ if (SP_PARM != 0) {
#ifdef USE_TERM_DRIVER
- if (sp != 0)
- code = CallDriver_2(sp, td_defaultcolors, fg, bg);
+ code = CallDriver_2(SP_PARM, td_defaultcolors, fg, bg);
#else
- if ((orig_pair || orig_colors) && !initialize_pair) {
+ if ((orig_pair || orig_colors) && !initialize_pair) {
- SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
- SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
- SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : fg;
- SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : bg;
- if (SP_PARM->_color_pairs != 0) {
- bool save = SP_PARM->_default_color;
- SP_PARM->_assumed_color = TRUE;
- SP_PARM->_default_color = TRUE;
- init_pair(0, (short) fg, (short) bg);
- SP_PARM->_default_color = save;
+ SP_PARM->_default_color = isDefaultColor(fg) || isDefaultColor(bg);
+ SP_PARM->_has_sgr_39_49 = (tigetflag("AX") == TRUE);
+ SP_PARM->_default_fg = isDefaultColor(fg) ? COLOR_DEFAULT : fg;
+ SP_PARM->_default_bg = isDefaultColor(bg) ? COLOR_DEFAULT : bg;
+ if (SP_PARM->_color_pairs != 0) {
+ bool save = SP_PARM->_default_color;
+ SP_PARM->_assumed_color = TRUE;
+ SP_PARM->_default_color = TRUE;
+ init_pair(0, (short) fg, (short) bg);
+ SP_PARM->_default_color = save;
+ }
+ code = OK;
}
- code = OK;
- }
#endif
+ }
returnCode(code);
}
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.65 2017/03/04 00:12:23 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.66 2017/03/25 22:59:38 tom Exp $")
/*
* Free all ncurses data. This is used for testing only (there's no practical
WINDOW *p_win = &(p->win);
bool found = FALSE;
+#ifndef USE_SP_WINDOWLIST
+ if (p->screen != SP_PARM)
+ continue;
+#endif
+
for (each_window(SP_PARM, q)) {
WINDOW *q_win = &(q->win);
+
+#ifndef USE_SP_WINDOWLIST
+ if (q->screen != SP_PARM)
+ continue;
+#endif
+
if ((p != q)
&& (q_win->_flags & _SUBWIN)
&& (p_win == q_win->_parent)) {
/****************************************************************************
- * Copyright (c) 1998-2009,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2017 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 <curses.priv.h>
-MODULE_ID("$Id: lib_getstr.c,v 1.30 2011/10/22 16:31:35 tom Exp $")
+MODULE_ID("$Id: lib_getstr.c,v 1.31 2017/03/25 21:09:51 tom Exp $")
/*
* This wipes out the last character, no matter whether it was a tab, control
T((T_CALLED("wgetnstr(%p,%p,%d)"), (void *) win, (void *) str, maxlen));
- if (!win)
+ if (!win || !str)
returnCode(ERR);
NCURSES_SP_NAME(_nc_get_tty_mode) (NCURSES_SP_ARGx &buf);
/****************************************************************************
- * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 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 *
#define CUR SP_TERMTYPE
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.170 2016/09/10 18:36:08 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.171 2017/03/25 21:20:35 tom Exp $")
#include <tic.h>
NCURSES_SP_NAME(getmouse) (NCURSES_SP_DCLx MEVENT * aevent)
{
int result = ERR;
+ MEVENT *eventp;
T((T_CALLED("getmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
- if ((aevent != 0) && (SP_PARM != 0) && (SP_PARM->_mouse_type != M_NONE)) {
- MEVENT *eventp = SP_PARM->_mouse_eventp;
+ if ((aevent != 0) &&
+ (SP_PARM != 0) &&
+ (SP_PARM->_mouse_type != M_NONE) &&
+ (eventp = SP_PARM->_mouse_eventp) != 0) {
/* compute the current-event pointer */
MEVENT *prev = PREV(eventp);
NCURSES_SP_NAME(ungetmouse) (NCURSES_SP_DCLx MEVENT * aevent)
{
int result = ERR;
+ MEVENT *eventp;
T((T_CALLED("ungetmouse(%p,%p)"), (void *) SP_PARM, (void *) aevent));
- if (aevent != 0 && SP_PARM != 0) {
- MEVENT *eventp = SP_PARM->_mouse_eventp;
+ if (aevent != 0 &&
+ SP_PARM != 0 &&
+ (eventp = SP_PARM->_mouse_eventp) != 0) {
/* stick the given event in the next-free slot */
*eventp = *aevent;
/****************************************************************************
- * Copyright (c) 1998-2011,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2017 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 <curses.priv.h>
#include <stddef.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.72 2016/05/28 23:11:26 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.73 2017/03/25 23:33:03 tom Exp $")
#define window_is(name) ((sp)->_##name == win)
WINDOWLIST *p, *q;
q = 0;
- for (each_window(SP_PARM, p)) {
+ for (each_window(sp, p)) {
if (&(p->win) == win) {
remove_window_from_screen(win);
if (q == 0)
- WindowList(SP_PARM) = p->next;
+ WindowList(sp) = p->next;
else
q->next = p->next;
****************************************************************************/
/*
- * $Id: curses.priv.h,v 1.563 2017/03/10 09:21:46 tom Exp $
+ * $Id: curses.priv.h,v 1.564 2017/03/25 23:26:05 tom Exp $
*
* curses.priv.h
*
#define WINDOW_EXT(w,m) (((WINDOWLIST *)((void *)((char *)(w) - offsetof(WINDOWLIST, win))))->m)
+#ifdef USE_SP_WINDOWLIST
+#define SP_INIT_WINDOWLIST(sp) WindowList(sp) = 0
+#else
+#define SP_INIT_WINDOWLIST(sp) /* nothing */
+#endif
+
#define SP_PRE_INIT(sp) \
sp->_cursrow = -1; \
sp->_curscol = -1; \
sp->_fifohead = -1; \
sp->_endwin = TRUE; \
sp->_cursor = -1; \
- WindowList(sp) = 0; \
+ SP_INIT_WINDOWLIST(sp); \
sp->_outch = NCURSES_OUTC_FUNC; \
sp->jump = 0 \
-ncurses6 (6.0+20170318) unstable; urgency=low
+ncurses6 (6.0+20170325) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 12 Mar 2017 05:25:40 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 18 Mar 2017 20:59:07 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20170318) unstable; urgency=low
+ncurses6 (6.0+20170325) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 12 Mar 2017 05:25:40 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 18 Mar 2017 20:59:07 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.0+20170318) unstable; urgency=low
+ncurses6 (6.0+20170325) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 12 Mar 2017 05:25:40 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 18 Mar 2017 20:59:07 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.203 2017/03/12 09:25:40 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.204 2017/03/19 00:59:07 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 "2017"\r
-!define VERSION_MMDD "0318"\r
+!define VERSION_MMDD "0325"\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: 20170318
+Release: 20170325
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.0
-Release: 20170318
+Release: 20170325
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz