]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tty/tty_update.c
ncurses 5.7 - patch 20090124
[ncurses.git] / ncurses / tty / tty_update.c
index 866681369a108ab989a3b45ce3e4dea84ddb7bbd..215747da82c2b381b35f43eb691b843a4d36493f 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2006,2007 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            *
 
 #include <curses.priv.h>
 
+#if defined __HAIKU__ && defined __BEOS__
+#undef __BEOS__
+#endif
+
 #ifdef __BEOS__
 #undef false
 #undef true
@@ -74,7 +78,7 @@
 #include <ctype.h>
 #include <term.h>
 
-MODULE_ID("$Id: tty_update.c,v 1.243 2007/10/13 20:03:32 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
@@ -645,7 +649,7 @@ doupdate(void)
        SP->_fifohold--;
 
 #if USE_SIZECHANGE
-    if (SP->_endwin || _nc_handle_sigwinch(FALSE)) {
+    if (SP->_endwin || _nc_handle_sigwinch(SP)) {
        /*
         * This is a transparent extension:  XSI does not address it,
         * and applications need not know that ncurses can do it.
@@ -654,7 +658,7 @@ doupdate(void)
         * (this can happen in an xterm, for example), and resize the
         * ncurses data structures accordingly.
         */
-       _nc_update_screensize();
+       _nc_update_screensize(SP);
     }
 #endif
 
@@ -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]));
                    }