]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/mitem_new.3x
ncurses 4.1
[ncurses.git] / man / mitem_new.3x
1 '\" t
2 .TH mitem_new 3X ""
3 .SH NAME
4 \fBmitem_new\fR - create and destroy menu items
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 ITEM *new_item(const char *name, const char *description);
9 .br
10 int free_item(ITEM *item);
11 .br
12 .SH DESCRIPTION
13 The function \fBnew_item\fR allocates a new item and initializes it from the
14 \fBname\fR and \fBdescription\fR pointers.
15 .br
16 The function \fBfree_item\fR de-allocates an item.
17 .SH RETURN VALUE
18 The function \fBnew_item\fR returns \fBNULL\fR on error.
19
20 The function \fBfree_item\fR returns one of the following:
21 .TP 5
22 \fBE_OK\fR
23 The routine succeeded.
24 .TP 5
25 \fBE_SYSTEM_ERROR\fR
26 System error occurred (see \fBerrno\fR).
27 .TP 5
28 \fBE_BAD_ARGUMENT\fR
29 Routine detected an incorrect or out-of-range argument.
30 .TP 5
31 \fBE_CONNECTED\fR
32 Item is connected to a menu.
33 .SH SEE ALSO
34 \fBcurses\fR(3X), \fBmenu\fR(3X).
35 .SH NOTES
36 The header file \fB<menu.h>\fR automatically includes the header file
37 \fB<curses.h>\fR.
38 .SH PORTABILITY
39 These routines emulate the System V menu library.  They were not supported on
40 Version 7 or BSD versions.
41 .SH AUTHORS
42 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
43 S. Raymond.
44 .\"#
45 .\"# The following sets edit modes for GNU EMACS
46 .\"# Local Variables:
47 .\"# mode:nroff
48 .\"# fill-column:79
49 .\"# End: