aboutsummaryrefslogtreecommitdiff
path: root/panel
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2011-04-30 10:55:14 +0000
committerEd Schouten <ed@FreeBSD.org>2011-04-30 10:55:14 +0000
commit0294a182a1629b1d854b84906e73487d6cb75fba (patch)
treee563e21bcc0164ba11452983316bda26eebb1d3c /panel
parent22b11c4db16996bf8d4878fab98762c348676df3 (diff)
downloadsrc-0294a182a1629b1d854b84906e73487d6cb75fba.tar.gz
src-0294a182a1629b1d854b84906e73487d6cb75fba.zip
Import a stock copy of ncurses 5.8 into the vendor space.vendor/ncurses/5.8-20110226
It seems both local changes we made to 5.7 have already been fixed upstream properly, so there is no need to preserve the changes. Also, with SVN we import full source trees. Unlike CVS, where we removed unneeded cruft.
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=221243 svn path=/vendor/ncurses/5.8-20110226/; revision=221244; tag=vendor/ncurses/5.8-20110226
Diffstat (limited to 'panel')
-rw-r--r--panel/Makefile.in19
-rw-r--r--panel/llib-lpanel21
-rw-r--r--panel/llib-lpanelt197
-rw-r--r--panel/llib-lpaneltw197
-rw-r--r--panel/llib-lpanelw21
-rw-r--r--panel/modules34
-rw-r--r--panel/p_above.c46
-rw-r--r--panel/p_below.c43
-rw-r--r--panel/p_bottom.c8
-rw-r--r--panel/p_delete.c14
-rw-r--r--panel/p_hidden.c18
-rw-r--r--panel/p_hide.c24
-rw-r--r--panel/p_move.c24
-rw-r--r--panel/p_new.c29
-rw-r--r--panel/p_replace.c26
-rw-r--r--panel/p_show.c39
-rw-r--r--panel/p_top.c6
-rw-r--r--panel/p_update.c43
-rw-r--r--panel/p_user.c8
-rw-r--r--panel/p_win.c6
-rw-r--r--panel/panel.c10
-rw-r--r--panel/panel.h12
-rw-r--r--panel/panel.priv.h59
23 files changed, 744 insertions, 160 deletions
diff --git a/panel/Makefile.in b/panel/Makefile.in
index 89dbeeac9009..f0f0a4922bd0 100644
--- a/panel/Makefile.in
+++ b/panel/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.52 2007/04/28 14:56:11 tom Exp $
+# $Id: Makefile.in,v 1.58 2010/11/27 21:45:27 tom Exp $
##############################################################################
-# Copyright (c) 1998-2006,2007 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 "Software"), #
@@ -43,6 +43,7 @@
.SUFFIXES:
SHELL = /bin/sh
+VPATH = @srcdir@
THIS = Makefile
x = @EXEEXT@
@@ -64,6 +65,7 @@ LIBTOOL_COMPILE = @LIB_COMPILE@
LIBTOOL_LINK = @LIB_LINK@
LIBTOOL_INSTALL = @LIB_INSTALL@
LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
+LT_UNDEF = @LT_UNDEF@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
@@ -71,11 +73,14 @@ INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
-AR_OPTS = @AR_OPTS@
+ARFLAGS = @ARFLAGS@
AWK = @AWK@
LD = @LD@
LN_S = @LN_S@
+CTAGS = @CTAGS@
+ETAGS = @ETAGS@
+
CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
@@ -125,7 +130,7 @@ sources: $(AUTO_SRC)
$(DESTDIR)$(bindir) \
$(DESTDIR)$(libdir) :
- sh $(srcdir)/../mkdirs.sh $@
+ mkdir -p $@
# make a copy to simplify include-paths while still keeping panel's include
# file in this directory.
@@ -133,15 +138,15 @@ $(DESTDIR)$(libdir) :
-rm -f $@
cp $(srcdir)/panel.h $@
-PANEL_PRIV_H = \
+HEADER_DEPS = \
$(srcdir)/panel.priv.h \
$(srcdir)/panel.h
tags:
- ctags *.[ch]
+ $(CTAGS) *.[ch]
@MAKE_UPPER_TAGS@TAGS:
-@MAKE_UPPER_TAGS@ etags *.[ch]
+@MAKE_UPPER_TAGS@ $(ETAGS) *.[ch]
mostlyclean ::
-rm -f core tags TAGS *~ *.bak *.i *.ln *.atac trace
diff --git a/panel/llib-lpanel b/panel/llib-lpanel
index de49c234ecaa..85371ec73e06 100644
--- a/panel/llib-lpanel
+++ b/panel/llib-lpanel
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 1997,2002,2005 *
+ * Author: Thomas E. Dickey 1997,2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./panel.c */
-#include "panel.priv.h"
+#include <panel.priv.h>
#undef _nc_retrace_panel
PANEL *_nc_retrace_panel(
@@ -77,6 +77,11 @@ void _nc_Touchline(
/* ./p_above.c */
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_above
PANEL *panel_above(
const PANEL *pan)
@@ -84,6 +89,11 @@ PANEL *panel_above(
/* ./p_below.c */
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_below
PANEL *panel_below(
const PANEL *pan)
@@ -157,6 +167,11 @@ int top_panel(
/* ./p_update.c */
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef update_panels
void update_panels(void)
{ /* void */ }
diff --git a/panel/llib-lpanelt b/panel/llib-lpanelt
new file mode 100644
index 000000000000..8fcd42c9b6de
--- /dev/null
+++ b/panel/llib-lpanelt
@@ -0,0 +1,197 @@
+/****************************************************************************
+ * Copyright (c) 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 *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./panel.c */
+
+#include <panel.priv.h>
+
+#undef _nc_retrace_panel
+PANEL *_nc_retrace_panel(
+ PANEL *pan)
+ { return(*(PANEL **)0); }
+
+#undef _nc_my_visbuf
+const char *_nc_my_visbuf(
+ const void *ptr)
+ { return(*(const char **)0); }
+
+#undef _nc_dPanel
+void _nc_dPanel(
+ const char *text,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_dStack
+void _nc_dStack(
+ const char *fmt,
+ int num,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Wnoutrefresh
+void _nc_Wnoutrefresh(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchpan
+void _nc_Touchpan(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchline
+void _nc_Touchline(
+ const PANEL *pan,
+ int start,
+ int count)
+ { /* void */ }
+
+/* ./p_above.c */
+
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_above
+PANEL *panel_above(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_below.c */
+
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_below
+PANEL *panel_below(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_bottom.c */
+
+#undef bottom_panel
+int bottom_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_delete.c */
+
+#undef del_panel
+int del_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hide.c */
+
+#undef hide_panel
+int hide_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hidden.c */
+
+#undef panel_hidden
+int panel_hidden(
+ const PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_move.c */
+
+#undef move_panel
+int move_panel(
+ PANEL *pan,
+ int starty,
+ int startx)
+ { return(*(int *)0); }
+
+/* ./p_new.c */
+
+#undef new_panel
+PANEL *new_panel(
+ WINDOW *win)
+ { return(*(PANEL **)0); }
+
+/* ./p_replace.c */
+
+#undef replace_panel
+int replace_panel(
+ PANEL *pan,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./p_show.c */
+
+#undef show_panel
+int show_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_top.c */
+
+#undef top_panel
+int top_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_update.c */
+
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef update_panels
+void update_panels(void)
+ { /* void */ }
+
+/* ./p_user.c */
+
+#undef set_panel_userptr
+int set_panel_userptr(
+ PANEL *pan,
+ void *uptr)
+ { return(*(int *)0); }
+
+#undef panel_userptr
+void *panel_userptr(
+ const PANEL *pan)
+ { return(*(void **)0); }
+
+/* ./p_win.c */
+
+#undef panel_window
+WINDOW *panel_window(
+ const PANEL *pan)
+ { return(*(WINDOW **)0); }
diff --git a/panel/llib-lpaneltw b/panel/llib-lpaneltw
new file mode 100644
index 000000000000..1d3cd8d84c8f
--- /dev/null
+++ b/panel/llib-lpaneltw
@@ -0,0 +1,197 @@
+/****************************************************************************
+ * Copyright (c) 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 *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey 2010 *
+ ****************************************************************************/
+/* LINTLIBRARY */
+
+/* ./panel.c */
+
+#include <panel.priv.h>
+
+#undef _nc_retrace_panel
+PANEL *_nc_retrace_panel(
+ PANEL *pan)
+ { return(*(PANEL **)0); }
+
+#undef _nc_my_visbuf
+const char *_nc_my_visbuf(
+ const void *ptr)
+ { return(*(const char **)0); }
+
+#undef _nc_dPanel
+void _nc_dPanel(
+ const char *text,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_dStack
+void _nc_dStack(
+ const char *fmt,
+ int num,
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Wnoutrefresh
+void _nc_Wnoutrefresh(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchpan
+void _nc_Touchpan(
+ const PANEL *pan)
+ { /* void */ }
+
+#undef _nc_Touchline
+void _nc_Touchline(
+ const PANEL *pan,
+ int start,
+ int count)
+ { /* void */ }
+
+/* ./p_above.c */
+
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_above
+PANEL *panel_above(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_below.c */
+
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
+#undef panel_below
+PANEL *panel_below(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_bottom.c */
+
+#undef bottom_panel
+int bottom_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_delete.c */
+
+#undef del_panel
+int del_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hide.c */
+
+#undef hide_panel
+int hide_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_hidden.c */
+
+#undef panel_hidden
+int panel_hidden(
+ const PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_move.c */
+
+#undef move_panel
+int move_panel(
+ PANEL *pan,
+ int starty,
+ int startx)
+ { return(*(int *)0); }
+
+/* ./p_new.c */
+
+#undef new_panel
+PANEL *new_panel(
+ WINDOW *win)
+ { return(*(PANEL **)0); }
+
+/* ./p_replace.c */
+
+#undef replace_panel
+int replace_panel(
+ PANEL *pan,
+ WINDOW *win)
+ { return(*(int *)0); }
+
+/* ./p_show.c */
+
+#undef show_panel
+int show_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_top.c */
+
+#undef top_panel
+int top_panel(
+ PANEL *pan)
+ { return(*(int *)0); }
+
+/* ./p_update.c */
+
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
+#undef update_panels
+void update_panels(void)
+ { /* void */ }
+
+/* ./p_user.c */
+
+#undef set_panel_userptr
+int set_panel_userptr(
+ PANEL *pan,
+ void *uptr)
+ { return(*(int *)0); }
+
+#undef panel_userptr
+void *panel_userptr(
+ const PANEL *pan)
+ { return(*(void **)0); }
+
+/* ./p_win.c */
+
+#undef panel_window
+WINDOW *panel_window(
+ const PANEL *pan)
+ { return(*(WINDOW **)0); }
diff --git a/panel/llib-lpanelw b/panel/llib-lpanelw
index 48bd1e0db5a7..503b34345ba8 100644
--- a/panel/llib-lpanelw
+++ b/panel/llib-lpanelw
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2005,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 *
@@ -27,13 +27,13 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey 2002,2005 *
+ * Author: Thomas E. Dickey 2002-2005,2010 *
****************************************************************************/
/* LINTLIBRARY */
/* ./panel.c */
-#include "panel.priv.h"
+#include <panel.priv.h>
#undef _nc_retrace_panel
PANEL *_nc_retrace_panel(
@@ -77,6 +77,11 @@ void _nc_Touchline(
/* ./p_above.c */
+#undef ground_panel
+PANEL *ground_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_above
PANEL *panel_above(
const PANEL *pan)
@@ -84,6 +89,11 @@ PANEL *panel_above(
/* ./p_below.c */
+#undef ceiling_panel
+PANEL *ceiling_panel(
+ SCREEN *sp)
+ { return(*(PANEL **)0); }
+
#undef panel_below
PANEL *panel_below(
const PANEL *pan)
@@ -157,6 +167,11 @@ int top_panel(
/* ./p_update.c */
+#undef update_panels_sp
+void update_panels_sp(
+ SCREEN *sp)
+ { /* void */ }
+
#undef update_panels
void update_panels(void)
{ /* void */ }
diff --git a/panel/modules b/panel/modules
index d0f7a796678f..cd3f545630f7 100644
--- a/panel/modules
+++ b/panel/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.9 2006/12/24 00:53:17 tom Exp $
+# $Id: modules,v 1.10 2010/01/23 16:31:16 tom Exp $
##############################################################################
-# Copyright (c) 1998,2006 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2006,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 "Software"), #
@@ -32,20 +32,20 @@
@ base
# Library objects
-panel lib $(srcdir) $(PANEL_PRIV_H)
-p_above lib $(srcdir) $(PANEL_PRIV_H)
-p_below lib $(srcdir) $(PANEL_PRIV_H)
-p_bottom lib $(srcdir) $(PANEL_PRIV_H)
-p_delete lib $(srcdir) $(PANEL_PRIV_H)
-p_hide lib $(srcdir) $(PANEL_PRIV_H)
-p_hidden lib $(srcdir) $(PANEL_PRIV_H)
-p_move lib $(srcdir) $(PANEL_PRIV_H)
-p_new lib $(srcdir) $(PANEL_PRIV_H)
-p_replace lib $(srcdir) $(PANEL_PRIV_H)
-p_show lib $(srcdir) $(PANEL_PRIV_H)
-p_top lib $(srcdir) $(PANEL_PRIV_H)
-p_update lib $(srcdir) $(PANEL_PRIV_H)
-p_user lib $(srcdir) $(PANEL_PRIV_H)
-p_win lib $(srcdir) $(PANEL_PRIV_H)
+panel lib $(srcdir) $(HEADER_DEPS)
+p_above lib $(srcdir) $(HEADER_DEPS)
+p_below lib $(srcdir) $(HEADER_DEPS)
+p_bottom lib $(srcdir) $(HEADER_DEPS)
+p_delete lib $(srcdir) $(HEADER_DEPS)
+p_hide lib $(srcdir) $(HEADER_DEPS)
+p_hidden lib $(srcdir) $(HEADER_DEPS)
+p_move lib $(srcdir) $(HEADER_DEPS)
+p_new lib $(srcdir) $(HEADER_DEPS)
+p_replace lib $(srcdir) $(HEADER_DEPS)
+p_show lib $(srcdir) $(HEADER_DEPS)
+p_top lib $(srcdir) $(HEADER_DEPS)
+p_update lib $(srcdir) $(HEADER_DEPS)
+p_user lib $(srcdir) $(HEADER_DEPS)
+p_win lib $(srcdir) $(HEADER_DEPS)
# vile:makemode
diff --git a/panel/p_above.c b/panel/p_above.c
index 32495f627f2d..8bbf1bc21cea 100644
--- a/panel/p_above.c
+++ b/panel/p_above.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 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 *
@@ -29,24 +29,56 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_above.c
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_above.c,v 1.6 2005/02/19 16:44:57 tom Exp $")
+MODULE_ID("$Id: p_above.c,v 1.8 2010/01/23 21:22:15 tom Exp $")
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(PANEL *)
+ground_panel(SCREEN * sp)
+{
+ T((T_CALLED("ground_panel(%p)"), sp));
+ if (sp)
+ {
+ struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
+
+ if (_nc_bottom_panel) /* this is the pseudo panel */
+ returnPanel(_nc_bottom_panel->above);
+ else
+ returnPanel(0);
+ }
+ else
+ {
+ if (0 == CURRENT_SCREEN)
+ returnPanel(0);
+ else
+ returnPanel(ground_panel(CURRENT_SCREEN));
+ }
+}
+#endif
NCURSES_EXPORT(PANEL *)
panel_above(const PANEL * pan)
{
- T((T_CALLED("panel_above(%p)"), pan));
- if (!pan)
+ PANEL *result;
+
+ T((T_CALLED("panel_above(%p)"), (const void *)pan));
+ if (pan)
+ result = pan->above;
+ else
{
+#if NCURSES_SP_FUNCS
+ result = ground_panel(CURRENT_SCREEN);
+#else
/* if top and bottom are equal, we have no or only the pseudo panel;
if not, we return the panel above the pseudo panel */
- returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above);
+ result = EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above;
+#endif
}
- else
- returnPanel(pan->above);
+ returnPanel(result);
}
diff --git a/panel/p_below.c b/panel/p_below.c
index c4b241015f5b..f276ef959da5 100644
--- a/panel/p_below.c
+++ b/panel/p_below.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 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 *
@@ -29,26 +29,57 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_below.c
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_below.c,v 1.6 2005/02/19 16:45:10 tom Exp $")
+MODULE_ID("$Id: p_below.c,v 1.8 2010/01/23 21:22:15 tom Exp $")
+#if NCURSES_SP_FUNCS
NCURSES_EXPORT(PANEL *)
-panel_below(const PANEL * pan)
+ceiling_panel(SCREEN * sp)
{
- T((T_CALLED("panel_below(%p)"), pan));
- if (!pan)
+ T((T_CALLED("ceiling_panel(%p)"), sp));
+ if (sp)
{
+ struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
+
/* if top and bottom are equal, we have no or only the pseudo panel */
returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel);
}
else
{
+ if (0 == CURRENT_SCREEN)
+ returnPanel(0);
+ else
+ returnPanel(ceiling_panel(CURRENT_SCREEN));
+ }
+}
+#endif
+
+NCURSES_EXPORT(PANEL *)
+panel_below(const PANEL * pan)
+{
+ PANEL *result;
+
+ T((T_CALLED("panel_below(%p)"), (const void *)pan));
+ if (pan)
+ {
+ GetHook(pan);
/* we must not return the pseudo panel */
- returnPanel(Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below);
+ result = Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below;
+ }
+ else
+ {
+#if NCURSES_SP_FUNCS
+ result = ceiling_panel(CURRENT_SCREEN);
+#else
+ /* if top and bottom are equal, we have no or only the pseudo panel */
+ result = EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel;
+#endif
}
+ returnPanel(result);
}
diff --git a/panel/p_bottom.c b/panel/p_bottom.c
index b861fd9b2ce7..db814415375c 100644
--- a/panel/p_bottom.c
+++ b/panel/p_bottom.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 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 *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_bottom.c
@@ -36,16 +37,17 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_bottom.c,v 1.11 2005/02/19 16:38:16 tom Exp $")
+MODULE_ID("$Id: p_bottom.c,v 1.13 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
bottom_panel(PANEL * pan)
{
int err = OK;
- T((T_CALLED("bottom_panel(%p)"), pan));
+ T((T_CALLED("bottom_panel(%p)"), (void *)pan));
if (pan)
{
+ GetHook(pan);
if (!Is_Bottom(pan))
{
diff --git a/panel/p_delete.c b/panel/p_delete.c
index 24ee26b4ff23..39b055377c16 100644
--- a/panel/p_delete.c
+++ b/panel/p_delete.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 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 *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1999,2008 *
****************************************************************************/
/* p_delete.c
@@ -36,19 +37,22 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_delete.c,v 1.8 2005/02/19 16:38:45 tom Exp $")
+MODULE_ID("$Id: p_delete.c,v 1.10 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
del_panel(PANEL * pan)
{
int err = OK;
- T((T_CALLED("del_panel(%p)"), pan));
+ T((T_CALLED("del_panel(%p)"), (void *)pan));
if (pan)
{
dBug(("--> del_panel %s", USER_PTR(pan->user)));
- HIDE_PANEL(pan, err, OK);
- free((void *)pan);
+ {
+ GetHook(pan);
+ HIDE_PANEL(pan, err, OK);
+ free((void *)pan);
+ }
}
else
err = ERR;
diff --git a/panel/p_hidden.c b/panel/p_hidden.c
index 624c07dae0ba..01b69b91d919 100644
--- a/panel/p_hidden.c
+++ b/panel/p_hidden.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 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 *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2008 *
****************************************************************************/
/* p_hidden.c
@@ -36,13 +37,18 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hidden.c,v 1.7 2005/02/19 16:39:17 tom Exp $")
+MODULE_ID("$Id: p_hidden.c,v 1.9 2010/01/23 21:22:15 tom Exp $")
NCURSES_EXPORT(int)
panel_hidden(const PANEL * pan)
{
- T((T_CALLED("panel_hidden(%p)"), pan));
- if (!pan)
- returnCode(ERR);
- returnCode(IS_LINKED(pan) ? FALSE : TRUE);
+ int rc = ERR;
+
+ T((T_CALLED("panel_hidden(%p)"), (const void *)pan));
+ if (pan)
+ {
+ GetHook(pan);
+ rc = (IS_LINKED(pan) ? FALSE : TRUE);
+ }
+ returnCode(rc);
}
diff --git a/panel/p_hide.c b/panel/p_hide.c
index 08d8853a201c..7b780d464e16 100644
--- a/panel/p_hide.c
+++ b/panel/p_hide.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -36,23 +36,27 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $")
+MODULE_ID("$Id: p_hide.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
hide_panel(register PANEL * pan)
{
- int err = OK;
+ int err = ERR;
- T((T_CALLED("hide_panel(%p)"), pan));
- if (!pan)
- returnCode(ERR);
+ T((T_CALLED("hide_panel(%p)"), (void *)pan));
- dBug(("--> hide_panel %s", USER_PTR(pan->user)));
- dStack("<u%d>", 1, pan);
+ if (pan)
+ {
+ GetHook(pan);
- HIDE_PANEL(pan, err, ERR);
+ dBug(("--> hide_panel %s", USER_PTR(pan->user)));
+ dStack("<u%d>", 1, pan);
- dStack("<u%d>", 9, pan);
+ HIDE_PANEL(pan, err, ERR);
+ err = OK;
+
+ dStack("<u%d>", 9, pan);
+ }
returnCode(err);
}
diff --git a/panel/p_move.c b/panel/p_move.c
index 3818e8cba860..adae64583220 100644
--- a/panel/p_move.c
+++ b/panel/p_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2008,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 *
@@ -29,6 +29,7 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1997-1999,2009 *
****************************************************************************/
/* p_move.c
@@ -36,21 +37,24 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_move.c,v 1.9 2005/02/19 16:46:49 tom Exp $")
+MODULE_ID("$Id: p_move.c,v 1.11 2010/01/23 21:22:15 tom Exp $")
NCURSES_EXPORT(int)
move_panel(PANEL * pan, int starty, int startx)
{
- T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
+ int rc = ERR;
- if (!pan)
- returnCode(ERR);
+ T((T_CALLED("move_panel(%p,%d,%d)"), (void *)pan, starty, startx));
- if (IS_LINKED(pan))
+ if (pan)
{
- Touchpan(pan);
- PANEL_UPDATE(pan, (PANEL *) 0);
+ GetHook(pan);
+ if (IS_LINKED(pan))
+ {
+ Touchpan(pan);
+ PANEL_UPDATE(pan, (PANEL *) 0);
+ }
+ rc = mvwin(pan->win, starty, startx);
}
-
- returnCode(mvwin(pan->win, starty, startx));
+ returnCode(rc);
}
diff --git a/panel/p_new.c b/panel/p_new.c
index 2719316888e0..235336c22f51 100644
--- a/panel/p_new.c
+++ b/panel/p_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,2008 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 *
@@ -38,7 +38,7 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_new.c,v 1.10 2008/08/04 18:25:48 tom Exp $")
+MODULE_ID("$Id: p_new.c,v 1.16 2010/01/23 21:22:16 tom Exp $")
#ifdef TRACE
static char *stdscr_id;
@@ -50,20 +50,27 @@ static char *new_id;
Establish the pseudo panel for stdscr if necessary.
--------------------------------------------------------------------------*/
static PANEL *
-root_panel(void)
+root_panel(NCURSES_SP_DCL0)
{
+#if NCURSES_SP_FUNCS
+ struct panelhook *ph = NCURSES_SP_NAME(_nc_panelhook) (sp);
+
+#elif NO_LEAKS
+ struct panelhook *ph = _nc_panelhook();
+#endif
+
if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
{
- assert(stdscr && !_nc_bottom_panel && !_nc_top_panel);
+ assert(SP_PARM && SP_PARM->_stdscr && !_nc_bottom_panel && !_nc_top_panel);
#if NO_LEAKS
- _nc_panelhook()->destroy = del_panel;
+ ph->destroy = del_panel;
#endif
- _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL));
+ _nc_stdscr_pseudo_panel = typeMalloc(PANEL, 1);
if (_nc_stdscr_pseudo_panel != 0)
{
PANEL *pan = _nc_stdscr_pseudo_panel;
- WINDOW *win = stdscr;
+ WINDOW *win = SP_PARM->_stdscr;
pan->win = win;
pan->below = (PANEL *) 0;
@@ -86,16 +93,18 @@ new_panel(WINDOW *win)
{
PANEL *pan = (PANEL *) 0;
- T((T_CALLED("new_panel(%p)"), win));
+ GetWindowHook(win);
+
+ T((T_CALLED("new_panel(%p)"), (void *)win));
if (!win)
returnPanel(pan);
if (!_nc_stdscr_pseudo_panel)
- (void)root_panel();
+ (void)root_panel(NCURSES_SP_ARG);
assert(_nc_stdscr_pseudo_panel);
- if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL))))
+ if (!(win->_flags & _ISPAD) && (pan = typeMalloc(PANEL, 1)))
{
pan->win = win;
pan->above = (PANEL *) 0;
diff --git a/panel/p_replace.c b/panel/p_replace.c
index 5d0d295c8b17..d3733ed22e2f 100644
--- a/panel/p_replace.c
+++ b/panel/p_replace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -36,23 +36,25 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $")
+MODULE_ID("$Id: p_replace.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
replace_panel(PANEL * pan, WINDOW *win)
{
- T((T_CALLED("replace_panel(%p,%p)"), pan, win));
+ int rc = ERR;
- if (!pan)
- returnCode(ERR);
+ T((T_CALLED("replace_panel(%p,%p)"), (void *)pan, (void *)win));
- if (IS_LINKED(pan))
+ if (pan)
{
- Touchpan(pan);
- PANEL_UPDATE(pan, (PANEL *) 0);
+ GetHook(pan);
+ if (IS_LINKED(pan))
+ {
+ Touchpan(pan);
+ PANEL_UPDATE(pan, (PANEL *) 0);
+ }
+ pan->win = win;
+ rc = OK;
}
-
- pan->win = win;
-
- returnCode(OK);
+ returnCode(rc);
}
diff --git a/panel/p_show.c b/panel/p_show.c
index 35eee237b958..d5b09bd94260 100644
--- a/panel/p_show.c
+++ b/panel/p_show.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -36,34 +36,37 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_show.c,v 1.11 2005/02/19 16:42:02 tom Exp $")
+MODULE_ID("$Id: p_show.c,v 1.13 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
show_panel(PANEL * pan)
{
- int err = OK;
+ int err = ERR;
- T((T_CALLED("show_panel(%p)"), pan));
+ T((T_CALLED("show_panel(%p)"), (void *)pan));
- if (!pan)
- returnCode(ERR);
+ if (pan)
+ {
+ GetHook(pan);
- if (Is_Top(pan))
- returnCode(OK);
+ if (Is_Top(pan))
+ returnCode(OK);
- dBug(("--> show_panel %s", USER_PTR(pan->user)));
+ dBug(("--> show_panel %s", USER_PTR(pan->user)));
- HIDE_PANEL(pan, err, OK);
+ HIDE_PANEL(pan, err, OK);
- dStack("<lt%d>", 1, pan);
- assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
+ dStack("<lt%d>", 1, pan);
+ assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
- _nc_top_panel->above = pan;
- pan->below = _nc_top_panel;
- pan->above = (PANEL *) 0;
- _nc_top_panel = pan;
+ _nc_top_panel->above = pan;
+ pan->below = _nc_top_panel;
+ pan->above = (PANEL *) 0;
+ _nc_top_panel = pan;
- dStack("<lt%d>", 9, pan);
+ err = OK;
- returnCode(OK);
+ dStack("<lt%d>", 9, pan);
+ }
+ returnCode(err);
}
diff --git a/panel/p_top.c b/panel/p_top.c
index 8bd1d9fb3fec..fdcdee9afcdc 100644
--- a/panel/p_top.c
+++ b/panel/p_top.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -36,11 +36,11 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_top.c,v 1.5 2005/02/19 16:42:23 tom Exp $")
+MODULE_ID("$Id: p_top.c,v 1.6 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(int)
top_panel(PANEL * pan)
{
- T((T_CALLED("top_panel(%p)"), pan));
+ T((T_CALLED("top_panel(%p)"), (void *)pan));
returnCode(show_panel(pan));
}
diff --git a/panel/p_update.c b/panel/p_update.c
index 5967718160ff..a2f45063cf5c 100644
--- a/panel/p_update.c
+++ b/panel/p_update.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 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 *
@@ -29,6 +29,7 @@
/****************************************************************************
* 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
@@ -36,28 +37,42 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_update.c,v 1.9 2005/02/19 16:49:47 tom Exp $")
+MODULE_ID("$Id: p_update.c,v 1.11 2010/01/23 21:22:16 tom Exp $")
NCURSES_EXPORT(void)
-update_panels(void)
+NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
{
PANEL *pan;
- T((T_CALLED("update_panels()")));
+ T((T_CALLED("update_panels(%p)"), (void *)SP_PARM));
dBug(("--> update_panels"));
- pan = _nc_bottom_panel;
- while (pan && pan->above)
- {
- PANEL_UPDATE(pan, pan->above);
- pan = pan->above;
- }
- pan = _nc_bottom_panel;
- while (pan)
+ if (SP_PARM)
{
- 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
diff --git a/panel/p_user.c b/panel/p_user.c
index ffa25f85ae12..deb5bdf7e4c5 100644
--- a/panel/p_user.c
+++ b/panel/p_user.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -36,12 +36,12 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_user.c,v 1.6 2005/02/19 16:52:44 tom Exp $")
+MODULE_ID("$Id: p_user.c,v 1.8 2010/01/23 23:18:35 tom Exp $")
NCURSES_EXPORT(int)
set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
{
- T((T_CALLED("set_panel_userptr(%p,%p)"), pan, uptr));
+ T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr));
if (!pan)
returnCode(ERR);
pan->user = uptr;
@@ -51,6 +51,6 @@ set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
NCURSES_EXPORT(NCURSES_CONST void *)
panel_userptr(const PANEL * pan)
{
- T((T_CALLED("panel_userptr(%p)"), pan));
+ T((T_CALLED("panel_userptr(%p)"), (const void *)pan));
returnCVoidPtr(pan ? pan->user : (NCURSES_CONST void *)0);
}
diff --git a/panel/p_win.c b/panel/p_win.c
index e7d2cea8e3fe..6643d5c2671f 100644
--- a/panel/p_win.c
+++ b/panel/p_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,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 *
@@ -36,11 +36,11 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_win.c,v 1.5 2005/02/19 16:44:16 tom Exp $")
+MODULE_ID("$Id: p_win.c,v 1.6 2010/01/23 21:22:15 tom Exp $")
NCURSES_EXPORT(WINDOW *)
panel_window(const PANEL * pan)
{
- T((T_CALLED("panel_window(%p)"), pan));
+ T((T_CALLED("panel_window(%p)"), (const void *)pan));
returnWin(pan ? pan->win : (WINDOW *)0);
}
diff --git a/panel/panel.c b/panel/panel.c
index 16a8083d64b2..96cbbab77400 100644
--- a/panel/panel.c
+++ b/panel/panel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2004,2005 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 *
@@ -29,12 +29,14 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1996-1999,2008 *
+ * and: Thomas E. Dickey *
****************************************************************************/
/* panel.c -- implementation of panels library, some core routines */
#include "panel.priv.h"
-MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
+MODULE_ID("$Id: panel.c,v 1.25 2010/01/23 21:22:16 tom Exp $")
/*+-------------------------------------------------------------------------
_nc_retrace_panel (pan)
@@ -43,7 +45,7 @@ MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
NCURSES_EXPORT(PANEL *)
_nc_retrace_panel(PANEL * pan)
{
- T((T_RETURN("%p"), pan));
+ T((T_RETURN("%p"), (void *)pan));
return pan;
}
#endif
@@ -91,6 +93,8 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan)
{
char s80[80];
+ GetPanelHook(pan);
+
sprintf(s80, fmt, num, pan);
_tracef("%s b=%s t=%s", s80,
(_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--",
diff --git a/panel/panel.h b/panel/panel.h
index 1e02091d97f2..6ed2061d1ff8 100644
--- a/panel/panel.h
+++ b/panel/panel.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2001,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2006,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 *
@@ -29,9 +29,10 @@
/****************************************************************************
* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 *
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
+ * and: Juergen Pfeifer 1996-1999,2008 *
****************************************************************************/
-/* $Id: panel.h,v 1.10 2006/05/27 19:49:40 tom Exp $ */
+/* $Id: panel.h,v 1.11 2009/04/11 19:50:40 tom Exp $ */
/* panel.h -- interface file for panels library */
@@ -68,6 +69,13 @@ extern NCURSES_EXPORT(int) move_panel (PANEL *, int, int);
extern NCURSES_EXPORT(int) replace_panel (PANEL *,WINDOW *);
extern NCURSES_EXPORT(int) panel_hidden (const PANEL *);
+#if NCURSES_SP_FUNCS
+extern NCURSES_EXPORT(PANEL *) ground_panel(SCREEN *);
+extern NCURSES_EXPORT(PANEL *) ceiling_panel(SCREEN *);
+
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
+#endif
+
#if defined(__cplusplus)
}
#endif
diff --git a/panel/panel.priv.h b/panel/panel.priv.h
index 4fb8144e1b77..ce4f98937fc9 100644
--- a/panel/panel.priv.h
+++ b/panel/panel.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2005,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 *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
-/* $Id: panel.priv.h,v 1.22 2008/09/27 22:36:11 tom Exp $ */
+/* $Id: panel.priv.h,v 1.23 2009/04/11 20:33:55 tom Exp $ */
#ifndef NCURSES_PANEL_PRIV_H
#define NCURSES_PANEL_PRIV_H 1
@@ -39,9 +39,11 @@
#include <string.h>
#include <assert.h>
-#include "curses.priv.h"
+struct screen; /* forward declaration */
+
+#include "curses.priv.h" /* includes nc_panel.h */
#include "panel.h"
-#include <nc_panel.h>
+
#if USE_RCS_IDS
# define MODULE_ID(id) static const char Ident[] = id;
@@ -83,14 +85,38 @@
# define Touchline(pan,start,count) touchline((pan)->win,start,count)
#endif
+#if NCURSES_SP_FUNCS
+#define GetScreenHook(sp) \
+ struct panelhook* ph = NCURSES_SP_NAME(_nc_panelhook)(sp)
+#define GetPanelHook(pan) \
+ GetScreenHook(_nc_screen_of((pan)->win))
+#define GetWindowHook(win) \
+ SCREEN* sp = _nc_screen_of(win); \
+ GetScreenHook(sp)
+#define GetHook(pan) SCREEN* sp = _nc_screen_of(pan->win); \
+ GetScreenHook(sp)
+
+#define _nc_stdscr_pseudo_panel ((ph)->stdscr_pseudo_panel)
+#define _nc_top_panel ((ph)->top_panel)
+#define _nc_bottom_panel ((ph)->bottom_panel)
+
+#else /* !NCURSES_SP_FUNCS */
+
+#define GetScreenHook(sp) /* nothing */
+#define GetPanelHook(pan) /* nothing */
+#define GetWindowHook(win) /* nothing */
+#define GetHook(pan) /* nothing */
+
#define _nc_stdscr_pseudo_panel _nc_panelhook()->stdscr_pseudo_panel
-#define _nc_top_panel _nc_panelhook()->top_panel
-#define _nc_bottom_panel _nc_panelhook()->bottom_panel
+#define _nc_top_panel _nc_panelhook()->top_panel
+#define _nc_bottom_panel _nc_panelhook()->bottom_panel
+
+#endif /* NCURSES_SP_FUNCS */
-#define EMPTY_STACK() (_nc_top_panel==_nc_bottom_panel)
-#define Is_Bottom(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above==(p)))
-#define Is_Top(p) (((p)!=(PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel==(p)))
-#define Is_Pseudo(p) ((p) && ((p)==_nc_bottom_panel))
+#define EMPTY_STACK() (_nc_top_panel == _nc_bottom_panel)
+#define Is_Bottom(p) (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_bottom_panel->above == (p)))
+#define Is_Top(p) (((p) != (PANEL*)0) && !EMPTY_STACK() && (_nc_top_panel == (p)))
+#define Is_Pseudo(p) (((p) != (PANEL*)0) && ((p) == _nc_bottom_panel))
/*+-------------------------------------------------------------------------
IS_LINKED(pan) - check to see if panel is in the stack
@@ -122,7 +148,7 @@
ix2 = (PENDX(pan1) < PENDX(pan2)) ? PENDX(pan1) : PENDX(pan2);\
iy1 = (PSTARTY(pan1) < PSTARTY(pan2)) ? PSTARTY(pan2) : PSTARTY(pan1);\
iy2 = (PENDY(pan1) < PENDY(pan2)) ? PENDY(pan1) : PENDY(pan2);\
- assert((ix1<=ix2) && (iy1<=iy2));\
+ assert((ix1<=ix2) && (iy1<=iy2))
/*+-------------------------------------------------------------------------
@@ -136,12 +162,12 @@
{ PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\
while(pan2) {\
if ((pan2 != pan) && PANELS_OVERLAPPED(pan,pan2)) {\
- int y,ix1,ix2,iy1,iy2;\
- COMPUTE_INTERSECTION(pan,pan2,ix1,ix2,iy1,iy2);\
+ int y, ix1, ix2, iy1, iy2;\
+ COMPUTE_INTERSECTION(pan, pan2, ix1, ix2, iy1, iy2);\
for(y = iy1; y <= iy2; y++) {\
if (is_linetouched(pan->win,y - PSTARTY(pan))) {\
struct ldat* line = &(pan2->win->_line[y - PSTARTY(pan2)]);\
- CHANGED_RANGE(line,ix1-PSTARTX(pan2),ix2-PSTARTX(pan2));\
+ CHANGED_RANGE(line, ix1 - PSTARTX(pan2), ix2 - PSTARTX(pan2));\
}\
}\
}\
@@ -180,4 +206,9 @@
err = err_if_unlinked;\
}
+#if NCURSES_SP_FUNCS
+/* These may become later renamed and part of panel.h and the public API */
+extern NCURSES_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*);
+#endif
+
#endif /* NCURSES_PANEL_PRIV_H */