projects
/
ncurses.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ncurses 5.7 - patch 20091212
[ncurses.git]
/
panel
/
p_show.c
diff --git
a/panel/p_show.c
b/panel/p_show.c
index d129fd50715b35355ba9718aed55cef82149ed0c..c517b4b1ca06f41a7eb7eb377fc6cd3ba41787d5 100644
(file)
--- a/
panel/p_show.c
+++ b/
panel/p_show.c
@@
-1,5
+1,5
@@
/****************************************************************************
/****************************************************************************
- * Copyright (c) 1998
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 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@
-36,44
+36,37
@@
*/
#include "panel.priv.h"
*/
#include "panel.priv.h"
-MODULE_ID("$Id: p_show.c,v 1.
5 1999/09/29 15:22:32 juergen
Exp $")
+MODULE_ID("$Id: p_show.c,v 1.
12 2009/02/07 23:11:45 tom
Exp $")
-static void
-
panel_link_top(PANEL *
pan)
+NCURSES_EXPORT(int)
+
show_panel(PANEL *
pan)
{
{
-#ifdef TRACE
- dStack("<lt%d>",1,pan);
- if(_nc_panel_is_linked(pan))
- return;
-#endif
+ int err = ERR;
-
assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel
);
+
T((T_CALLED("show_panel(%p)"), pan)
);
- pan->above = (PANEL *)0;
- pan->below = (PANEL *)0;
-
- _nc_top_panel->above = pan;
- pan->below = _nc_top_panel;
- _nc_top_panel = pan;
-
- dStack("<lt%d>",9,pan);
-}
+ if (pan)
+ {
+ GetHook(pan);
-int
-show_panel(PANEL *pan)
-{
- if(!pan)
- return(ERR);
+ if (Is_Top(pan))
+ returnCode(OK);
+
+ dBug(("--> show_panel %s", USER_PTR(pan->user)));
- if (Is_Top(pan))
- return(OK);
+ HIDE_PANEL(pan, err, OK);
- dBug(("--> show_panel %s", USER_PTR(pan->user)));
+ dStack("<lt%d>", 1, pan);
+ assert(_nc_bottom_panel == _nc_stdscr_pseudo_panel);
- if(_nc_panel_is_linked(pan))
- (void)hide_panel(pan);
+ _nc_top_panel->above = pan;
+ pan->below = _nc_top_panel;
+ pan->above = (PANEL *) 0;
+ _nc_top_panel = pan;
-
panel_link_top(pan)
;
+
err = OK
;
- return(OK);
+ dStack("<lt%d>", 9, pan);
+ }
+ returnCode(err);
}
}