X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=panel%2Fp_hide.c;h=c3bcc8a74f5cb3c02df65f13a2b32ad854184c8a;hp=08d8853a201c65213a08ea86eca7eb496ac03de2;hb=f67a188e71a0e6f80c1c45e50e7a7449c2d7bfb3;hpb=55ccd2b959766810cf7db8d1c4462f338ce0afc8 diff --git a/panel/p_hide.c b/panel/p_hide.c index 08d8853a..c3bcc8a7 100644 --- a/panel/p_hide.c +++ b/panel/p_hide.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2009,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 * @@ -36,23 +37,27 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_hide.c,v 1.9 2005/02/19 16:39:41 tom Exp $") +MODULE_ID("$Id: p_hide.c,v 1.13 2020/05/24 01:40:20 anonymous.maarten Exp $") -NCURSES_EXPORT(int) +PANEL_EXPORT(int) hide_panel(register PANEL * pan) { - int err = OK; + int err = ERR; - T((T_CALLED("hide_panel(%p)"), pan)); - if (!pan) - returnCode(ERR); + T((T_CALLED("hide_panel(%p)"), (void *)pan)); - dBug(("--> hide_panel %s", USER_PTR(pan->user))); - dStack("", 1, pan); + if (pan) + { + GetHook(pan); - HIDE_PANEL(pan, err, ERR); + dBug(("--> hide_panel %s", USER_PTR(pan->user))); + dStack("", 1, pan); - dStack("", 9, pan); + HIDE_PANEL(pan, err, ERR); + err = OK; + + dStack("", 9, pan); + } returnCode(err); }