X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=menu%2Fm_item_vis.c;h=ff847405437091c93f216249cb31bc37b382381c;hp=75bb60ed6346949482b34e06f7ab62e2d0ad7ef3;hb=746490c7ab9f66c7521c500684e65eca223c551c;hpb=a8987e73ec254703634802b4f7ee30d3a485524d diff --git a/menu/m_item_vis.c b/menu/m_item_vis.c index 75bb60ed..ff847405 100644 --- a/menu/m_item_vis.c +++ b/menu/m_item_vis.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998-2004,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 * @@ -37,7 +37,7 @@ #include "menu.priv.h" -MODULE_ID("$Id: m_item_vis.c,v 1.13 2003/10/25 14:54:48 tom Exp $") +MODULE_ID("$Id: m_item_vis.c,v 1.16 2010/01/23 21:20:10 tom Exp $") /*--------------------------------------------------------------------------- | Facility : libnmenu @@ -50,18 +50,19 @@ MODULE_ID("$Id: m_item_vis.c,v 1.13 2003/10/25 14:54:48 tom Exp $") | FALSE if invisible +--------------------------------------------------------------------------*/ NCURSES_EXPORT(bool) -item_visible (const ITEM * item) +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)"), (const void *)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 */