X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftty%2Ftty_update.c;h=215747da82c2b381b35f43eb691b843a4d36493f;hb=95a30fbbfc81d5eb0a76e139c86e0a6505cad871;hp=16fc17d27236ae04960e4fef13bcf5de7f69a549;hpb=ed530db2c5b10aa19d06104dfe82cf248a813860;p=ncurses.git diff --git a/ncurses/tty/tty_update.c b/ncurses/tty/tty_update.c index 16fc17d2..215747da 100644 --- a/ncurses/tty/tty_update.c +++ b/ncurses/tty/tty_update.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * + * Copyright (c) 1998-2008,2009 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 * @@ -44,6 +44,10 @@ #include +#if defined __HAIKU__ && defined __BEOS__ +#undef __BEOS__ +#endif + #ifdef __BEOS__ #undef false #undef true @@ -74,7 +78,7 @@ #include #include -MODULE_ID("$Id: tty_update.c,v 1.245 2008/05/03 22:43:04 tom Exp $") +MODULE_ID("$Id: tty_update.c,v 1.247 2009/01/25 00:48:36 tom Exp $") /* * This define controls the line-breakout optimization. Every once in a @@ -1161,8 +1165,8 @@ TransformLine(int const lineno) newPair = GetPair(newLine[n]); if (oldPair != newPair && unColor(oldLine[n]) == unColor(newLine[n])) { - if (oldPair < COLOR_PAIRS - && newPair < COLOR_PAIRS + if (oldPair < SP->_pair_limit + && newPair < SP->_pair_limit && SP->_color_pairs[oldPair] == SP->_color_pairs[newPair]) { SetPair(oldLine[n], GetPair(newLine[n])); }