aboutsummaryrefslogtreecommitdiff
path: root/panel/p_replace.c
diff options
context:
space:
mode:
Diffstat (limited to 'panel/p_replace.c')
-rw-r--r--panel/p_replace.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/panel/p_replace.c b/panel/p_replace.c
index 5d0d295c8b17..d3733ed22e2f 100644
--- a/panel/p_replace.c
+++ b/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);
}