aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/panel/p_hide.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2000-07-03 09:24:12 +0000
committerPeter Wemm <peter@FreeBSD.org>2000-07-03 09:24:12 +0000
commit15589c42fa2774d2f8ee650f4f31eb8d3a861316 (patch)
tree27e79485df3c9195e6fe58960df47f675f41f1e9 /contrib/ncurses/panel/p_hide.c
parent6b9085fd58b7602b14be0cd2059285baa764a7ee (diff)
downloadsrc-15589c42fa2774d2f8ee650f4f31eb8d3a861316.tar.gz
src-15589c42fa2774d2f8ee650f4f31eb8d3a861316.zip
Import the most recent ncurses 5.1 prerelease (20000701).
Mostly this is intended to resolve the trace() badness once and for all. Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=62449
Diffstat (limited to 'contrib/ncurses/panel/p_hide.c')
-rw-r--r--contrib/ncurses/panel/p_hide.c55
1 files changed, 8 insertions, 47 deletions
diff --git a/contrib/ncurses/panel/p_hide.c b/contrib/ncurses/panel/p_hide.c
index d61429538440..ecc9eed2226f 100644
--- a/contrib/ncurses/panel/p_hide.c
+++ b/contrib/ncurses/panel/p_hide.c
@@ -36,61 +36,22 @@
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_hide.c,v 1.3 1999/09/29 15:22:32 juergen Exp $")
-
-/*+-------------------------------------------------------------------------
- __panel_unlink(pan) - unlink panel from stack
---------------------------------------------------------------------------*/
-static void
-__panel_unlink(PANEL *pan)
-{
- PANEL *prev;
- PANEL *next;
-
-#ifdef TRACE
- dStack("<u%d>",1,pan);
- if(!_nc_panel_is_linked(pan))
- return;
-#endif
-
- PANEL_UPDATE(pan,(PANEL*)0);
-
- prev = pan->below;
- next = pan->above;
-
- if(prev)
- { /* if non-zero, we will not update the list head */
- prev->above = next;
- if(next)
- next->below = prev;
- }
- else if(next)
- next->below = prev;
- if(pan == _nc_bottom_panel)
- _nc_bottom_panel = next;
- if(pan == _nc_top_panel)
- _nc_top_panel = prev;
-
- pan->above = (PANEL *)0;
- pan->below = (PANEL *)0;
- dStack("<u%d>",9,pan);
-}
+MODULE_ID("$Id: p_hide.c,v 1.5 1999/11/25 13:49:26 juergen Exp $")
int
hide_panel(register PANEL *pan)
{
+ int err = OK;
+
if(!pan)
return(ERR);
dBug(("--> hide_panel %s", USER_PTR(pan->user)));
+ dStack("<u%d>",1,pan);
+
+ HIDE_PANEL(pan,err,TRUE);
- if(!_nc_panel_is_linked(pan))
- {
- pan->above = (PANEL *)0;
- pan->below = (PANEL *)0;
- return(ERR);
- }
+ dStack("<u%d>",9,pan);
- __panel_unlink(pan);
- return(OK);
+ return(err);
}