-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3314 2019/05/04 20:55:23 tom Exp $
+-- $Id: NEWS,v 1.3317 2019/05/11 21:20:49 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.
+20190511
+ + fix a spurious blank line seen with "infocmp -1fx xterm+x11mouse"
+ + add checks in repair_subwindows() to keep the current position and
+ scroll-margins inside the resized subwindow.
+ + add a limit check in newline_forces_scroll() for the case where the
+ row is inside scroll-margins, but not at the end (report by Toshio
+ Kuratomi, cf: 20170729).
+ + corrected a warning message in tic for extended capabilities versus
+ number of parameters.
+
20190504
+ improve workaround for Solaris wcwidth versus line-drawing characters
(report by Pavel Stehule).
-5:0:10 6.1 20190504
+5:0:10 6.1 20190511
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1281 2019/05/04 10:02:52 tom Exp $
+# $Id: dist.mk,v 1.1282 2019/05/10 20:55:16 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 = 20190504
+NCURSES_PATCH = 20190511
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
-# $Id: Makefile.in,v 1.160 2019/03/09 23:39:14 tom Exp $
+# $Id: Makefile.in,v 1.161 2019/05/11 14:15:21 tom Exp $
##############################################################################
# Copyright (c) 1998-2018,2019 Free Software Foundation, Inc. #
# #
AWK=$(AWK) $(SHELL) $(tinfo)/MKkeys_list.sh $(CAPLIST) | LC_ALL=C sort >$@
make_keys$(BUILD_EXEEXT) : \
+ build.priv.h \
$(tinfo)/make_keys.c \
names.c
$(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_keys.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
make_hash$(BUILD_EXEEXT) : \
+ build.priv.h \
$(tinfo)/make_hash.c \
../include/hashsize.h
$(BUILD_CC) -o $@ $(BUILD_CPPFLAGS) $(BUILD_CCFLAGS) $(tinfo)/make_hash.c $(BUILD_LDFLAGS) $(BUILD_LIBS)
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_addch.c,v 1.132 2019/05/04 20:46:24 tom Exp $")
+MODULE_ID("$Id: lib_addch.c,v 1.133 2019/05/11 19:51:02 tom Exp $")
static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
if (*ypos == win->_regbottom) {
*ypos = win->_regbottom;
result = TRUE;
- } else {
+ } else if (*ypos < win->_maxy) {
*ypos = (NCURSES_SIZE_T) (*ypos + 1);
}
} else if (*ypos < win->_maxy) {
return ERR;
x = win->_curx;
y = win->_cury;
+ CHECK_POSITION(win, x, y);
line = win->_line + y;
}
/*
*/
x = win->_curx;
y = win->_cury;
+ CHECK_POSITION(win, x, y);
switch (t) {
case '\t':
/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2019 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: wresize.c,v 1.35 2011/05/21 18:55:07 tom Exp $")
+MODULE_ID("$Id: wresize.c,v 1.38 2019/05/11 20:15:15 tom Exp $")
static int
cleanup_lines(struct ldat *data, int length)
{
while (--length >= 0)
- free(data[length].text);
+ FreeAndNull(data[length].text);
free(data);
return ERR;
}
if (tst->_parent == cmp) {
- if (tst->_pary > cmp->_maxy)
- tst->_pary = cmp->_maxy;
- if (tst->_parx > cmp->_maxx)
- tst->_parx = cmp->_maxx;
+#define REPAIR1(field, limit) \
+ if (tst->field > cmp->limit) \
+ tst->field = cmp->limit
- if (tst->_maxy + tst->_pary > cmp->_maxy)
- tst->_maxy = (NCURSES_SIZE_T) (cmp->_maxy - tst->_pary);
- if (tst->_maxx + tst->_parx > cmp->_maxx)
- tst->_maxx = (NCURSES_SIZE_T) (cmp->_maxx - tst->_parx);
+ REPAIR1(_pary, _maxy);
+ REPAIR1(_parx, _maxx);
+
+#define REPAIR2(field, limit) \
+ if (tst->limit + tst->field > cmp->limit) \
+ tst->limit = (NCURSES_SIZE_T) (cmp->limit - tst->field)
+
+ REPAIR2(_pary, _maxy);
+ REPAIR2(_parx, _maxx);
+
+#define REPAIR3(field, limit) \
+ if (tst->field > tst->limit) \
+ tst->field = tst->limit
+
+ REPAIR3(_cury, _maxy);
+ REPAIR3(_curx, _maxx);
+
+ REPAIR3(_regtop, _maxy);
+ REPAIR3(_regbottom, _maxy);
for (row = 0; row <= tst->_maxy; ++row) {
tst->_line[row].text = &pline[tst->_pary + row].text[tst->_parx];
if (!(win->_flags & _SUBWIN)) {
if (ToCols == size_x) {
for (row = ToLines + 1; row <= size_y; row++) {
- free(win->_line[row].text);
+ FreeAndNull(win->_line[row].text);
}
} else {
for (row = 0; row <= size_y; row++) {
- free(win->_line[row].text);
+ FreeAndNull(win->_line[row].text);
}
}
}
- free(win->_line);
+ FreeAndNull(win->_line);
win->_line = new_lines;
/*
/****************************************************************************
- * Copyright (c) 2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 2010-2012,2019 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 *
****************************************************************************/
/*
- * $Id: build.priv.h,v 1.9 2012/02/22 22:17:02 tom Exp $
+ * $Id: build.priv.h,v 1.10 2019/05/11 14:14:00 tom Exp $
*
* build.priv.h
*
#define EXIT_FAILURE 1
#endif
-#define FreeAndNull(p) free(p); p = 0
+#define FreeAndNull(p) do { free(p); p = 0; } while (0)
#define UChar(c) ((unsigned char)(c))
#define SIZEOF(v) (sizeof(v) / sizeof(v[0]))
-ncurses6 (6.1+20190504) unstable; urgency=low
+ncurses6 (6.1+20190511) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 04 May 2019 06:02:52 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 May 2019 16:55:16 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20190504) unstable; urgency=low
+ncurses6 (6.1+20190511) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 04 May 2019 06:02:52 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 May 2019 16:55:16 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20190504) unstable; urgency=low
+ncurses6 (6.1+20190511) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 04 May 2019 06:02:52 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 May 2019 16:55:16 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.327 2019/05/04 10:02:52 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.328 2019/05/10 20:55:16 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 "2019"\r
-!define VERSION_MMDD "0504"\r
+!define VERSION_MMDD "0511"\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: 20190504
+Release: 20190511
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
-Release: 20190504
+Release: 20190511
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.1
-Release: 20190504
+Release: 20190511
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
#include "termsort.c" /* this C file is generated */
#include <parametrized.h> /* so is this */
-MODULE_ID("$Id: dump_entry.c,v 1.172 2019/04/20 18:54:48 tom Exp $")
+MODULE_ID("$Id: dump_entry.c,v 1.173 2019/05/11 21:02:24 tom Exp $")
#define DISCARD(string) string = ABSENT_STRING
#define PRINTF (void) printf
strncpy_DYN(buffer, "\t", (size_t) 1);
}
+/*
+ * Check if the current line which was begun consists only of a tab and the
+ * given leading text.
+ */
+static bool
+leading_DYN(DYNBUF * buffer, const char *leading)
+{
+ bool result = FALSE;
+ size_t need = strlen(leading);
+ if (buffer->used > need) {
+ need = buffer->used - need;
+ if (!strcmp(buffer->text + need, leading)) {
+ result = TRUE;
+ while (--need != 0) {
+ if (buffer->text[need] == '\n') {
+ break;
+ }
+ if (buffer->text[need] != '\t') {
+ result = FALSE;
+ break;
+ }
+ }
+ }
+ }
+ return result;
+}
+
bool
has_params(const char *src)
{
}
break;
case 'p':
- if (percent && params) {
+ if (percent && params && !leading_DYN(&tmpbuf, "%")) {
tmpbuf.text[tmpbuf.used - 1] = '\n';
indent_DYN(&tmpbuf, level + 1);
strncpy_DYN(&tmpbuf, "%", (size_t) 1);
#include <parametrized.h>
#include <transform.h>
-MODULE_ID("$Id: tic.c,v 1.275 2019/05/04 14:41:06 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.276 2019/05/10 21:00:25 tom Exp $")
#define STDIN_NAME "<stdin>"
#if NCURSES_XNAMES
if (extended) {
int check = is_user_capability(name);
- if (check != actual) {
+ if (check != actual && (check >= 0 && actual >= 0)) {
_nc_warning("extended %s capability has %d parameters, expected %d",
name, actual, check);
} else if (debug_level > 1) {