aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_overlay.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2002-05-21 05:30:25 +0000
committerPeter Wemm <peter@FreeBSD.org>2002-05-21 05:30:25 +0000
commit39f2269fcb4873fd97d70af944ec49f4230fadea (patch)
treebd986d58f5a6e348466b5362637ba93e6cd5bf8c /contrib/ncurses/ncurses/base/lib_overlay.c
parent7e6a63408cfb0b48f0e41f77ed82f5d0ca60bda5 (diff)
downloadsrc-39f2269fcb4873fd97d70af944ec49f4230fadea.tar.gz
src-39f2269fcb4873fd97d70af944ec49f4230fadea.zip
Import ncurses-5.2-20020518 onto the vendor branch.
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=97049
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_overlay.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_overlay.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_overlay.c b/contrib/ncurses/ncurses/base/lib_overlay.c
index 592e7add9239..010e6d18c861 100644
--- a/contrib/ncurses/ncurses/base/lib_overlay.c
+++ b/contrib/ncurses/ncurses/base/lib_overlay.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000,2001 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 *
@@ -40,7 +40,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_overlay.c,v 1.14 2000/12/10 02:43:27 tom Exp $")
+MODULE_ID("$Id: lib_overlay.c,v 1.20 2001/12/19 01:06:37 tom Exp $")
static int
overlap(const WINDOW *const s, WINDOW *const d, int const flag)
@@ -109,8 +109,8 @@ copywin
{
int sx, sy, dx, dy;
bool touched;
- chtype bk = AttrOf(dst->_bkgd);
- chtype mask = ~(chtype) ((bk & A_COLOR) ? A_COLOR : 0);
+ attr_t bk = AttrOf(dst->_nc_bkgd);
+ attr_t mask = ~(attr_t) ((bk & A_COLOR) ? A_COLOR : 0);
T((T_CALLED("copywin(%p, %p, %d, %d, %d, %d, %d, %d, %d)"),
src, dst, sminrow, smincol, dminrow, dmincol, dmaxrow, dmaxcol, over));
@@ -137,14 +137,15 @@ copywin
touched = FALSE;
for (dx = dmincol, sx = smincol; dx <= dmaxcol; sx++, dx++) {
if (over) {
- if ((TextOf(src->_line[sy].text[sx]) != ' ') &&
- (dst->_line[dy].text[dx] != src->_line[sy].text[sx])) {
- dst->_line[dy].text[dx] =
- (src->_line[sy].text[sx] & mask) | bk;
+ if ((CharOf(src->_line[sy].text[sx]) != L(' ')) &&
+ (!CharEq(dst->_line[dy].text[dx], src->_line[sy].text[sx]))) {
+ dst->_line[dy].text[dx] = src->_line[sy].text[sx];
+ SetAttr(dst->_line[dy].text[dx],
+ (AttrOf(src->_line[sy].text[sx]) & mask) | bk);
touched = TRUE;
}
} else {
- if (dst->_line[dy].text[dx] != src->_line[sy].text[sx]) {
+ if (!CharEq(dst->_line[dy].text[dx], src->_line[sy].text[sx])) {
dst->_line[dy].text[dx] = src->_line[sy].text[sx];
touched = TRUE;
}