ncurses 5.9 - patch 20130608
[ncurses.git] / panel / p_update.c
index e7e31ef69295060e3d9c22eb6bcef1f4d66b009f..a2f45063cf5ce1e98f07a7cfb1c15d39444f9754 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc.                        *
+ * Copyright (c) 1998-2009,2010 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,6 +29,7 @@
 /****************************************************************************
  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
 /****************************************************************************
  *  Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995                    *
  *     and: Eric S. Raymond <esr@snark.thyrsus.com>                         *
+ *     and: Juergen Pfeifer                         1997-1999,2008          *
  ****************************************************************************/
 
 /* p_update.c
  ****************************************************************************/
 
 /* p_update.c
  */
 #include "panel.priv.h"
 
  */
 #include "panel.priv.h"
 
-MODULE_ID("$Id: p_update.c,v 1.2 1998/02/11 12:14:01 tom Exp $")
+MODULE_ID("$Id: p_update.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
 
 
-void
-update_panels(void)
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
 {
   PANEL *pan;
 
 {
   PANEL *pan;
 
+  T((T_CALLED("update_panels(%p)"), (void *)SP_PARM));
   dBug(("--> update_panels"));
   dBug(("--> update_panels"));
-  pan = _nc_bottom_panel;
-  while(pan)
-    {
-      _nc_override(pan,P_UPDATE);
-      pan = pan->above;
-    }
 
 
-  pan = _nc_bottom_panel;
-  while (pan)
+  if (SP_PARM)
     {
     {
-      if (is_wintouched(pan->win))
-       Wnoutrefresh(pan);
-      pan = pan->above;
+      GetScreenHook(SP_PARM);
+
+      pan = _nc_bottom_panel;
+      while (pan && pan->above)
+       {
+         PANEL_UPDATE(pan, pan->above);
+         pan = pan->above;
+       }
+
+      pan = _nc_bottom_panel;
+      while (pan)
+       {
+         Wnoutrefresh(pan);
+         pan = pan->above;
+       }
     }
     }
+
+  returnVoid;
+}
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+update_panels(void)
+{
+  NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN);
 }
 }
+#endif