NAME
mmiitteemmnneeww - create and destroy menu items
SYNOPSIS
##iinncclluuddee <
ITEM *newitem(const char *name, const char *description); int freeitem(ITEM *item);> DESCRIPTION
The function nneewwiitteemm allocates a new item and initializes it from the nnaammee and ddeessccrriippttiioonn pointers. Please notice that the item stores only the pointers to the name and description. Those pointers must be valid during the lifetime of the item. So you should be very careful with names or descriptions allocated on the stack of some routines.The function ffrreeeeiitteemm de-allocates an item. Please notice that it is
the responsibility of the application to release the memory for the name or the description of the item. RREETTUURRNN VVAALLUUEE The function nneewwiitteemm returns NNUULLLL on error. The function ffrreeeeiitteemm returns one of the following: EEOOKK The routine succeeded. EESSYYSSTTEEMMEERRRROORR System error occurred (see eerrrrnnoo). EEBBAADDAARRGGUUMMEENNTTRoutine detected an incorrect or out-of-range argument.
EECCOONNNNEECCTTEEDD Item is connected to a menu.SEE ALSO
ccuurrsseess(3X), mmeennuu(3X). NNOOTTEESS The header file <> automatically includes the header file < >. PPOORRTTAABBIILLIITTYY These routines emulate the System V menu library. They were not sup-
ported on Version 7 or BSD versions. AUTHORS Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. mitemnew(3X)