-------------------------------------------------------------------------------
--- Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2012,2013 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 --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.2006 2012/12/29 22:37:28 tom Exp $
+-- $Id: NEWS,v 1.2008 2013/01/05 23:28:30 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.
+20130105
+ + add "-s" option to test/view.c to allow it to start in single-step
+ mode, reducing size of trace files when it is used for debugging
+ MinGW changes.
+ + revert part of 20121222 change to tinfo_driver.c
+ + add experimental logic in win_driver.c to improve optimization of
+ screen updates. This does not yet work with double-width characters,
+ so it is ifdef'd out for the moment (prompted by report by Erwin
+ Waterlander regarding screen flicker).
+
20121229
+ fix coverity warnings regarding copying into fixed-size buffers.
+ add throw-declarations in the c++ binding per Coverity warning.
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.907 2012/12/29 16:59:31 tom Exp $
+# $Id: dist.mk,v 1.908 2013/01/05 14:08:17 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 = 5
NCURSES_MINOR = 9
-NCURSES_PATCH = 20121229
+NCURSES_PATCH = 20130105
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
/****************************************************************************
- * Copyright (c) 2008-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2012,2013 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 *
# endif
#endif
-MODULE_ID("$Id: tinfo_driver.c,v 1.25 2012/12/22 21:44:10 tom Exp $")
+MODULE_ID("$Id: tinfo_driver.c,v 1.26 2013/01/05 23:25:36 tom Exp $")
/*
* SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
/* initialize normal acs before wide, since we use mapping in the latter */
#if !USE_WIDEC_SUPPORT
- sp->_screen_unicode = _nc_unicode_locale();
- if (sp->screen_unicode && _nc_locale_breaks_acs(sp->_term)) {
+ if (_nc_unicode_locale() && _nc_locale_breaks_acs(sp->_term)) {
acs_chars = NULL;
ena_acs = NULL;
enter_alt_charset_mode = NULL;
/****************************************************************************
- * Copyright (c) 1998-2010,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 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>
#define CUR my_term.type.
-MODULE_ID("$Id: win_driver.c,v 1.15 2012/12/15 19:39:49 tom Exp $")
+MODULE_ID("$Id: win_driver.c,v 1.16 2013/01/05 23:16:54 tom Exp $")
#define WINMAGIC NCDRV_MAGIC(NCDRV_WINCONSOLE)
+#define EXP_OPTIMIZE 0
+
#define AssertTCB() assert(TCB!=0 && TCB->magic==WINMAGIC)
#define SetSP() assert(TCB->csp!=0); sp = TCB->csp; (void) sp
#define con_write(tcb, y, x, str, n) con_write8(tcb, y, x, str, n)
#endif
+#if EXP_OPTIMIZE
+/*
+ * Comparing new/current screens, determine the last column-index for a change
+ * beginning on the given row,col position. Unlike a serial terminal, there is
+ * no cost for "moving" the "cursor" on the line as we update it.
+ */
+static int
+find_end_of_change(SCREEN *sp, int row, int col)
+{
+ int result = col;
+ struct ldat *curdat = CurScreen(sp)->_line + row;
+ struct ldat *newdat = NewScreen(sp)->_line + row;
+
+ while (col <= newdat->lastchar) {
+#if USE_WIDEC_SUPPORT
+ if (isWidecExt(curdat->text[col]) || isWidecExt(newdat->text[col])) {
+ result = col;
+ } else if (memcmp(&curdat->text[col],
+ &newdat->text[col],
+ sizeof(curdat->text[0]))) {
+ result = col;
+ } else {
+ break;
+ }
+#else
+ if (curdat->text[col] != newdat->text[col]) {
+ result = col;
+ } else {
+ break;
+ }
+#endif
+ ++col;
+ }
+ return result;
+}
+
+/*
+ * Given a row,col position at the end of a change-chunk, look for the
+ * beginning of the next change-chunk.
+ */
+static int
+find_next_change(SCREEN *sp, int row, int col)
+{
+ struct ldat *curdat = CurScreen(sp)->_line + row;
+ struct ldat *newdat = NewScreen(sp)->_line + row;
+ int result = newdat->lastchar + 1;
+
+ while (++col <= newdat->lastchar) {
+#if USE_WIDEC_SUPPORT
+ if (isWidecExt(curdat->text[col]) != isWidecExt(newdat->text[col])) {
+ result = col;
+ break;
+ } else if (memcmp(&curdat->text[col],
+ &newdat->text[col],
+ sizeof(curdat->text[0]))) {
+ result = col;
+ break;
+ }
+#else
+ if (curdat->text[col] != newdat->text[col]) {
+ result = col;
+ break;
+ }
+#endif
+ }
+ return result;
+}
+
+#define EndChange(first) \
+ find_end_of_change(sp, y, first)
+#define NextChange(last) \
+ find_next_change(sp, y, last)
+
+#endif /* EXP_OPTIMIZE */
+
#define MARK_NOCHANGE(win,row) \
win->_line[row].firstchar = _NOCHANGE; \
win->_line[row].lastchar = _NOCHANGE
for (y = 0; y < nonempty; y++) {
x0 = NewScreen(sp)->_line[y].firstchar;
if (x0 != _NOCHANGE) {
+#if EXP_OPTIMIZE
+ int x2;
+ int limit = NewScreen(sp)->_line[y].lastchar;
+ while ((x1 = EndChange(x0)) <= limit) {
+ while ((x2 = NextChange(x1)) <= limit && x2 <= (x1 + 2)) {
+ x1 = x2;
+ }
+ n = x1 - x0 + 1;
+ memcpy(&CurScreen(sp)->_line[y].text[x0],
+ &NewScreen(sp)->_line[y].text[x0],
+ n * sizeof(CurScreen(sp)->_line[y].text[x0]));
+ con_write(TCB,
+ y,
+ x0,
+ &CurScreen(sp)->_line[y].text[x0], n);
+ x0 = NextChange(x1);
+ }
+
+ /* mark line changed successfully */
+ if (y <= NewScreen(sp)->_maxy) {
+ MARK_NOCHANGE(NewScreen(sp), y);
+ }
+ if (y <= CurScreen(sp)->_maxy) {
+ MARK_NOCHANGE(CurScreen(sp), y);
+ }
+#else
x1 = NewScreen(sp)->_line[y].lastchar;
n = x1 - x0 + 1;
if (n > 0) {
MARK_NOCHANGE(CurScreen(sp), y);
}
}
+#endif
}
}
-ncurses6 (5.9-20121229) unstable; urgency=low
+ncurses6 (5.9-20130105) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 29 Dec 2012 12:00:04 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 05 Jan 2013 10:15:33 -0500
ncurses6 (5.9-20120608) unstable; urgency=low
Summary: shared libraries for terminal handling
Name: ncurses6
Release: 5.9
-Version: 20121229
+Version: 20130105
License: X11
Group: Development/Libraries
Source: ncurses-%{release}-%{version}.tgz
/****************************************************************************
- * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 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 *
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.89 2012/12/29 22:38:28 tom Exp $
+ * $Id: view.c,v 1.90 2013/01/05 23:18:13 tom Exp $
*/
#include <test.priv.h>
#include <sys/ptem.h>
#endif
+#undef CTRL
+#define CTRL(x) ((x) & 0x1f)
+
static RETSIGTYPE finish(int sig) GCC_NORETURN;
static void show_all(const char *tag);
#if defined(KEY_RESIZE)
," -r use old-style sigwinch handler rather than KEY_RESIZE"
#endif
+ ," -s start in single-step mode, waiting for input"
#ifdef TRACE
," -t trace screen updates"
," -T NUM specify trace mask"
int value = 0;
bool done = FALSE;
bool got_number = FALSE;
+ bool single_step = TRUE;
#if CAN_RESIZE
bool nonposix_resize = FALSE;
#endif
(void) signal(SIGINT, finish); /* arrange interrupts to terminate */
#endif
- while ((i = getopt(argc, argv, "cin:rtT:")) != -1) {
+ while ((i = getopt(argc, argv, "cin:rstT:")) != -1) {
switch (i) {
case 'c':
try_color = TRUE;
nonposix_resize = TRUE;
break;
#endif
+ case 's':
+ single_step = TRUE;
+ break;
#ifdef TRACE
case 'T':
{
(void) nonl(); /* tell curses not to do NL->CR/NL on output */
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
- nodelay(stdscr, TRUE);
+ if (!single_step)
+ nodelay(stdscr, TRUE);
idlok(stdscr, TRUE); /* allow use of insert/delete line */
if (try_color) {
nodelay(stdscr, TRUE);
my_delay = 0;
break;
+ case CTRL('L'):
+ redrawwin(stdscr);
+ break;
case ERR:
if (!my_delay)
napms(50);