aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/panel
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/panel')
-rw-r--r--contrib/ncurses/panel/Makefile.in23
-rw-r--r--contrib/ncurses/panel/llib-lpanel43
-rw-r--r--contrib/ncurses/panel/llib-lpanelw182
-rw-r--r--contrib/ncurses/panel/p_above.c15
-rw-r--r--contrib/ncurses/panel/p_below.c15
-rw-r--r--contrib/ncurses/panel/p_bottom.c48
-rw-r--r--contrib/ncurses/panel/p_delete.c15
-rw-r--r--contrib/ncurses/panel/p_hidden.c15
-rw-r--r--contrib/ncurses/panel/p_hide.c19
-rw-r--r--contrib/ncurses/panel/p_move.c24
-rw-r--r--contrib/ncurses/panel/p_new.c58
-rw-r--r--contrib/ncurses/panel/p_replace.c27
-rw-r--r--contrib/ncurses/panel/p_show.c30
-rw-r--r--contrib/ncurses/panel/p_top.c9
-rw-r--r--contrib/ncurses/panel/p_update.c13
-rw-r--r--contrib/ncurses/panel/p_user.c22
-rw-r--r--contrib/ncurses/panel/p_win.c13
-rw-r--r--contrib/ncurses/panel/panel.c89
-rw-r--r--contrib/ncurses/panel/panel.h4
-rw-r--r--contrib/ncurses/panel/panel.priv.h20
20 files changed, 474 insertions, 210 deletions
diff --git a/contrib/ncurses/panel/Makefile.in b/contrib/ncurses/panel/Makefile.in
index c3592526d548..b3174dfb8965 100644
--- a/contrib/ncurses/panel/Makefile.in
+++ b/contrib/ncurses/panel/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.41 2002/01/20 00:41:18 tom Exp $
+# $Id: Makefile.in,v 1.47 2006/10/14 20:40:36 tom Exp $
##############################################################################
-# Copyright (c) 1998,1999,2000,2001,2002 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2003,2006 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"), #
@@ -27,7 +27,7 @@
# authorization. #
##############################################################################
#
-# Author: Thomas E. Dickey <dickey@clark.net> 1996,1997
+# Author: Thomas E. Dickey 1996-2002
#
# Makefile for panels source code.
#
@@ -45,6 +45,9 @@
SHELL = /bin/sh
THIS = Makefile
+x = @EXEEXT@
+o = .@OBJEXT@
+
MODEL = @DFT_LWR_MODEL@
DESTDIR = @DESTDIR@
srcdir = @srcdir@
@@ -56,10 +59,15 @@ includedir = @includedir@
datadir = @datadir@
LIBTOOL = @LIBTOOL@
+LIBTOOL_CLEAN = @LIB_CLEAN@
+LIBTOOL_COMPILE = @LIB_COMPILE@
+LIBTOOL_LINK = @LIB_LINK@
+LIBTOOL_INSTALL = @LIB_INSTALL@
+LIBTOOL_UNINSTALL = @LIB_UNINSTALL@
INSTALL = @INSTALL@
INSTALL_LIB = @INSTALL@ @INSTALL_LIB@
-INSTALL_PROG = @INSTALL_PROG@
+INSTALL_PROG = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
@@ -72,8 +80,7 @@ CC = @CC@
CPP = @CPP@
CFLAGS = @CFLAGS@
-CPPFLAGS = @CPPFLAGS@ -I@top_srcdir@/ncurses \
- -DHAVE_CONFIG_H
+CPPFLAGS = -I@top_srcdir@/ncurses -DHAVE_CONFIG_H @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
@@ -85,7 +92,7 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
-LINK = $(LIBTOOL) $(CC)
+LINK = $(LIBTOOL_LINK) $(CC)
LDFLAGS = @LDFLAGS@ @LD_MODEL@ @LIBS@
SHLIB_DIRS = -L../lib
@@ -98,7 +105,7 @@ NCURSES_MINOR = @NCURSES_MINOR@
REL_VERSION = @cf_cv_rel_version@
ABI_VERSION = @cf_cv_abi_version@
-RANLIB = @RANLIB@
+RANLIB = @LIB_PREP@
IMPORT_LIB = @IMPORT_LIB@
SHARED_LIB = @SHARED_LIB@
diff --git a/contrib/ncurses/panel/llib-lpanel b/contrib/ncurses/panel/llib-lpanel
index 2ca1a3e31818..de49c234ecaa 100644
--- a/contrib/ncurses/panel/llib-lpanel
+++ b/contrib/ncurses/panel/llib-lpanel
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2002,2005 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,7 +27,7 @@
****************************************************************************/
/****************************************************************************
- * Author: Thomas E. Dickey <dickey@clark.net> 1997 *
+ * Author: Thomas E. Dickey 1997,2002,2005 *
****************************************************************************/
/* LINTLIBRARY */
@@ -35,6 +35,45 @@
#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 */
diff --git a/contrib/ncurses/panel/llib-lpanelw b/contrib/ncurses/panel/llib-lpanelw
new file mode 100644
index 000000000000..48bd1e0db5a7
--- /dev/null
+++ b/contrib/ncurses/panel/llib-lpanelw
@@ -0,0 +1,182 @@
+/****************************************************************************
+ * Copyright (c) 2002,2005 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 2002,2005 *
+ ****************************************************************************/
+/* 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 panel_above
+PANEL *panel_above(
+ const PANEL *pan)
+ { return(*(PANEL **)0); }
+
+/* ./p_below.c */
+
+#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
+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/contrib/ncurses/panel/p_above.c b/contrib/ncurses/panel/p_above.c
index 36e67d2b43df..32495f627f2d 100644
--- a/contrib/ncurses/panel/p_above.c
+++ b/contrib/ncurses/panel/p_above.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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 *
@@ -35,17 +35,18 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_above.c,v 1.4 2000/12/10 02:20:44 tom Exp $")
+MODULE_ID("$Id: p_above.c,v 1.6 2005/02/19 16:44:57 tom Exp $")
NCURSES_EXPORT(PANEL *)
-panel_above (const PANEL *pan)
+panel_above(const PANEL * pan)
{
- if(!pan)
+ T((T_CALLED("panel_above(%p)"), pan));
+ if (!pan)
{
/* if top and bottom are equal, we have no or only the pseudo panel;
- if not, we return the panel above the pseudo panel */
- return(EMPTY_STACK() ? (PANEL*)0 : _nc_bottom_panel->above);
+ if not, we return the panel above the pseudo panel */
+ returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above);
}
else
- return(pan->above);
+ returnPanel(pan->above);
}
diff --git a/contrib/ncurses/panel/p_below.c b/contrib/ncurses/panel/p_below.c
index 5420ff9eeb66..c4b241015f5b 100644
--- a/contrib/ncurses/panel/p_below.c
+++ b/contrib/ncurses/panel/p_below.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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 *
@@ -35,19 +35,20 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_below.c,v 1.4 2000/12/10 02:20:44 tom Exp $")
+MODULE_ID("$Id: p_below.c,v 1.6 2005/02/19 16:45:10 tom Exp $")
-NCURSES_EXPORT(PANEL*)
-panel_below (const PANEL *pan)
+NCURSES_EXPORT(PANEL *)
+panel_below(const PANEL * pan)
{
- if(!pan)
+ T((T_CALLED("panel_below(%p)"), pan));
+ if (!pan)
{
/* if top and bottom are equal, we have no or only the pseudo panel */
- return(EMPTY_STACK() ? (PANEL*)0 : _nc_top_panel);
+ returnPanel(EMPTY_STACK()? (PANEL *) 0 : _nc_top_panel);
}
else
{
/* we must not return the pseudo panel */
- return(Is_Pseudo(pan->below) ? (PANEL*) 0 : pan->below);
+ returnPanel(Is_Pseudo(pan->below) ? (PANEL *) 0 : pan->below);
}
}
diff --git a/contrib/ncurses/panel/p_bottom.c b/contrib/ncurses/panel/p_bottom.c
index 0928e77eb828..b861fd9b2ce7 100644
--- a/contrib/ncurses/panel/p_bottom.c
+++ b/contrib/ncurses/panel/p_bottom.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,35 +36,37 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_bottom.c,v 1.9 2001/02/24 23:46:33 tom Exp $")
+MODULE_ID("$Id: p_bottom.c,v 1.11 2005/02/19 16:38:16 tom Exp $")
NCURSES_EXPORT(int)
-bottom_panel (PANEL *pan)
+bottom_panel(PANEL * pan)
{
int err = OK;
- if (pan) {
+ T((T_CALLED("bottom_panel(%p)"), pan));
+ if (pan)
+ {
+ if (!Is_Bottom(pan))
+ {
- if(!Is_Bottom(pan)) {
-
- dBug(("--> bottom_panel %s", USER_PTR(pan->user)));
-
- HIDE_PANEL(pan,err,OK);
- assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
-
- dStack("<lb%d>",1,pan);
-
- pan->below = _nc_bottom_panel;
- pan->above = _nc_bottom_panel->above;
- if (pan->above)
- pan->above->below = pan;
- _nc_bottom_panel->above = pan;
-
- dStack("<lb%d>",9,pan);
+ dBug(("--> bottom_panel %s", USER_PTR(pan->user)));
+
+ HIDE_PANEL(pan, err, OK);
+ assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
+
+ dStack("<lb%d>", 1, pan);
+
+ pan->below = _nc_bottom_panel;
+ pan->above = _nc_bottom_panel->above;
+ if (pan->above)
+ pan->above->below = pan;
+ _nc_bottom_panel->above = pan;
+
+ dStack("<lb%d>", 9, pan);
+ }
}
- }
else
err = ERR;
-
- return(err);
+
+ returnCode(err);
}
diff --git a/contrib/ncurses/panel/p_delete.c b/contrib/ncurses/panel/p_delete.c
index 1d4670effc06..24ee26b4ff23 100644
--- a/contrib/ncurses/panel/p_delete.c
+++ b/contrib/ncurses/panel/p_delete.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,19 +36,22 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_delete.c,v 1.6 2001/02/24 23:46:41 tom Exp $")
+MODULE_ID("$Id: p_delete.c,v 1.8 2005/02/19 16:38:45 tom Exp $")
NCURSES_EXPORT(int)
-del_panel (PANEL *pan)
+del_panel(PANEL * pan)
{
int err = OK;
- if(pan)
+
+ T((T_CALLED("del_panel(%p)"), pan));
+ if (pan)
{
dBug(("--> del_panel %s", USER_PTR(pan->user)));
- HIDE_PANEL(pan,err,OK);
+ HIDE_PANEL(pan, err, OK);
free((void *)pan);
}
else
err = ERR;
- return(err);
+
+ returnCode(err);
}
diff --git a/contrib/ncurses/panel/p_hidden.c b/contrib/ncurses/panel/p_hidden.c
index d5d13f37a5ef..624c07dae0ba 100644
--- a/contrib/ncurses/panel/p_hidden.c
+++ b/contrib/ncurses/panel/p_hidden.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,13 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hidden.c,v 1.5 2000/12/10 02:20:44 tom Exp $")
+MODULE_ID("$Id: p_hidden.c,v 1.7 2005/02/19 16:39:17 tom Exp $")
NCURSES_EXPORT(int)
-panel_hidden (const PANEL *pan)
+panel_hidden(const PANEL * pan)
{
- if(!pan)
- return(ERR);
- return(IS_LINKED(pan) ? FALSE : TRUE);
-}
+ T((T_CALLED("panel_hidden(%p)"), pan));
+ if (!pan)
+ returnCode(ERR);
+ returnCode(IS_LINKED(pan) ? FALSE : TRUE);
+}
diff --git a/contrib/ncurses/panel/p_hide.c b/contrib/ncurses/panel/p_hide.c
index 755997374136..08d8853a201c 100644
--- a/contrib/ncurses/panel/p_hide.c
+++ b/contrib/ncurses/panel/p_hide.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,22 +36,23 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hide.c,v 1.7 2001/02/24 23:46:45 tom Exp $")
+MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $")
NCURSES_EXPORT(int)
-hide_panel (register PANEL *pan)
+hide_panel(register PANEL * pan)
{
int err = OK;
- if(!pan)
- return(ERR);
+ T((T_CALLED("hide_panel(%p)"), pan));
+ if (!pan)
+ returnCode(ERR);
dBug(("--> hide_panel %s", USER_PTR(pan->user)));
- dStack("<u%d>",1,pan);
+ dStack("<u%d>", 1, pan);
- HIDE_PANEL(pan,err,ERR);
+ HIDE_PANEL(pan, err, ERR);
- dStack("<u%d>",9,pan);
+ dStack("<u%d>", 9, pan);
- return(err);
+ returnCode(err);
}
diff --git a/contrib/ncurses/panel/p_move.c b/contrib/ncurses/panel/p_move.c
index d7dbd2eafc3f..3818e8cba860 100644
--- a/contrib/ncurses/panel/p_move.c
+++ b/contrib/ncurses/panel/p_move.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,21 +36,21 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_move.c,v 1.7 2001/02/24 23:41:35 tom Exp $")
+MODULE_ID("$Id: p_move.c,v 1.9 2005/02/19 16:46:49 tom Exp $")
NCURSES_EXPORT(int)
-move_panel (PANEL *pan, int starty, int startx)
+move_panel(PANEL * pan, int starty, int startx)
{
- if(!pan)
- return(ERR);
+ T((T_CALLED("move_panel(%p,%d,%d)"), pan, starty, startx));
- if (IS_LINKED(pan)) {
- Touchpan(pan);
- PANEL_UPDATE(pan,(PANEL*)0);
- }
+ if (!pan)
+ returnCode(ERR);
- if (mvwin(pan->win,starty,startx))
- return(ERR);
+ if (IS_LINKED(pan))
+ {
+ Touchpan(pan);
+ PANEL_UPDATE(pan, (PANEL *) 0);
+ }
- return(OK);
+ returnCode(mvwin(pan->win, starty, startx));
}
diff --git a/contrib/ncurses/panel/p_new.c b/contrib/ncurses/panel/p_new.c
index 3dfd80691704..3e48e3696735 100644
--- a/contrib/ncurses/panel/p_new.c
+++ b/contrib/ncurses/panel/p_new.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,61 +36,65 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_new.c,v 1.6 2000/12/10 02:20:44 tom Exp $")
+MODULE_ID("$Id: p_new.c,v 1.8 2005/02/19 16:41:03 tom Exp $")
#ifdef TRACE
-static char* stdscr_id;
-static char* new_id;
+static char *stdscr_id;
+static char *new_id;
#endif
/*+-------------------------------------------------------------------------
Get root (i.e. stdscr's) panel.
Establish the pseudo panel for stdscr if necessary.
--------------------------------------------------------------------------*/
-static PANEL*
+static PANEL *
root_panel(void)
{
- if(_nc_stdscr_pseudo_panel == (PANEL*)0)
+ if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
{
-
+
assert(stdscr && !_nc_bottom_panel && !_nc_top_panel);
- _nc_stdscr_pseudo_panel = (PANEL*)malloc(sizeof(PANEL));
- if (_nc_stdscr_pseudo_panel != 0) {
- PANEL* pan = _nc_stdscr_pseudo_panel;
- WINDOW* win = stdscr;
- pan->win = win;
- pan->below = (PANEL*)0;
- pan->above = (PANEL*)0;
+ _nc_stdscr_pseudo_panel = (PANEL *) malloc(sizeof(PANEL));
+ if (_nc_stdscr_pseudo_panel != 0)
+ {
+ PANEL *pan = _nc_stdscr_pseudo_panel;
+ WINDOW *win = stdscr;
+
+ pan->win = win;
+ pan->below = (PANEL *) 0;
+ pan->above = (PANEL *) 0;
#ifdef TRACE
- if (!stdscr_id)
- stdscr_id = strdup("stdscr");
- pan->user = stdscr_id;
+ if (!stdscr_id)
+ stdscr_id = strdup("stdscr");
+ pan->user = stdscr_id;
#else
- pan->user = (void*)0;
+ pan->user = (void *)0;
#endif
- _nc_bottom_panel = _nc_top_panel = pan;
- }
+ _nc_bottom_panel = _nc_top_panel = pan;
+ }
}
return _nc_stdscr_pseudo_panel;
}
NCURSES_EXPORT(PANEL *)
-new_panel (WINDOW *win)
+new_panel(WINDOW *win)
{
- PANEL *pan = (PANEL*)0;
+ PANEL *pan = (PANEL *) 0;
+
+ T((T_CALLED("new_panel(%p)"), win));
if (!win)
- return(pan);
+ returnPanel(pan);
if (!_nc_stdscr_pseudo_panel)
(void)root_panel();
assert(_nc_stdscr_pseudo_panel);
- if (!(win->_flags & _ISPAD) && (pan = (PANEL*)malloc(sizeof(PANEL))))
+ if (!(win->_flags & _ISPAD) && (pan = (PANEL *) malloc(sizeof(PANEL))))
{
pan->win = win;
- pan->above = (PANEL *)0;
- pan->below = (PANEL *)0;
+ pan->above = (PANEL *) 0;
+ pan->below = (PANEL *) 0;
#ifdef TRACE
if (!new_id)
new_id = strdup("new");
@@ -100,5 +104,5 @@ new_panel (WINDOW *win)
#endif
(void)show_panel(pan);
}
- return(pan);
+ returnPanel(pan);
}
diff --git a/contrib/ncurses/panel/p_replace.c b/contrib/ncurses/panel/p_replace.c
index a3b88cbfa88e..5d0d295c8b17 100644
--- a/contrib/ncurses/panel/p_replace.c
+++ b/contrib/ncurses/panel/p_replace.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,20 +36,23 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_replace.c,v 1.7 2001/02/24 23:41:38 tom Exp $")
+MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $")
NCURSES_EXPORT(int)
-replace_panel (PANEL *pan, WINDOW *win)
+replace_panel(PANEL * pan, WINDOW *win)
{
- if(!pan)
- return(ERR);
-
- if (IS_LINKED(pan)) {
- Touchpan(pan);
- PANEL_UPDATE(pan,(PANEL*)0);
- }
-
+ T((T_CALLED("replace_panel(%p,%p)"), pan, win));
+
+ if (!pan)
+ returnCode(ERR);
+
+ if (IS_LINKED(pan))
+ {
+ Touchpan(pan);
+ PANEL_UPDATE(pan, (PANEL *) 0);
+ }
+
pan->win = win;
- return(OK);
+ returnCode(OK);
}
diff --git a/contrib/ncurses/panel/p_show.c b/contrib/ncurses/panel/p_show.c
index 0e1968fdea58..35eee237b958 100644
--- a/contrib/ncurses/panel/p_show.c
+++ b/contrib/ncurses/panel/p_show.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,32 +36,34 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_show.c,v 1.9 2001/02/24 23:46:50 tom Exp $")
+MODULE_ID("$Id: p_show.c,v 1.11 2005/02/19 16:42:02 tom Exp $")
NCURSES_EXPORT(int)
-show_panel (PANEL *pan)
-{
+show_panel(PANEL * pan)
+{
int err = OK;
- if(!pan)
- return(ERR);
+ T((T_CALLED("show_panel(%p)"), pan));
+
+ if (!pan)
+ returnCode(ERR);
if (Is_Top(pan))
- return(OK);
+ returnCode(OK);
dBug(("--> show_panel %s", USER_PTR(pan->user)));
- HIDE_PANEL(pan,err,OK);
+ HIDE_PANEL(pan, err, OK);
- dStack("<lt%d>",1,pan);
+ 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;
+ pan->below = _nc_top_panel;
+ pan->above = (PANEL *) 0;
_nc_top_panel = pan;
-
- dStack("<lt%d>",9,pan);
- return(OK);
+ dStack("<lt%d>", 9, pan);
+
+ returnCode(OK);
}
diff --git a/contrib/ncurses/panel/p_top.c b/contrib/ncurses/panel/p_top.c
index aa7d9d420e5e..8bd1d9fb3fec 100644
--- a/contrib/ncurses/panel/p_top.c
+++ b/contrib/ncurses/panel/p_top.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,10 +36,11 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_top.c,v 1.3 2000/12/10 02:20:44 tom Exp $")
+MODULE_ID("$Id: p_top.c,v 1.5 2005/02/19 16:42:23 tom Exp $")
NCURSES_EXPORT(int)
-top_panel (PANEL *pan)
+top_panel(PANEL * pan)
{
- return(show_panel(pan));
+ T((T_CALLED("top_panel(%p)"), pan));
+ returnCode(show_panel(pan));
}
diff --git a/contrib/ncurses/panel/p_update.c b/contrib/ncurses/panel/p_update.c
index 1a03739d14af..5967718160ff 100644
--- a/contrib/ncurses/panel/p_update.c
+++ b/contrib/ncurses/panel/p_update.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,18 +36,19 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_update.c,v 1.7 2001/02/24 23:41:42 tom Exp $")
+MODULE_ID("$Id: p_update.c,v 1.9 2005/02/19 16:49:47 tom Exp $")
NCURSES_EXPORT(void)
-update_panels (void)
+update_panels(void)
{
PANEL *pan;
+ T((T_CALLED("update_panels()")));
dBug(("--> update_panels"));
pan = _nc_bottom_panel;
- while(pan && pan->above)
+ while (pan && pan->above)
{
- PANEL_UPDATE(pan,pan->above);
+ PANEL_UPDATE(pan, pan->above);
pan = pan->above;
}
@@ -57,4 +58,6 @@ update_panels (void)
Wnoutrefresh(pan);
pan = pan->above;
}
+
+ returnVoid;
}
diff --git a/contrib/ncurses/panel/p_user.c b/contrib/ncurses/panel/p_user.c
index de1ec7dd84c2..ffa25f85ae12 100644
--- a/contrib/ncurses/panel/p_user.c
+++ b/contrib/ncurses/panel/p_user.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,21 +36,21 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_user.c,v 1.4 2000/12/10 02:20:44 tom Exp $")
+MODULE_ID("$Id: p_user.c,v 1.6 2005/02/19 16:52:44 tom Exp $")
NCURSES_EXPORT(int)
-set_panel_userptr
-(PANEL *pan, NCURSES_CONST void *uptr)
+set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
{
- if(!pan)
- return(ERR);
+ T((T_CALLED("set_panel_userptr(%p,%p)"), pan, uptr));
+ if (!pan)
+ returnCode(ERR);
pan->user = uptr;
- return(OK);
+ returnCode(OK);
}
-NCURSES_EXPORT(NCURSES_CONST void*)
-panel_userptr (const PANEL *pan)
+NCURSES_EXPORT(NCURSES_CONST void *)
+panel_userptr(const PANEL * pan)
{
- return(pan ? pan->user : (NCURSES_CONST void *)0);
+ T((T_CALLED("panel_userptr(%p)"), pan));
+ returnCVoidPtr(pan ? pan->user : (NCURSES_CONST void *)0);
}
-
diff --git a/contrib/ncurses/panel/p_win.c b/contrib/ncurses/panel/p_win.c
index 2b9f5b0c8297..e7d2cea8e3fe 100644
--- a/contrib/ncurses/panel/p_win.c
+++ b/contrib/ncurses/panel/p_win.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2000,2005 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,14 +36,11 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_win.c,v 1.3 2000/12/10 02:20:43 tom Exp $")
+MODULE_ID("$Id: p_win.c,v 1.5 2005/02/19 16:44:16 tom Exp $")
NCURSES_EXPORT(WINDOW *)
-panel_window (const PANEL *pan)
+panel_window(const PANEL * pan)
{
- return(pan ? pan->win : (WINDOW *)0);
+ T((T_CALLED("panel_window(%p)"), pan));
+ returnWin(pan ? pan->win : (WINDOW *)0);
}
-
-
-
-
diff --git a/contrib/ncurses/panel/panel.c b/contrib/ncurses/panel/panel.c
index a56d57ef5ea8..16a8083d64b2 100644
--- a/contrib/ncurses/panel/panel.c
+++ b/contrib/ncurses/panel/panel.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2004,2005 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 *
@@ -34,37 +34,51 @@
/* panel.c -- implementation of panels library, some core routines */
#include "panel.priv.h"
-MODULE_ID("$Id: panel.c,v 1.20 2001/02/24 23:17:26 tom Exp $")
+MODULE_ID("$Id: panel.c,v 1.23 2005/02/19 18:04:31 tom Exp $")
+/*+-------------------------------------------------------------------------
+ _nc_retrace_panel (pan)
+--------------------------------------------------------------------------*/
+#ifdef TRACE
+NCURSES_EXPORT(PANEL *)
+_nc_retrace_panel(PANEL * pan)
+{
+ T((T_RETURN("%p"), pan));
+ return pan;
+}
+#endif
+
+/*+-------------------------------------------------------------------------
+ _nc_my_visbuf(ptr)
+--------------------------------------------------------------------------*/
#ifdef TRACE
#ifndef TRACE_TXT
NCURSES_EXPORT(const char *)
-_nc_my_visbuf (const void *ptr)
+_nc_my_visbuf(const void *ptr)
{
- char temp[32];
- if (ptr != 0)
- sprintf(temp, "ptr:%p", ptr);
- else
- strcpy(temp, "<null>");
- return _nc_visbuf(temp);
+ char temp[32];
+
+ if (ptr != 0)
+ sprintf(temp, "ptr:%p", ptr);
+ else
+ strcpy(temp, "<null>");
+ return _nc_visbuf(temp);
}
#endif
#endif
-
/*+-------------------------------------------------------------------------
dPanel(text,pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
NCURSES_EXPORT(void)
-_nc_dPanel
-(const char *text, const PANEL *pan)
+_nc_dPanel(const char *text, const PANEL * pan)
{
- _tracef("%s id=%s b=%s a=%s y=%d x=%d",
- text, USER_PTR(pan->user),
- (pan->below) ? USER_PTR(pan->below->user) : "--",
- (pan->above) ? USER_PTR(pan->above->user) : "--",
- PSTARTY(pan), PSTARTX(pan));
+ _tracef("%s id=%s b=%s a=%s y=%d x=%d",
+ text, USER_PTR(pan->user),
+ (pan->below) ? USER_PTR(pan->below->user) : "--",
+ (pan->above) ? USER_PTR(pan->above->user) : "--",
+ PSTARTY(pan), PSTARTX(pan));
}
#endif
@@ -73,21 +87,20 @@ _nc_dPanel
--------------------------------------------------------------------------*/
#ifdef TRACE
NCURSES_EXPORT(void)
-_nc_dStack
-(const char *fmt, int num, const PANEL *pan)
+_nc_dStack(const char *fmt, int num, const PANEL * pan)
{
char s80[80];
- sprintf(s80,fmt,num,pan);
- _tracef("%s b=%s t=%s",s80,
- (_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--",
- (_nc_top_panel) ? USER_PTR(_nc_top_panel->user) : "--");
- if(pan)
+ sprintf(s80, fmt, num, pan);
+ _tracef("%s b=%s t=%s", s80,
+ (_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user) : "--",
+ (_nc_top_panel) ? USER_PTR(_nc_top_panel->user) : "--");
+ if (pan)
_tracef("pan id=%s", USER_PTR(pan->user));
pan = _nc_bottom_panel;
- while(pan)
+ while (pan)
{
- dPanel("stk",pan);
+ dPanel("stk", pan);
pan = pan->above;
}
}
@@ -98,9 +111,9 @@ _nc_dStack
--------------------------------------------------------------------------*/
#ifdef TRACE
NCURSES_EXPORT(void)
-_nc_Wnoutrefresh (const PANEL *pan)
+_nc_Wnoutrefresh(const PANEL * pan)
{
- dPanel("wnoutrefresh",pan);
+ dPanel("wnoutrefresh", pan);
wnoutrefresh(pan->win);
}
#endif
@@ -110,9 +123,9 @@ _nc_Wnoutrefresh (const PANEL *pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
NCURSES_EXPORT(void)
-_nc_Touchpan (const PANEL *pan)
+_nc_Touchpan(const PANEL * pan)
{
- dPanel("Touchpan",pan);
+ dPanel("Touchpan", pan);
touchwin(pan->win);
}
#endif
@@ -122,19 +135,23 @@ _nc_Touchpan (const PANEL *pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
NCURSES_EXPORT(void)
-_nc_Touchline
-(const PANEL *pan, int start, int count)
+_nc_Touchline(const PANEL * pan, int start, int count)
{
char s80[80];
- sprintf(s80,"Touchline s=%d c=%d",start,count);
- dPanel(s80,pan);
- touchline(pan->win,start,count);
+
+ sprintf(s80, "Touchline s=%d c=%d", start, count);
+ dPanel(s80, pan);
+ touchline(pan->win, start, count);
}
#endif
#ifndef TRACE
# ifndef __GNUC__
/* Some C compilers need something defined in a source file */
- void _nc_dummy_panel(void) { }
+extern void _nc_dummy_panel(void);
+void
+_nc_dummy_panel(void)
+{
+}
# endif
#endif
diff --git a/contrib/ncurses/panel/panel.h b/contrib/ncurses/panel/panel.h
index 3b8542a7adce..1e02091d97f2 100644
--- a/contrib/ncurses/panel/panel.h
+++ b/contrib/ncurses/panel/panel.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2001,2006 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 *
@@ -31,6 +31,8 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
+/* $Id: panel.h,v 1.10 2006/05/27 19:49:40 tom Exp $ */
+
/* panel.h -- interface file for panels library */
#ifndef NCURSES_PANEL_H_incl
diff --git a/contrib/ncurses/panel/panel.priv.h b/contrib/ncurses/panel/panel.priv.h
index 7097d8423cf5..98d741ff6ef0 100644
--- a/contrib/ncurses/panel/panel.priv.h
+++ b/contrib/ncurses/panel/panel.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2001,2005 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.19 2001/06/02 23:31:05 tom Exp $ */
+/* $Id: panel.priv.h,v 1.21 2005/11/26 15:27:00 tom Exp $ */
#ifndef NCURSES_PANEL_PRIV_H
#define NCURSES_PANEL_PRIV_H 1
@@ -51,12 +51,6 @@
#include "panel.h"
#include <nc_panel.h>
-#if ( CC_HAS_INLINE_FUNCS && !defined(TRACE) )
-# define INLINE inline
-#else
-# define INLINE
-#endif
-
#if USE_RCS_IDS
# define MODULE_ID(id) static const char Ident[] = id;
#else
@@ -72,6 +66,9 @@
# define USER_PTR(ptr) _nc_my_visbuf((const char *)ptr)
# endif
+# define returnPanel(code) TRACE_RETURN(code,panel)
+
+ extern NCURSES_EXPORT(PANEL *) _nc_retrace_panel (PANEL *);
extern NCURSES_EXPORT(void) _nc_dPanel (const char*, const PANEL*);
extern NCURSES_EXPORT(void) _nc_dStack (const char*, int, const PANEL*);
extern NCURSES_EXPORT(void) _nc_Wnoutrefresh (const PANEL*);
@@ -85,6 +82,7 @@
# define Touchpan(pan) _nc_Touchpan(pan)
# define Touchline(pan,start,count) _nc_Touchline(pan,start,count)
#else /* !TRACE */
+# define returnPanel(code) return code
# define dBug(x)
# define dPanel(text,pan)
# define dStack(fmt,num,pan)
@@ -98,7 +96,7 @@
#define _nc_bottom_panel _nc_panelhook()->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_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))
@@ -138,9 +136,9 @@
/*+-------------------------------------------------------------------------
Walk through the panel stack starting at the given location and
check for intersections; overlapping panels are "touched", so they
- are incrementally overwriting cells that should be hidden.
+ are incrementally overwriting cells that should be hidden.
If the "touch" flag is set, the panel gets touched before it is
- updated.
+ updated.
---------------------------------------------------------------------------*/
#define PANEL_UPDATE(pan,panstart)\
{ PANEL* pan2 = ((panstart) ? (panstart) : _nc_bottom_panel);\