ncurses 5.7 - patch 20091219

+ remove old check in mvderwin() which prevented moving a derived
  window whose origin happened to coincide with its parent's origin
  (report by Katarina Machalkova).
+ improve test/ncurses.c to put mouse droppings in the proper window.
+ update minix terminfo entry -TD
+ add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
This commit is contained in:
Thomas E. Dickey 2009-12-20 02:23:49 +00:00
parent 3996fe0bf7
commit 99c50261a0
5 changed files with 92 additions and 53 deletions

10
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1473 2009/12/12 23:23:46 tom Exp $
-- $Id: NEWS,v 1.1480 2009/12/20 01:32:32 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,14 @@ 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.
20091219
+ remove old check in mvderwin() which prevented moving a derived
window whose origin happened to coincide with its parent's origin
(report by Katarina Machalkova).
+ improve test/ncurses.c to put mouse droppings in the proper window.
+ update minix terminfo entry -TD
+ add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
20091212
+ correct transfer of multicolumn characters in multirow
field_buffer(), which stopped at the end of the first row due to

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
# $Id: dist.mk,v 1.735 2009/12/12 12:05:49 tom Exp $
# $Id: dist.mk,v 1.736 2009/12/19 17:12:39 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
@ -37,7 +37,7 @@ SHELL = /bin/sh
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5
NCURSES_MINOR = 7
NCURSES_PATCH = 20091212
NCURSES_PATCH = 20091219
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -6,8 +6,8 @@
# Report bugs and new terminal descriptions to
# bug-ncurses@gnu.org
#
# $Revision: 1.355 $
# $Date: 2009/12/12 23:04:39 $
# $Revision: 1.357 $
# $Date: 2009/12/19 21:24:52 $
#
# The original header is preserved below for reference. It is noted that there
# is a "newer" version which differs in some cosmetic details (but actually
@ -16923,7 +16923,7 @@ nsterm-c-s|AppKit Terminal.app v51+ w/MacRoman charset (full color w/statusline)
# tracked under rdar://problem/7365108 and rdar://problem/7365134
# in Apple's bug reporter.
nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
mir, npc,
bw@, mir, npc,
civis=\E[?25l, cnorm=\E[?25h, dch=\E[%p1%dP, dch1=\E[P,
flash=\E[?5h$<200/>\E[?5l, hpa=\E[%i%p1%dG,
ich=\E[%p1%d@, ich1=\E[@, kdch1=\E[3~, kend=\E[F,
@ -16949,7 +16949,7 @@ nsterm-16color|AppKit Terminal.app v240.2+ with Mac OS X version 10.5,
#
# and that it is not set in Terminal's preferences dialog.
nsterm-bce|AppKit Terminal.app v71+/v100.1.8+ with Mac OS X version 10.3/10.4 (bce),
bce, use=nsterm-16color,
bce, bw, use=nsterm-16color,
# This is an alias which should always point to the "current" version
nsterm|Apple_Terminal|AppKit Terminal.app,
@ -17521,23 +17521,31 @@ osexec|Osborne executive,
# even as single processes under SunOS and the Macintosh OS.
#
# See
# http://www.minix3.org/manpages/man4/console.4.html
minix|minix console (v3),
use=ecma+color, use=minix-1.7,
# See
# http://www.minix-vmd.org/pub/Minix-vmd/1.7.0/wwwman/man4/console.4.html
# This is the entry provided with minix 1.7.4, with bogus :ri: removed.
minix|minix console (v1.7),
minix-1.7|minix console (v1.7),
am, xenl,
cols#80, it#8, lines#25,
bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M,
cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=\E[B,
cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH,
cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, home=\E[H, ht=^I,
ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=^J,
is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C,
kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U, kf3=\E[T, kf4=\E[S,
kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp, lf2=PgDn, lf3=Num +,
lf4=Num -, lf5=Num 5, nel=^M^J, rev=\E[7m, ri=\EM,
rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m, smso=\E[7m, smul=\E[4m,
dl=\E[%p1%dM, dl1=\E[M, ed=\E[0J, el=\E[K, el1=\E[2K,
home=\E[H, ht=^I, ich=\E[%p1%d@, ich1=\E[@, il=\E[%p1%dL,
il1=\E[L, ind=^J, is2=\E[0m, kbs=^H, kcub1=\E[D, kcud1=\E[B,
kcuf1=\E[C, kcuu1=\E[A, kf0=\E[Y, kf1=\E[V, kf2=\E[U,
kf3=\E[T, kf4=\E[S, kf5=\E[G, khome=\E[H, lf0=End, lf1=PgUp,
lf2=PgDn, lf3=Num +, lf4=Num -, lf5=Num 5, nel=^M^J,
rev=\E[7m, ri=\EM, rmso=\E[0m, rmul=\E[0m, sgr0=\E[0m,
smso=\E[7m, smul=\E[4m,
# Corrected Jan 14, 1997 by Vincent Broman <broman@nosc.mil>
minix-old|minix console (v1.5),
minix-old|minix-1.5|minix console (v1.5),
xon,
cols#80, it#8, lines#25,
bel=^G, blink=\E[5m, bold=\E[1m, clear=\E[H\E[0J, cr=^M,
@ -22043,6 +22051,10 @@ v3220|LANPAR Vision II model 3220/3221/3222,
# 2009-12-12
# * updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta)
#
# 2009-12-12
# * add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler)
# * rename minix to minix-1.7, add minix entry for Minux3 -TD
#
# The following sets edit modes for GNU EMACS.
# Local Variables:
# fill-prefix:"\t"

View File

@ -39,7 +39,7 @@
#include <curses.priv.h>
MODULE_ID("$Id: lib_window.c,v 1.27 2009/10/24 22:12:46 tom Exp $")
MODULE_ID("$Id: lib_window.c,v 1.28 2009/12/19 22:01:07 tom Exp $")
NCURSES_EXPORT(void)
_nc_synchook(WINDOW *win)
@ -57,25 +57,23 @@ mvderwin(WINDOW *win, int y, int x)
{
WINDOW *orig;
int i;
int rc = ERR;
T((T_CALLED("mvderwin(%p,%d,%d)"), (void *) win, y, x));
if (win && (orig = win->_parent)) {
if (win->_parx == x && win->_pary == y)
returnCode(OK);
if (x < 0 || y < 0)
returnCode(ERR);
if ((x + getmaxx(win) > getmaxx(orig)) ||
(y + getmaxy(win) > getmaxy(orig)))
returnCode(ERR);
} else
returnCode(ERR);
wsyncup(win);
win->_parx = x;
win->_pary = y;
for (i = 0; i < getmaxy(win); i++)
win->_line[i].text = &(orig->_line[y++].text[x]);
returnCode(OK);
if (win != 0
&& (orig = win->_parent) != 0
&& (x >= 0 && y >= 0)
&& (x + getmaxx(win) <= getmaxx(orig))
&& (y + getmaxy(win) <= getmaxy(orig))) {
wsyncup(win);
win->_parx = x;
win->_pary = y;
for (i = 0; i < getmaxy(win); i++)
win->_line[i].text = &(orig->_line[y++].text[x]);
rc = OK;
}
returnCode(rc);
}
NCURSES_EXPORT(int)

View File

@ -40,7 +40,7 @@ AUTHOR
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
$Id: ncurses.c,v 1.350 2009/11/07 22:11:27 tom Exp $
$Id: ncurses.c,v 1.353 2009/12/20 02:14:17 tom Exp $
***************************************************************************/
@ -505,7 +505,7 @@ mouse_decode(MEVENT const *ep)
{
static char buf[80 + (5 * 10) + (32 * 15)];
(void) sprintf(buf, "id %2d at (%2d, %2d, %2d) state %4lx = {",
(void) sprintf(buf, "id %2d at (%2d, %2d, %d) state %4lx = {",
ep->id, ep->x, ep->y, ep->z, (unsigned long) ep->bstate);
#define SHOW(m, s) if ((ep->bstate & m)==m) {strcat(buf,s); strcat(buf, ", ");}
@ -567,6 +567,42 @@ mouse_decode(MEVENT const *ep)
(void) strcat(buf, "}");
return (buf);
}
static void
show_mouse(WINDOW *win)
{
int y, x;
MEVENT event;
bool outside;
bool show_loc;
getmouse(&event);
outside = !wenclose(win, event.y, event.x);
if (outside) {
(void) wstandout(win);
waddstr(win, "KEY_MOUSE");
(void) wstandend(win);
} else {
waddstr(win, "KEY_MOUSE");
}
wprintw(win, ", %s", mouse_decode(&event));
if (outside)
win = stdscr;
show_loc = wmouse_trafo(win, &event.y, &event.x, FALSE);
if (show_loc) {
getyx(win, y, x);
wmove(win, event.y, event.x);
waddch(win, '*');
wmove(win, y, x);
}
if (outside)
wnoutrefresh(win);
}
#endif /* NCURSES_MOUSE_VERSION */
/****************************************************************************
@ -833,15 +869,7 @@ wgetch_test(unsigned level, WINDOW *win, int delay)
wprintw(win, "Key pressed: %04o ", c);
#ifdef NCURSES_MOUSE_VERSION
if (c == KEY_MOUSE) {
int y, x;
MEVENT event;
getmouse(&event);
wprintw(win, "KEY_MOUSE, %s", mouse_decode(&event));
getyx(win, y, x);
move(event.y, event.x);
addch('*');
wmove(win, y, x);
show_mouse(win);
} else
#endif /* NCURSES_MOUSE_VERSION */
if (c >= KEY_MIN) {
@ -1006,7 +1034,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay)
int incount = 0;
GetchFlags flags;
bool blocking = (delay < 0);
int y, x, code;
int code;
char *temp;
init_getch(win, flags);
@ -1103,14 +1131,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay)
wprintw(win, "Key pressed: %04o ", (int) c);
#ifdef NCURSES_MOUSE_VERSION
if (c == KEY_MOUSE) {
MEVENT event;
getmouse(&event);
wprintw(win, "KEY_MOUSE, %s", mouse_decode(&event));
getyx(win, y, x);
move(event.y, event.x);
addch('*');
wmove(win, y, x);
show_mouse(win);
} else
#endif /* NCURSES_MOUSE_VERSION */
if (code == KEY_CODE_YES) {