4 \fBmitem_new\fR - create and destroy menu items
6 \fB#include <menu.h>\fR
8 ITEM *new_item(const char *name, const char *description);
10 int free_item(ITEM *item);
13 The function \fBnew_item\fR allocates a new item and initializes it from the
14 \fBname\fR and \fBdescription\fR pointers. Please notice that the item stores
15 only the pointers to the name and description. Those pointers must be valid
16 during the lifetime of the item. So you should be very carefull with names
17 or descriptions allocated on the stack of some routines.
19 The function \fBfree_item\fR de-allocates an item. Please notice that it
20 is the responsibility of the application to release the memory for the
21 name or the description of the item.
23 The function \fBnew_item\fR returns \fBNULL\fR on error.
25 The function \fBfree_item\fR returns one of the following:
28 The routine succeeded.
31 System error occurred (see \fBerrno\fR).
34 Routine detected an incorrect or out-of-range argument.
37 Item is connected to a menu.
39 \fBcurses\fR(3X), \fBmenu\fR(3X).
41 The header file \fB<menu.h>\fR automatically includes the header file
44 These routines emulate the System V menu library. They were not supported on
45 Version 7 or BSD versions.
47 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric
50 .\"# The following sets edit modes for GNU EMACS