diff options
Diffstat (limited to 'lib/libpanel/p_replace.c')
-rw-r--r-- | lib/libpanel/p_replace.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/lib/libpanel/p_replace.c b/lib/libpanel/p_replace.c index 09dd010b4c6..c0bb532cc1a 100644 --- a/lib/libpanel/p_replace.c +++ b/lib/libpanel/p_replace.c @@ -1,7 +1,7 @@ -/* $OpenBSD: p_replace.c,v 1.5 2001/02/28 22:58:53 millert Exp $ */ +/* $OpenBSD: p_replace.c,v 1.6 2010/01/12 23:22:08 nicm Exp $ */ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2000,2005 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 * @@ -38,20 +38,23 @@ */ #include "panel.priv.h" -MODULE_ID("$From: p_replace.c,v 1.7 2001/02/24 23:41:38 tom Exp $") +MODULE_ID("$Id: p_replace.c,v 1.6 2010/01/12 23:22:08 nicm Exp $") NCURSES_EXPORT(int) -replace_panel (PANEL *pan, WINDOW *win) +replace_panel(PANEL * pan, WINDOW *win) { - if(!pan) - return(ERR); - - if (IS_LINKED(pan)) { - Touchpan(pan); - PANEL_UPDATE(pan,(PANEL*)0); - } - + T((T_CALLED("replace_panel(%p,%p)"), pan, win)); + + if (!pan) + returnCode(ERR); + + if (IS_LINKED(pan)) + { + Touchpan(pan); + PANEL_UPDATE(pan, (PANEL *) 0); + } + pan->win = win; - return(OK); + returnCode(OK); } |