ncurses 5.7 - patch 20090516

+ work around antique BSD game's manipulation of stdscr, etc., versus
  SCREEN's copy of the pointer (Debian #528411).
+ add a cast to wattrset macro to avoid compiler warning when comparing
  its result against ERR (adapted from patch by Matt Kraii, Debian
  #528374).
This commit is contained in:
Thomas E. Dickey 2009-05-17 00:47:23 +00:00
parent 404cc3f5b0
commit 9dda8e1ed1
5 changed files with 40 additions and 11 deletions

9
NEWS
View File

@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written -- -- sale, use or other dealings in this Software without prior written --
-- authorization. -- -- authorization. --
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- $Id: NEWS,v 1.1386 2009/05/10 21:27:04 tom Exp $ -- $Id: NEWS,v 1.1388 2009/05/17 00:20:31 tom Exp $
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started This is a log of changes that ncurses has gone through since Zeyd started
@ -45,6 +45,13 @@ See the AUTHORS file for the corresponding full names.
Changes through 1.9.9e did not credit all contributions; Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information. it is not possible to add this information.
20090516
+ work around antique BSD game's manipulation of stdscr, etc., versus
SCREEN's copy of the pointer (Debian #528411).
+ add a cast to wattrset macro to avoid compiler warning when comparing
its result against ERR (adapted from patch by Matt Kraii, Debian
#528374).
20090510 20090510
+ continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete).

View File

@ -25,7 +25,7 @@
# use or other dealings in this Software without prior written # # use or other dealings in this Software without prior written #
# authorization. # # authorization. #
############################################################################## ##############################################################################
# $Id: dist.mk,v 1.699 2009/05/10 21:27:04 tom Exp $ # $Id: dist.mk,v 1.700 2009/05/15 23:35:19 tom Exp $
# Makefile for creating ncurses distributions. # Makefile for creating ncurses distributions.
# #
# This only needs to be used directly as a makefile by developers, but # 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. # These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 5 NCURSES_MAJOR = 5
NCURSES_MINOR = 7 NCURSES_MINOR = 7
NCURSES_PATCH = 20090510 NCURSES_PATCH = 20090516
# We don't append the patch to the version, since this only applies to releases # We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR) VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)

View File

@ -32,7 +32,7 @@
* and: Thomas E. Dickey 1996-on * * and: Thomas E. Dickey 1996-on *
****************************************************************************/ ****************************************************************************/
/* $Id: curses.h.in,v 1.199 2009/05/09 15:48:04 tom Exp $ */ /* $Id: curses.h.in,v 1.200 2009/05/16 23:27:59 tom Exp $ */
#ifndef __NCURSES_H #ifndef __NCURSES_H
#define __NCURSES_H #define __NCURSES_H
@ -1093,9 +1093,9 @@ extern NCURSES_EXPORT(int) NCURSES_SP_NAME(use_legacy_coding) (SCREEN*, int);
#if !NCURSES_OPAQUE #if !NCURSES_OPAQUE
#if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@ #if defined(_XOPEN_SOURCE_EXTENDED) && @NCURSES_EXT_COLORS@
#define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \ #define wattrset(win,at) ((win)->_color = PAIR_NUMBER(at), \
(win)->_attrs = (at)) NCURSES_CAST(int, (win)->_attrs = (at)))
#else #else
#define wattrset(win,at) ((win)->_attrs = (at)) #define wattrset(win,at) NCURSES_CAST(int, (win)->_attrs = (at))
#endif #endif
#endif /* NCURSES_OPAQUE */ #endif /* NCURSES_OPAQUE */

View File

@ -36,7 +36,7 @@
#include <curses.priv.h> #include <curses.priv.h>
#include <ctype.h> #include <ctype.h>
MODULE_ID("$Id: lib_addch.c,v 1.118 2009/04/18 23:53:04 tom Exp $") MODULE_ID("$Id: lib_addch.c,v 1.119 2009/05/15 23:47:26 tom Exp $")
static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT); static const NCURSES_CH_T blankchar = NewChar(BLANK_TEXT);
@ -260,10 +260,13 @@ waddch_literal(WINDOW *win, NCURSES_CH_T ch)
/* /*
* Build up multibyte characters until we have a wide-character. * Build up multibyte characters until we have a wide-character.
*/ */
if_WIDEC({
#if NCURSES_SP_FUNCS #if NCURSES_SP_FUNCS
SCREEN *sp = _nc_screen_of(win); #define DeriveSP() SCREEN *sp = _nc_screen_of(win);
#else
#define DeriveSP() /*nothing*/
#endif #endif
if_WIDEC({
DeriveSP();
if (WINDOW_EXT(win, addch_used) != 0 || !Charable(ch)) { if (WINDOW_EXT(win, addch_used) != 0 || !Charable(ch)) {
int len = _nc_build_wch(win, CHREF(ch)); int len = _nc_build_wch(win, CHREF(ch));

View File

@ -82,7 +82,7 @@
#include <ctype.h> #include <ctype.h>
MODULE_ID("$Id: tty_update.c,v 1.255 2009/05/10 00:53:14 tom Exp $") MODULE_ID("$Id: tty_update.c,v 1.256 2009/05/17 00:13:49 tom Exp $")
/* /*
* This define controls the line-breakout optimization. Every once in a * This define controls the line-breakout optimization. Every once in a
@ -668,8 +668,27 @@ NCURSES_SP_NAME(doupdate) (NCURSES_SP_DCL0)
T((T_CALLED("doupdate()"))); T((T_CALLED("doupdate()")));
#if !USE_REENTRANT
/*
* It is "legal" but unlikely that an application could assign a new
* value to one of the standard windows. Check for that possibility
* and try to recover.
*
* We do not allow applications to assign new values in the reentrant
* model.
*/
#define SyncScreens(internal,exported) \
if (internal == 0) internal = exported; \
if (internal != exported) exported = internal
SyncScreens(CurScreen(SP_PARM), curscr);
SyncScreens(NewScreen(SP_PARM), newscr);
SyncScreens(StdScreen(SP_PARM), stdscr);
#endif
if (CurScreen(SP_PARM) == 0 if (CurScreen(SP_PARM) == 0
|| NewScreen(SP_PARM) == 0) || NewScreen(SP_PARM) == 0
|| StdScreen(SP_PARM) == 0)
returnCode(ERR); returnCode(ERR);
#ifdef TRACE #ifdef TRACE