diff options
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_overlay.c')
-rw-r--r-- | contrib/ncurses/ncurses/base/lib_overlay.c | 19 |
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 592e7ad..010e6d1 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; } |