4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>mitem_new</B> - create and destroy menu items
12 <H2>SYNOPSIS</H2><PRE>
13 <B>#include</B> <B><menu.h></B>
14 ITEM *new_item(const char *name, const char *description);
15 int free_item(ITEM *item);
19 <H2>DESCRIPTION</H2><PRE>
20 The function <B>new_item</B> allocates a new item and initializes
21 it from the <B>name</B> and <B>description</B> pointers. Please notice
22 that the item stores only the pointers to the name and
23 description. Those pointers must be valid during the life-
24 time of the item. So you should be very carefull with
25 names or descriptions allocated on the stack of some rou-
27 The function <B>free_item</B> de-allocates an item. Please notice
28 that it is the responsibility of the application to
29 release the memory for the name or the description of the
34 <H2>RETURN VALUE</H2><PRE>
35 The function <B>new_item</B> returns <B>NULL</B> on error.
37 The function <B>free_item</B> returns one of the following:
39 <B>E_OK</B> The routine succeeded.
42 System error occurred (see <B>errno</B>).
45 Routine detected an incorrect or out-of-range argu-
49 Item is connected to a menu.
53 <H2>SEE ALSO</H2><PRE>
54 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="menu.3x.html">menu(3x)</A></B>.
59 The header file <B><menu.h></B> automatically includes the header
60 file <B><curses.h></B>.
64 <H2>PORTABILITY</H2><PRE>
65 These routines emulate the System V menu library. They
66 were not supported on Version 7 or BSD versions.
71 Juergen Pfeifer. Manual pages and adaptation for new
72 curses by Eric S. Raymond.
78 Man(1) output converted with
79 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>