X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_vis.c;h=f8fb97f028cb0d2ebfc168dde1d606673f44868c;hp=b44060127952195d31dbe9d59e756f3914b84b07;hb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c index b4406012..f8fb97f0 100644 --- a/menu/m_item_vis.c +++ b/menu/m_item_vis.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2004 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 * @@ -27,7 +27,7 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1995,1997 * + * Author: Juergen Pfeifer, 1995,1997 * ****************************************************************************/ /*************************************************************************** @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_vis.c,v 1.8 1998/02/11 12:13:49 tom Exp $") +MODULE_ID("$Id: m_item_vis.c,v 1.15 2004/12/25 21:40:09 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -49,18 +49,20 @@ MODULE_ID("$Id: m_item_vis.c,v 1.8 1998/02/11 12:13:49 tom Exp $") | Return Values : TRUE if visible | FALSE if invisible +--------------------------------------------------------------------------*/ -bool item_visible(const ITEM * item) +NCURSES_EXPORT(bool) +item_visible(const ITEM * item) { MENU *menu; - - if ( item && - (menu=item->imenu) && - (menu->status & _POSTED) && - ( (menu->toprow + menu->arows) > (item->y) ) && - ( item->y >= menu->toprow) ) - return TRUE; + + T((T_CALLED("item_visible(%p)"), item)); + if (item && + (menu = item->imenu) && + (menu->status & _POSTED) && + ((menu->toprow + menu->arows) > (item->y)) && + (item->y >= menu->toprow)) + returnBool(TRUE); else - return FALSE; + returnBool(FALSE); } /* m_item_vis.c ends here */