]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - menu/m_item_vis.c
ncurses 6.2 - patch 20200704
[ncurses.git] / menu / m_item_vis.c
index 75bb60ed6346949482b34e06f7ab62e2d0ad7ef3..628396e7648113bc822fed433890a27d523b6e42 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998,2000 Free Software Foundation, Inc.                   *
+ * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 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 +38,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.18 2020/05/24 01:40:20 anonymous.maarten Exp $")
 
 /*---------------------------------------------------------------------------
 |   Facility      :  libnmenu  
@@ -49,19 +50,20 @@ MODULE_ID("$Id: m_item_vis.c,v 1.13 2003/10/25 14:54:48 tom Exp $")
 |   Return Values :  TRUE  if visible
 |                    FALSE if invisible
 +--------------------------------------------------------------------------*/
-NCURSES_EXPORT(bool)
-item_visible (const ITEM * item)
+MENU_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)"), (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 */