+ {
+ if (0 == CURRENT_SCREEN)
+ returnPanel(0);
+ else
+ returnPanel(ground_panel(CURRENT_SCREEN));
+ }
+}
+#endif
+
+NCURSES_EXPORT(PANEL *)
+panel_above(const PANEL * pan)
+{
+ PANEL *result;
+
+ T((T_CALLED("panel_above(%p)"), (const void *)pan));
+ if (pan)
+ result = pan->above;
+ else
+ {
+#if NCURSES_SP_FUNCS
+ result = ground_panel(CURRENT_SCREEN);
+#else
+ /* if top and bottom are equal, we have no or only the pseudo panel;
+ if not, we return the panel above the pseudo panel */
+ result = EMPTY_STACK()? (PANEL *) 0 : _nc_bottom_panel->above;
+#endif
+ }
+ returnPanel(result);