p_below.c revision 76726
121308Sache/**************************************************************************** 221308Sache * Copyright (c) 1998,2000 Free Software Foundation, Inc. * 321308Sache * * 421308Sache * Permission is hereby granted, free of charge, to any person obtaining a * 521308Sache * copy of this software and associated documentation files (the * 621308Sache * "Software"), to deal in the Software without restriction, including * 721308Sache * without limitation the rights to use, copy, modify, merge, publish, * 821308Sache * distribute, distribute with modifications, sublicense, and/or sell * 921308Sache * copies of the Software, and to permit persons to whom the Software is * 1058310Sache * furnished to do so, subject to the following conditions: * 1121308Sache * * 1221308Sache * The above copyright notice and this permission notice shall be included * 1321308Sache * in all copies or substantial portions of the Software. * 1421308Sache * * 1521308Sache * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 1621308Sache * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 1721308Sache * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 1821308Sache * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 1921308Sache * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 2021308Sache * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 2158310Sache * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 2221308Sache * * 2321308Sache * Except as contained in this notice, the name(s) of the above copyright * 2421308Sache * holders shall not be used in advertising or otherwise to promote the * 2521308Sache * sale, use or other dealings in this Software without prior written * 2621308Sache * authorization. * 2721308Sache ****************************************************************************/ 2821308Sache 2921308Sache/**************************************************************************** 3021308Sache * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1995 * 3121308Sache * and: Eric S. Raymond <esr@snark.thyrsus.com> * 3221308Sache ****************************************************************************/ 3321308Sache 3421308Sache/* p_below.c 3521308Sache */ 3621308Sache#include "panel.priv.h" 3721308Sache 3821308SacheMODULE_ID("$Id: p_below.c,v 1.4 2000/12/10 02:20:44 tom Exp $") 3921308Sache 4021308SacheNCURSES_EXPORT(PANEL*) 4121308Sachepanel_below (const PANEL *pan) 4221308Sache{ 4321308Sache if(!pan) 4421308Sache { 4521308Sache /* if top and bottom are equal, we have no or only the pseudo panel */ 4621308Sache return(EMPTY_STACK() ? (PANEL*)0 : _nc_top_panel); 4721308Sache } 4821308Sache else 4958310Sache { 5058310Sache /* we must not return the pseudo panel */ 5121308Sache return(Is_Pseudo(pan->below) ? (PANEL*) 0 : pan->below); 5221308Sache } 5321308Sache} 5421308Sache