1menu_new(3X)                                                      menu_new(3X)
2
3
4

NAME

6       new_menu, free_menu - create and destroy menus
7

SYNOPSIS

9       #include <menu.h>
10
11       MENU *new_menu(ITEM **items);
12       int free_menu(MENU *menu);
13

DESCRIPTION

15       The  function new_menu creates a new menu connected to a specified item
16       pointer array (which must be NULL-terminated).
17
18       The function free_menu disconnects menu from its item array  and  frees
19       the storage allocated for the menu.
20

RETURN VALUE

22       The  function  new_menu returns NULL on error.  It sets errno according
23       to the function's failure:
24
25       E_NOT_CONNECTED
26            No items are connected to the menu.
27
28       E_SYSTEM_ERROR
29            System error occurred, e.g., malloc failure.
30
31       The function free_menu returns one of the following:
32
33       E_OK The routine succeeded.
34
35       E_SYSTEM_ERROR
36            System error occurred (see errno(3)).
37
38       E_BAD_ARGUMENT
39            Routine detected an incorrect or out-of-range argument.
40
41       E_POSTED
42            The menu has already been posted.
43

SEE ALSO

45       curses(3X), menu(3X).
46

NOTES

48       The  header  file  <menu.h>  automatically  includes  the  header  file
49       <curses.h>.
50

PORTABILITY

52       These  routines  emulate the System V menu library.  They were not sup‐
53       ported on Version 7 or BSD versions.
54

AUTHORS

56       Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S.
57       Raymond.
58
59
60
61                                                                  menu_new(3X)
Impressum