X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Fnc_panel.c;h=002f118efc997eae7039edbc590c032be98e6763;hp=536aab385dfd49e880abeac97a00ba039e5fd562;hb=d6c65d287166c3105ece4a5e3f3ec7af5a5f26a3;hpb=0eb88fc5281804773e2a0c7a488a4452463535ce diff --git a/ncurses/base/nc_panel.c b/ncurses/base/nc_panel.c index 536aab38..002f118e 100644 --- a/ncurses/base/nc_panel.c +++ b/ncurses/base/nc_panel.c @@ -1,5 +1,6 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright 2020 Thomas E. Dickey * + * Copyright 1998-2000,2009 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 * @@ -32,10 +33,22 @@ #include -MODULE_ID("$Id: nc_panel.c,v 1.2 1998/02/11 12:13:56 tom Exp $") +MODULE_ID("$Id: nc_panel.c,v 1.6 2020/02/02 23:34:34 tom Exp $") -struct panelhook* +NCURSES_EXPORT(struct panelhook *) +NCURSES_SP_NAME(_nc_panelhook) (NCURSES_SP_DCL0) +{ + return (SP_PARM + ? &(SP_PARM->_panelHook) + : (CURRENT_SCREEN + ? &(CURRENT_SCREEN->_panelHook) + : 0)); +} + +#if NCURSES_SP_FUNCS +NCURSES_EXPORT(struct panelhook *) _nc_panelhook(void) { - return (SP ? &(SP->_panelHook) : NULL); + return NCURSES_SP_NAME(_nc_panelhook) (CURRENT_SCREEN); } +#endif