Unix/Linux Go Back    

NetBSD 6.1.5 - man page for menu_item_value (netbsd section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

MENU_ITEM_VALUE(3)		   BSD Library Functions Manual 	       MENU_ITEM_VALUE(3)

     item_value, set_item_value, item_selected -- get or set value for an item

     Curses Menu Library (libmenu, -lmenu)

     #include <menu.h>

     item_value(ITEM *item);

     set_item_value(ITEM *item, int flag);

     item_selected(MENU *menu, int **array);

     The item_value() function returns value of the item.  If the item has been selected then
     this value will be TRUE.  The value can also be set by calling set_item_value() to set the
     value to a defined state.	Setting the value to a value other than TRUE or FALSE will have
     undefined results.  The item_selected() function returns the number of items that are
     selected in the menu, that is the number of items whose value is TRUE.  The indexes of the
     selected items will be returned in array which will be dynamically allocated to hold the
     number of indexes.  It is the responsibility of the caller to release this storage by call-
     ing free(3) when the storage is no longer required.  If there are no elements selected in
     the items array then item_selected() will return 0 and array will be NULL.  If an error
     occurs item_selected() will return one of the below return values which are less than 0.

     The functions return one of the following error values:

     E_OK	       The function was successful.
     E_NOT_CONNECTED   The item is not connected to a menu.
     E_REQUEST_DENIED  The menu driver could not process the request.
     E_SYSTEM_ERROR    A system error occurred whilst processing the request.

     curses(3), menus(3)

     The header <menu.h> automatically includes both <curses.h> and <eti.h>.

     The function item_selected() is a NetBSD extension and must not be used in portable code.

BSD					September 10, 1999				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 03:37 AM.