X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=panel%2Fp_bottom.c;h=3ca9c77eedab1c5b49764cd8ee0c79c775d8c834;hp=f671864231db6e74bcedf10dedb9de265aa94a38;hb=9f479192e3ca3413d235c66bf058f8cc63764898;hpb=b1f61d9f3aa244512045a6b02e759825d7049d34;ds=sidebyside diff --git a/panel/p_bottom.c b/panel/p_bottom.c index f6718642..3ca9c77e 100644 --- a/panel/p_bottom.c +++ b/panel/p_bottom.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright 2020,2021 Thomas E. Dickey * + * Copyright 1998-2008,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 * @@ -29,42 +30,46 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1995 * * and: Eric S. Raymond * + * and: Juergen Pfeifer 1997-1999,2008 * ****************************************************************************/ /* p_bottom.c - * Place a panel on bottom of the stack; may already be in the stack + * Place a panel on bottom of the stack; may already be in the stack */ #include "panel.priv.h" -MODULE_ID("$Id: p_bottom.c,v 1.7 1999/11/25 13:49:26 juergen Exp $") +MODULE_ID("$Id: p_bottom.c,v 1.17 2021/06/17 21:20:30 tom Exp $") -int -bottom_panel(PANEL *pan) +PANEL_EXPORT(int) +bottom_panel(PANEL * pan) { int err = OK; - if (pan) { + T((T_CALLED("bottom_panel(%p)"), (void *)pan)); + if (pan) + { + GetHook(pan); + if (!Is_Bottom(pan)) + { - if(!Is_Bottom(pan)) { - - dBug(("--> bottom_panel %s", USER_PTR(pan->user))); - - HIDE_PANEL(pan,err,FALSE); - assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); - - dStack("",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("",9,pan); + dBug(("--> bottom_panel %s", USER_PTR(pan->user, 1))); + + HIDE_PANEL(pan, err, OK); + assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel); + + dStack("", 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("", 9, pan); + } } - } else err = ERR; - - return(err); + + returnCode(err); }