2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>mitem_new</STRONG> - create and destroy menu items
9 <STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
10 ITEM *new_item(const char *name, const char *description);
11 int free_item(ITEM *item);
15 <H2>DESCRIPTION</H2><PRE>
16 The function <STRONG>new_item</STRONG> allocates a new item and initializes
17 it from the <STRONG>name</STRONG> and <STRONG>description</STRONG> pointers.
18 The function <STRONG>free_item</STRONG> de-allocates an item.
22 <H2>RETURN VALUE</H2><PRE>
23 The function <STRONG>new_item</STRONG> returns <STRONG>NULL</STRONG> on error.
25 The function <STRONG>free_item</STRONG> returns one of the following:
27 <STRONG>E_OK</STRONG> The routine succeeded.
29 <STRONG>E_SYSTEM_ERROR</STRONG>
30 System error occurred (see <STRONG>errno</STRONG>).
32 <STRONG>E_BAD_ARGUMENT</STRONG>
33 Routine detected an incorrect or out-of-range argu-
36 <STRONG>E_CONNECTED</STRONG>
37 Item is connected to a menu.
41 <H2>SEE ALSO</H2><PRE>
42 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
47 The header file <STRONG><menu.h></STRONG> automatically includes the header
48 file <STRONG><curses.h></STRONG>.
52 <H2>PORTABILITY</H2><PRE>
53 These routines emulate the System V menu library. They
54 were not supported on Version 7 or BSD versions.
59 Juergen Pfeifer. Manual pages and adaptation for new
60 curses by Eric S. Raymond.