X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=panel%2Fp_hide.c;h=ecc9eed2226f5e078707c9a2bf047565bd19badf;hb=refs%2Ftags%2Fv5.2;hp=bc7c192156cf872e426c2e8a66f2a1519f2fd230;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1;p=ncurses.git diff --git a/panel/p_hide.c b/panel/p_hide.c index bc7c1921..ecc9eed2 100644 --- a/panel/p_hide.c +++ b/panel/p_hide.c @@ -36,64 +36,22 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_hide.c,v 1.2 1998/02/11 12:14:01 tom Exp $") - -/*+------------------------------------------------------------------------- - __panel_unlink(pan) - unlink panel from stack ---------------------------------------------------------------------------*/ -static void -__panel_unlink(PANEL *pan) -{ - PANEL *prev; - PANEL *next; - -#ifdef TRACE - dStack("",1,pan); - if(!_nc_panel_is_linked(pan)) - return; -#endif - - _nc_override(pan,P_TOUCH); - _nc_free_obscure(pan); - - 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; - - _nc_calculate_obscure(); - - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - dStack("",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("",1,pan); + + HIDE_PANEL(pan,err,TRUE); - if(!_nc_panel_is_linked(pan)) - { - pan->above = (PANEL *)0; - pan->below = (PANEL *)0; - return(ERR); - } + dStack("",9,pan); - __panel_unlink(pan); - return(OK); + return(err); }