'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH g3x.menu_i_new @(#)menu_i_new	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/menu_i_new	1.3"
.nr X
.if \nX=0 .ds x} menu_item_new 3X "" "\&"
.if \nX=1 .ds x} menu_item_new 3X ""
.if \nX=2 .ds x} menu_item_new 3X "" "\&"
.if \nX=3 .ds x} menu_item_new "" "" "\&"
.TH \*(x}
.SH NAME
\f4menu_item_new\f2: \f4 new_item\f1, \f4free_item\f1 \- create and destroy \f4menus\fP items
.SH SYNOPSIS
.nf
.ft 4
#include <menu.h>
.sp
ITEM *new_item(char *name, char *desc);
.sp 0.5
int free_item(ITEM *item);
.ft 1
.fi
.SH DESCRIPTION
\f4new_item\fP creates a new item from \f2name\f1 and \f2description\f1,
and returns a pointer to the new item.
.PP
\f4free_item\fP frees the storage allocated for \f2item\f1.
Once an item is freed, the user can no longer connect it to a menu.
.SH RETURN VALUE
\f4new_item\fP returns \f4NULL\fP on error.
.PP
\f4free_item\fP returns one of the following:
.TS
lfCWw(1.25i)1 c1 l .
E_OK	\-	The routine returned successfully.
E_SYSTEM_ERROR	\-	System error.
E_BAD_ARGUMENT	\-	An incorrect argument was passed to the routine.
E_CONNECTED	\-	One or more items are already connected
		to another menu.
.TE
.RE
.SH NOTES
.PP
The header file \f4<menu.h>\f1 automatically includes the header files
\f4<eti.h>\fP and \f4<curses.h>\fP.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4menus\fP(3X).
.ad
