* Copyright 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* Copyright 1998-2009,2010 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
| Description : Creates a new menu connected to the item pointer
| array items and returns a pointer to the new menu.
| The new menu is initialized with the values from the
| Description : Creates a new menu connected to the item pointer
| array items and returns a pointer to the new menu.
| The new menu is initialized with the values from the
|
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
|
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
{
int err = E_SYSTEM_ERROR;
MENU *menu = typeCalloc(MENU, 1);
{
int err = E_SYSTEM_ERROR;
MENU *menu = typeCalloc(MENU, 1);
T((T_CALLED("new_menu(%p,%p)"), (void *)SP_PARM, (void *)items));
if (menu)
{
T((T_CALLED("new_menu(%p,%p)"), (void *)SP_PARM, (void *)items));
if (menu)
{
| Description : Creates a new menu connected to the item pointer
| array items and returns a pointer to the new menu.
| The new menu is initialized with the values from the
| Description : Creates a new menu connected to the item pointer
| array items and returns a pointer to the new menu.
| The new menu is initialized with the values from the
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
#if NCURSES_SP_FUNCS
| Return Values : NULL on error
+--------------------------------------------------------------------------*/
#if NCURSES_SP_FUNCS
{
return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
}
#endif
/*---------------------------------------------------------------------------
{
return NCURSES_SP_NAME(new_menu) (CURRENT_SCREEN, items);
}
#endif
/*---------------------------------------------------------------------------
-| Facility : libnmenu
-| Function : int free_menu(MENU *menu)
-|
-| Description : Disconnects menu from its associated item pointer
+| Facility : libnmenu
+| Function : int free_menu(MENU *menu)
+|
+| Description : Disconnects menu from its associated item pointer
| array and frees the storage allocated for the menu.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - Invalid menu pointer passed
| E_POSTED - Menu is already posted
+--------------------------------------------------------------------------*/
| array and frees the storage allocated for the menu.
|
| Return Values : E_OK - success
| E_BAD_ARGUMENT - Invalid menu pointer passed
| E_POSTED - Menu is already posted
+--------------------------------------------------------------------------*/