diff options
Diffstat (limited to 'contrib/ncurses/panel/p_replace.c')
-rw-r--r-- | contrib/ncurses/panel/p_replace.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/contrib/ncurses/panel/p_replace.c b/contrib/ncurses/panel/p_replace.c index 5d0d295..d3733ed 100644 --- a/contrib/ncurses/panel/p_replace.c +++ b/contrib/ncurses/panel/p_replace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2000,2005 Free Software Foundation, Inc. * + * Copyright (c) 1998-2005,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 +36,25 @@ */ #include "panel.priv.h" -MODULE_ID("$Id: p_replace.c,v 1.9 2005/02/19 16:41:31 tom Exp $") +MODULE_ID("$Id: p_replace.c,v 1.11 2010/01/23 21:22:16 tom Exp $") NCURSES_EXPORT(int) replace_panel(PANEL * pan, WINDOW *win) { - T((T_CALLED("replace_panel(%p,%p)"), pan, win)); + int rc = ERR; - if (!pan) - returnCode(ERR); + T((T_CALLED("replace_panel(%p,%p)"), (void *)pan, (void *)win)); - if (IS_LINKED(pan)) + if (pan) { - Touchpan(pan); - PANEL_UPDATE(pan, (PANEL *) 0); + GetHook(pan); + if (IS_LINKED(pan)) + { + Touchpan(pan); + PANEL_UPDATE(pan, (PANEL *) 0); + } + pan->win = win; + rc = OK; } - - pan->win = win; - - returnCode(OK); + returnCode(rc); } |