aboutsummaryrefslogtreecommitdiff
path: root/panel
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2021-02-25 17:22:00 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2021-02-25 17:22:00 +0000
commitbf0ab54638a5ef969749f6ceae30e864f9556ea8 (patch)
tree11690c2184e55d37bcd3c7fd13f3d0d9d20dbcb0 /panel
parent72c3fc31f590566e93496732d6fa769cd353e270 (diff)
downloadsrc-vendor/ncurses.tar.gz
src-vendor/ncurses.zip
Vendor import ncurses 6.2-20210220vendor/ncurses/6.2-20210220vendor/ncurses
Diffstat (limited to 'panel')
-rw-r--r--panel/Makefile.in28
-rw-r--r--panel/llib-lpanel3
-rw-r--r--panel/llib-lpanelt3
-rw-r--r--panel/llib-lpaneltw3
-rw-r--r--panel/llib-lpanelw3
-rw-r--r--panel/p_above.c6
-rw-r--r--panel/p_below.c6
-rw-r--r--panel/p_bottom.c6
-rw-r--r--panel/p_delete.c17
-rw-r--r--panel/p_hidden.c4
-rw-r--r--panel/p_hide.c6
-rw-r--r--panel/p_move.c4
-rw-r--r--panel/p_new.c54
-rw-r--r--panel/p_replace.c4
-rw-r--r--panel/p_show.c6
-rw-r--r--panel/p_top.c4
-rw-r--r--panel/p_update.c6
-rw-r--r--panel/p_user.c6
-rw-r--r--panel/p_win.c4
-rw-r--r--panel/panel.c34
-rw-r--r--panel/panel.h49
-rw-r--r--panel/panel.priv.h22
22 files changed, 157 insertions, 121 deletions
diff --git a/panel/Makefile.in b/panel/Makefile.in
index 5f7b5b9290e6..cbd978809dcb 100644
--- a/panel/Makefile.in
+++ b/panel/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.71 2020/02/02 23:34:34 tom Exp $
+# $Id: Makefile.in,v 1.75 2020/08/29 14:50:45 tom Exp $
##############################################################################
# Copyright 2020 Thomas E. Dickey #
# Copyright 1998-2015,2018 Free Software Foundation, Inc. #
@@ -92,16 +92,18 @@ ETAGS = @ETAGS@
CC = @CC@
CPP = @CPP@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ @EXTRA_CFLAGS@
-CPPFLAGS = -I${top_srcdir}/ncurses -DHAVE_CONFIG_H @CPPFLAGS@
+INCDIR = $(top_srcdir)/include
+BASE_DIR = $(top_srcdir)/ncurses
+CPPFLAGS = -I$(BASE_DIR) -DHAVE_CONFIG_H -DBUILDING_PANEL @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
CFLAGS_LIBTOOL = $(CCFLAGS)
-CFLAGS_NORMAL = $(CCFLAGS)
-CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
-CFLAGS_PROFILE = $(CCFLAGS) -pg
+CFLAGS_NORMAL = $(CCFLAGS) -DNCURSES_STATIC
+CFLAGS_DEBUG = $(CCFLAGS) -DNCURSES_STATIC @CC_G_OPT@ -DTRACE
+CFLAGS_PROFILE = $(CCFLAGS) -DNCURSES_STATIC -pg
CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
@@ -151,6 +153,20 @@ $(DESTDIR)$(libdir) :
cp $(srcdir)/panel.h $@
HEADER_DEPS = \
+ ../include/curses.h \
+ ../include/ncurses_cfg.h \
+ ../include/ncurses_def.h \
+ ../include/ncurses_dll.h \
+ ../include/term.h \
+ ../include/unctrl.h \
+ $(BASE_DIR)/curses.priv.h \
+ $(BASE_DIR)/new_pair.h \
+ $(INCDIR)/nc_alloc.h \
+ $(INCDIR)/nc_panel.h \
+ $(INCDIR)/nc_string.h \
+ $(INCDIR)/nc_termios.h \
+ $(INCDIR)/nc_tparm.h \
+ $(INCDIR)/term_entry.h \
$(srcdir)/panel.priv.h \
$(srcdir)/panel.h
diff --git a/panel/llib-lpanel b/panel/llib-lpanel
index a3cf6f08e49a..6f797f5d970f 100644
--- a/panel/llib-lpanel
+++ b/panel/llib-lpanel
@@ -43,7 +43,8 @@ PANEL *_nc_retrace_panel(
#undef _nc_my_visbuf
const char *_nc_my_visbuf(
- const void *ptr)
+ const void *ptr,
+ int n)
{ return(*(const char **)0); }
#undef _nc_dPanel
diff --git a/panel/llib-lpanelt b/panel/llib-lpanelt
index 331e87a00c93..713a0753aa3c 100644
--- a/panel/llib-lpanelt
+++ b/panel/llib-lpanelt
@@ -43,7 +43,8 @@ PANEL *_nc_retrace_panel(
#undef _nc_my_visbuf
const char *_nc_my_visbuf(
- const void *ptr)
+ const void *ptr,
+ int n)
{ return(*(const char **)0); }
#undef _nc_dPanel
diff --git a/panel/llib-lpaneltw b/panel/llib-lpaneltw
index 331e87a00c93..713a0753aa3c 100644
--- a/panel/llib-lpaneltw
+++ b/panel/llib-lpaneltw
@@ -43,7 +43,8 @@ PANEL *_nc_retrace_panel(
#undef _nc_my_visbuf
const char *_nc_my_visbuf(
- const void *ptr)
+ const void *ptr,
+ int n)
{ return(*(const char **)0); }
#undef _nc_dPanel
diff --git a/panel/llib-lpanelw b/panel/llib-lpanelw
index 463a02ec0013..bd6e90d2a2c2 100644
--- a/panel/llib-lpanelw
+++ b/panel/llib-lpanelw
@@ -43,7 +43,8 @@ PANEL *_nc_retrace_panel(
#undef _nc_my_visbuf
const char *_nc_my_visbuf(
- const void *ptr)
+ const void *ptr,
+ int n)
{ return(*(const char **)0); }
#undef _nc_dPanel
diff --git a/panel/p_above.c b/panel/p_above.c
index 12b5b87bd4e1..2a6fde55cdc8 100644
--- a/panel/p_above.c
+++ b/panel/p_above.c
@@ -37,10 +37,10 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_above.c,v 1.10 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_above.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $")
#if NCURSES_SP_FUNCS
-NCURSES_EXPORT(PANEL *)
+PANEL_EXPORT(PANEL *)
ground_panel(SCREEN * sp)
{
T((T_CALLED("ground_panel(%p)"), (void *)sp));
@@ -63,7 +63,7 @@ ground_panel(SCREEN * sp)
}
#endif
-NCURSES_EXPORT(PANEL *)
+PANEL_EXPORT(PANEL *)
panel_above(const PANEL * pan)
{
PANEL *result;
diff --git a/panel/p_below.c b/panel/p_below.c
index a8b1ef478298..100393d53a72 100644
--- a/panel/p_below.c
+++ b/panel/p_below.c
@@ -37,10 +37,10 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_below.c,v 1.10 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_below.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $")
#if NCURSES_SP_FUNCS
-NCURSES_EXPORT(PANEL *)
+PANEL_EXPORT(PANEL *)
ceiling_panel(SCREEN * sp)
{
T((T_CALLED("ceiling_panel(%p)"), (void *)sp));
@@ -61,7 +61,7 @@ ceiling_panel(SCREEN * sp)
}
#endif
-NCURSES_EXPORT(PANEL *)
+PANEL_EXPORT(PANEL *)
panel_below(const PANEL * pan)
{
PANEL *result;
diff --git a/panel/p_bottom.c b/panel/p_bottom.c
index a69ac9f4c82c..0e5b090aa694 100644
--- a/panel/p_bottom.c
+++ b/panel/p_bottom.c
@@ -38,9 +38,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_bottom.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_bottom.c,v 1.16 2020/09/26 18:02:35 tom Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
bottom_panel(PANEL * pan)
{
int err = OK;
@@ -52,7 +52,7 @@ bottom_panel(PANEL * pan)
if (!Is_Bottom(pan))
{
- dBug(("--> bottom_panel %s", USER_PTR(pan->user)));
+ dBug(("--> bottom_panel %s", USER_PTR(pan->user, 1)));
HIDE_PANEL(pan, err, OK);
assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
diff --git a/panel/p_delete.c b/panel/p_delete.c
index 6b122a6c9b92..da3dcdf97a98 100644
--- a/panel/p_delete.c
+++ b/panel/p_delete.c
@@ -38,22 +38,21 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_delete.c,v 1.11 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_delete.c,v 1.17 2020/12/26 18:25:34 tom Exp $")
-NCURSES_EXPORT(int)
-del_panel(PANEL * pan)
+PANEL_EXPORT(int)
+del_panel(PANEL *pan)
{
int err = OK;
T((T_CALLED("del_panel(%p)"), (void *)pan));
if (pan)
{
- dBug(("--> del_panel %s", USER_PTR(pan->user)));
- {
- GetHook(pan);
- HIDE_PANEL(pan, err, OK);
- free((void *)pan);
- }
+ GetHook(pan);
+ HIDE_PANEL(pan, err, OK);
+ dBug(("...discard ptr=%s", USER_PTR(pan->user, 1)));
+ dBug(("...deleted pan=%p", (void *)pan));
+ free((void *)pan);
}
else
err = ERR;
diff --git a/panel/p_hidden.c b/panel/p_hidden.c
index ddb23b13412a..43057fa5999d 100644
--- a/panel/p_hidden.c
+++ b/panel/p_hidden.c
@@ -38,9 +38,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hidden.c,v 1.10 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_hidden.c,v 1.11 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
panel_hidden(const PANEL * pan)
{
int rc = ERR;
diff --git a/panel/p_hide.c b/panel/p_hide.c
index fc26f752fe14..6a372ace4bcf 100644
--- a/panel/p_hide.c
+++ b/panel/p_hide.c
@@ -37,9 +37,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hide.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_hide.c,v 1.14 2020/09/26 18:02:35 tom Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
hide_panel(register PANEL * pan)
{
int err = ERR;
@@ -50,7 +50,7 @@ hide_panel(register PANEL * pan)
{
GetHook(pan);
- dBug(("--> hide_panel %s", USER_PTR(pan->user)));
+ dBug(("--> hide_panel %s", USER_PTR(pan->user, 1)));
dStack("<u%d>", 1, pan);
HIDE_PANEL(pan, err, ERR);
diff --git a/panel/p_move.c b/panel/p_move.c
index 02830bf5a413..7ff6fa7e8179 100644
--- a/panel/p_move.c
+++ b/panel/p_move.c
@@ -38,9 +38,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_move.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_move.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
move_panel(PANEL * pan, int starty, int startx)
{
int rc = ERR;
diff --git a/panel/p_new.c b/panel/p_new.c
index d2f8d03692b3..a7c5a4e2db21 100644
--- a/panel/p_new.c
+++ b/panel/p_new.c
@@ -39,11 +39,29 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_new.c,v 1.17 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_new.c,v 1.22 2020/12/26 18:25:48 tom Exp $")
#ifdef TRACE
static char *stdscr_id;
static char *new_id;
+
+static PANEL *
+AllocPanel(const char *name)
+{
+ PANEL *result = typeMalloc(PANEL, 1);
+
+ _tracef("create :%s %p", name, (void *)result);
+ return result;
+}
+#define InitUser(name) \
+ if (!name ## _id) \
+ name ## _id = strdup(#name); \
+ pan->user = name ## _id; \
+ _tracef("create :user_ptr %p", pan->user)
+#else
+#define AllocPanel(name) typeMalloc(PANEL, 1)
+#define InitUser(name) \
+ pan->user = (void *)0
#endif
/*+-------------------------------------------------------------------------
@@ -60,39 +78,33 @@ root_panel(NCURSES_SP_DCL0)
struct panelhook *ph = _nc_panelhook();
#endif
- if (_nc_stdscr_pseudo_panel == (PANEL *) 0)
+ if (_nc_stdscr_pseudo_panel == (PANEL *)0)
{
assert(SP_PARM && SP_PARM->_stdscr && !_nc_bottom_panel && !_nc_top_panel);
#if NO_LEAKS
ph->destroy = del_panel;
#endif
- _nc_stdscr_pseudo_panel = typeMalloc(PANEL, 1);
+ _nc_stdscr_pseudo_panel = AllocPanel("root_panel");
if (_nc_stdscr_pseudo_panel != 0)
{
PANEL *pan = _nc_stdscr_pseudo_panel;
WINDOW *win = SP_PARM->_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;
-#else
- pan->user = (void *)0;
-#endif
+ pan->below = (PANEL *)0;
+ pan->above = (PANEL *)0;
+ InitUser(stdscr);
_nc_bottom_panel = _nc_top_panel = pan;
}
}
return _nc_stdscr_pseudo_panel;
}
-NCURSES_EXPORT(PANEL *)
+PANEL_EXPORT(PANEL *)
new_panel(WINDOW *win)
{
- PANEL *pan = (PANEL *) 0;
+ PANEL *pan = (PANEL *)0;
GetWindowHook(win);
@@ -105,18 +117,12 @@ new_panel(WINDOW *win)
(void)root_panel(NCURSES_SP_ARG);
assert(_nc_stdscr_pseudo_panel);
- if (!(win->_flags & _ISPAD) && (pan = typeMalloc(PANEL, 1)))
+ if (!(win->_flags & _ISPAD) && (pan = AllocPanel("new_panel")))
{
pan->win = win;
- pan->above = (PANEL *) 0;
- pan->below = (PANEL *) 0;
-#ifdef TRACE
- if (!new_id)
- new_id = strdup("new");
- pan->user = new_id;
-#else
- pan->user = (char *)0;
-#endif
+ pan->above = (PANEL *)0;
+ pan->below = (PANEL *)0;
+ InitUser(new);
(void)show_panel(pan);
}
returnPanel(pan);
diff --git a/panel/p_replace.c b/panel/p_replace.c
index 5acbccf8406d..a2d56ae6316b 100644
--- a/panel/p_replace.c
+++ b/panel/p_replace.c
@@ -37,9 +37,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_replace.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_replace.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
replace_panel(PANEL * pan, WINDOW *win)
{
int rc = ERR;
diff --git a/panel/p_show.c b/panel/p_show.c
index 933bf5aa2db4..0c973dbeaf66 100644
--- a/panel/p_show.c
+++ b/panel/p_show.c
@@ -37,9 +37,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_show.c,v 1.14 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_show.c,v 1.16 2020/09/26 18:02:35 tom Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
show_panel(PANEL * pan)
{
int err = ERR;
@@ -53,7 +53,7 @@ show_panel(PANEL * pan)
if (Is_Top(pan))
returnCode(OK);
- dBug(("--> show_panel %s", USER_PTR(pan->user)));
+ dBug(("--> show_panel %s", USER_PTR(pan->user, 1)));
HIDE_PANEL(pan, err, OK);
diff --git a/panel/p_top.c b/panel/p_top.c
index 09e89fcc3b54..17abd7680136 100644
--- a/panel/p_top.c
+++ b/panel/p_top.c
@@ -37,9 +37,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_top.c,v 1.7 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_top.c,v 1.8 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
top_panel(PANEL * pan)
{
T((T_CALLED("top_panel(%p)"), (void *)pan));
diff --git a/panel/p_update.c b/panel/p_update.c
index 3fe4770b46c9..40212965d3bb 100644
--- a/panel/p_update.c
+++ b/panel/p_update.c
@@ -38,9 +38,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_update.c,v 1.12 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_update.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
{
PANEL *pan;
@@ -71,7 +71,7 @@ NCURSES_SP_NAME(update_panels) (NCURSES_SP_DCL0)
}
#if NCURSES_SP_FUNCS
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
update_panels(void)
{
NCURSES_SP_NAME(update_panels) (CURRENT_SCREEN);
diff --git a/panel/p_user.c b/panel/p_user.c
index 633431ea204e..9eec8ba11672 100644
--- a/panel/p_user.c
+++ b/panel/p_user.c
@@ -37,9 +37,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_user.c,v 1.9 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_user.c,v 1.10 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(int)
+PANEL_EXPORT(int)
set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
{
T((T_CALLED("set_panel_userptr(%p,%p)"), (void *)pan, (NCURSES_CONST void *)uptr));
@@ -49,7 +49,7 @@ set_panel_userptr(PANEL * pan, NCURSES_CONST void *uptr)
returnCode(OK);
}
-NCURSES_EXPORT(NCURSES_CONST void *)
+PANEL_EXPORT(NCURSES_CONST void *)
panel_userptr(const PANEL * pan)
{
T((T_CALLED("panel_userptr(%p)"), (const void *)pan));
diff --git a/panel/p_win.c b/panel/p_win.c
index 023a71c93499..d188988577eb 100644
--- a/panel/p_win.c
+++ b/panel/p_win.c
@@ -37,9 +37,9 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_win.c,v 1.7 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: p_win.c,v 1.8 2020/05/24 01:40:20 anonymous.maarten Exp $")
-NCURSES_EXPORT(WINDOW *)
+PANEL_EXPORT(WINDOW *)
panel_window(const PANEL * pan)
{
T((T_CALLED("panel_window(%p)"), (const void *)pan));
diff --git a/panel/panel.c b/panel/panel.c
index a0e632d27631..1b2d6e8349a0 100644
--- a/panel/panel.c
+++ b/panel/panel.c
@@ -37,13 +37,13 @@
/* panel.c -- implementation of panels library, some core routines */
#include "panel.priv.h"
-MODULE_ID("$Id: panel.c,v 1.27 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: panel.c,v 1.30 2020/09/26 18:05:17 tom Exp $")
/*+-------------------------------------------------------------------------
_nc_retrace_panel (pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
-NCURSES_EXPORT(PANEL *)
+PANEL_EXPORT(PANEL *)
_nc_retrace_panel(PANEL * pan)
{
T((T_RETURN("%p"), (void *)pan));
@@ -56,16 +56,16 @@ _nc_retrace_panel(PANEL * pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
#ifndef TRACE_TXT
-NCURSES_EXPORT(const char *)
-_nc_my_visbuf(const void *ptr)
+PANEL_EXPORT(const char *)
+_nc_my_visbuf(const void *ptr, int n)
{
char temp[32];
if (ptr != 0)
- _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "ptr:%p", ptr);
+ _nc_SPRINTF(temp, _nc_SLIMIT(sizeof(temp)) "%p", ptr);
else
_nc_STRCPY(temp, "<null>", sizeof(temp));
- return _nc_visbuf(temp);
+ return _nc_visbuf2(n, temp);
}
#endif
#endif
@@ -74,13 +74,13 @@ _nc_my_visbuf(const void *ptr)
dPanel(text,pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
_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) : "--",
+ text, USER_PTR(pan->user, 1),
+ (pan->below) ? USER_PTR(pan->below->user, 2) : "--",
+ (pan->above) ? USER_PTR(pan->above->user, 3) : "--",
PSTARTY(pan), PSTARTX(pan));
}
#endif
@@ -89,7 +89,7 @@ _nc_dPanel(const char *text, const PANEL * pan)
dStack(fmt,num,pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
_nc_dStack(const char *fmt, int num, const PANEL * pan)
{
char s80[80];
@@ -98,10 +98,10 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan)
_nc_SPRINTF(s80, _nc_SLIMIT(sizeof(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) : "--");
+ (_nc_bottom_panel) ? USER_PTR(_nc_bottom_panel->user, 1) : "--",
+ (_nc_top_panel) ? USER_PTR(_nc_top_panel->user, 2) : "--");
if (pan)
- _tracef("pan id=%s", USER_PTR(pan->user));
+ _tracef("pan id=%s", USER_PTR(pan->user, 1));
pan = _nc_bottom_panel;
while (pan)
{
@@ -115,7 +115,7 @@ _nc_dStack(const char *fmt, int num, const PANEL * pan)
Wnoutrefresh(pan) - debugging hook for wnoutrefresh
--------------------------------------------------------------------------*/
#ifdef TRACE
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
_nc_Wnoutrefresh(const PANEL * pan)
{
dPanel("wnoutrefresh", pan);
@@ -127,7 +127,7 @@ _nc_Wnoutrefresh(const PANEL * pan)
Touchpan(pan)
--------------------------------------------------------------------------*/
#ifdef TRACE
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
_nc_Touchpan(const PANEL * pan)
{
dPanel("Touchpan", pan);
@@ -139,7 +139,7 @@ _nc_Touchpan(const PANEL * pan)
Touchline(pan,start,count)
--------------------------------------------------------------------------*/
#ifdef TRACE
-NCURSES_EXPORT(void)
+PANEL_EXPORT(void)
_nc_Touchline(const PANEL * pan, int start, int count)
{
char s80[80];
diff --git a/panel/panel.h b/panel/panel.h
index 2eebe178575a..62acc8ff120b 100644
--- a/panel/panel.h
+++ b/panel/panel.h
@@ -33,7 +33,7 @@
* and: Juergen Pfeifer 1996-1999,2008 *
****************************************************************************/
-/* $Id: panel.h,v 1.13 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: panel.h,v 1.14 2020/07/04 20:38:43 tom Exp $ */
/* panel.h -- interface file for panels library */
@@ -57,27 +57,38 @@ PANEL;
extern "C" {
#endif
-extern NCURSES_EXPORT(WINDOW*) panel_window (const PANEL *);
-extern NCURSES_EXPORT(void) update_panels (void);
-extern NCURSES_EXPORT(int) hide_panel (PANEL *);
-extern NCURSES_EXPORT(int) show_panel (PANEL *);
-extern NCURSES_EXPORT(int) del_panel (PANEL *);
-extern NCURSES_EXPORT(int) top_panel (PANEL *);
-extern NCURSES_EXPORT(int) bottom_panel (PANEL *);
-extern NCURSES_EXPORT(PANEL*) new_panel (WINDOW *);
-extern NCURSES_EXPORT(PANEL*) panel_above (const PANEL *);
-extern NCURSES_EXPORT(PANEL*) panel_below (const PANEL *);
-extern NCURSES_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *);
-extern NCURSES_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *);
-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 defined(BUILDING_PANEL)
+# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_EXPORT
+#else
+# define PANEL_IMPEXP NCURSES_EXPORT_GENERAL_IMPORT
+#endif
+
+#define PANEL_WRAPPED_VAR(type,name) extern PANEL_IMPEXP type NCURSES_PUBLIC_VAR(name)(void)
+
+#define PANEL_EXPORT(type) PANEL_IMPEXP type NCURSES_API
+#define PANEL_EXPORT_VAR(type) PANEL_IMPEXP type
+
+extern PANEL_EXPORT(WINDOW*) panel_window (const PANEL *);
+extern PANEL_EXPORT(void) update_panels (void);
+extern PANEL_EXPORT(int) hide_panel (PANEL *);
+extern PANEL_EXPORT(int) show_panel (PANEL *);
+extern PANEL_EXPORT(int) del_panel (PANEL *);
+extern PANEL_EXPORT(int) top_panel (PANEL *);
+extern PANEL_EXPORT(int) bottom_panel (PANEL *);
+extern PANEL_EXPORT(PANEL*) new_panel (WINDOW *);
+extern PANEL_EXPORT(PANEL*) panel_above (const PANEL *);
+extern PANEL_EXPORT(PANEL*) panel_below (const PANEL *);
+extern PANEL_EXPORT(int) set_panel_userptr (PANEL *, NCURSES_CONST void *);
+extern PANEL_EXPORT(NCURSES_CONST void*) panel_userptr (const PANEL *);
+extern PANEL_EXPORT(int) move_panel (PANEL *, int, int);
+extern PANEL_EXPORT(int) replace_panel (PANEL *,WINDOW *);
+extern PANEL_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 PANEL_EXPORT(PANEL *) ground_panel(SCREEN *);
+extern PANEL_EXPORT(PANEL *) ceiling_panel(SCREEN *);
-extern NCURSES_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
+extern PANEL_EXPORT(void) NCURSES_SP_NAME(update_panels) (SCREEN*);
#endif
#if defined(__cplusplus)
diff --git a/panel/panel.priv.h b/panel/panel.priv.h
index c8e3ea798f9d..029a4f33cd8d 100644
--- a/panel/panel.priv.h
+++ b/panel/panel.priv.h
@@ -27,7 +27,7 @@
* authorization. *
****************************************************************************/
-/* $Id: panel.priv.h,v 1.28 2020/02/02 23:34:34 tom Exp $ */
+/* $Id: panel.priv.h,v 1.30 2020/09/26 18:05:32 tom Exp $ */
#ifndef NCURSES_PANEL_PRIV_H
#define NCURSES_PANEL_PRIV_H 1
@@ -50,21 +50,21 @@ struct screen; /* forward declaration */
#include "panel.h"
#ifdef TRACE
- extern NCURSES_EXPORT(const char *) _nc_my_visbuf (const void *);
+ extern PANEL_EXPORT(const char *) _nc_my_visbuf (const void *, int);
# ifdef TRACE_TXT
-# define USER_PTR(ptr) _nc_visbuf((const char *)ptr)
+# define USER_PTR(ptr,n) _nc_visbuf2(n, (const char *)ptr)
# else
-# define USER_PTR(ptr) _nc_my_visbuf((const char *)ptr)
+# define USER_PTR(ptr,n) _nc_my_visbuf((const char *)ptr, n)
# endif
# define returnPanel(code) TRACE_RETURN1(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*);
- extern NCURSES_EXPORT(void) _nc_Touchpan (const PANEL*);
- extern NCURSES_EXPORT(void) _nc_Touchline (const PANEL*, int, int);
+ extern PANEL_EXPORT(PANEL *) _nc_retrace_panel (PANEL *);
+ extern PANEL_EXPORT(void) _nc_dPanel (const char*, const PANEL*);
+ extern PANEL_EXPORT(void) _nc_dStack (const char*, int, const PANEL*);
+ extern PANEL_EXPORT(void) _nc_Wnoutrefresh (const PANEL*);
+ extern PANEL_EXPORT(void) _nc_Touchpan (const PANEL*);
+ extern PANEL_EXPORT(void) _nc_Touchline (const PANEL*, int, int);
# define dBug(x) _tracef x
# define dPanel(text,pan) _nc_dPanel(text,pan)
@@ -205,7 +205,7 @@ struct screen; /* forward declaration */
#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*);
+extern PANEL_EXPORT(void) NCURSES_SP_NAME(_nc_update_panels)(SCREEN*);
#endif
/* *INDENT-ON* */