projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 6.1 - patch 20200118
[ncurses.git]
/
panel
/
p_show.c
diff --git
a/panel/p_show.c
b/panel/p_show.c
index 10781efb73a2b9708560a28f7b339574a35405a2..d5b09bd942602d47fdd70a6c03e1105dc09c2138 100644
(file)
--- a/
panel/p_show.c
+++ b/
panel/p_show.c
@@
-1,5
+1,5
@@
/****************************************************************************
/****************************************************************************
- * Copyright (c) 1998
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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@
-36,41
+36,37
@@
*/
#include "panel.priv.h"
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_show.c,v 1.
2 1998/02/11 12:14:01
tom Exp $")
+MODULE_ID("$Id: p_show.c,v 1.
13 2010/01/23 21:22:16
tom Exp $")
-static void
-
panel_link_top(PANEL *
pan)
+NCURSES_EXPORT(int)
+
show_panel(PANEL *
pan)
{
{
-#ifdef TRACE
- dStack("<lt%d>",1,pan);
- if(_nc_panel_is_linked(pan))
- return;
-#endif
+ int err = ERR;
-
pan->above = (PANEL *)0
;
- pan->below = (PANEL *)0;
- if
(_nc_top_panel
)
+
T((T_CALLED("show_panel(%p)"), (void *)pan))
;
+
+ if
(pan
)
{
{
+ GetHook(pan);
+
+ if (Is_Top(pan))
+ returnCode(OK);
+
+ dBug(("--> show_panel %s", USER_PTR(pan->user)));
+
+ HIDE_PANEL(pan, err, OK);
+
+ dStack("<lt%d>", 1, pan);
+ assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
+
_nc_top_panel->above = pan;
pan->below = _nc_top_panel;
_nc_top_panel->above = pan;
pan->below = _nc_top_panel;
- }
- _nc_top_panel = pan;
- if(!_nc_bottom_panel)
- _nc_bottom_panel = pan;
- _nc_calculate_obscure();
- dStack("<lt%d>",9,pan);
-}
+ pan->above = (PANEL *) 0;
+ _nc_top_panel = pan;
-int
-show_panel(PANEL *pan)
-{
- if(!pan)
- return(ERR);
- if(pan == _nc_top_panel)
- return(OK);
- dBug(("--> show_panel %s", USER_PTR(pan->user)));
- if(_nc_panel_is_linked(pan))
- (void)hide_panel(pan);
- panel_link_top(pan);
- return(OK);
+ err = OK;
+
+ dStack("<lt%d>", 9, pan);
+ }
+ returnCode(err);
}
}