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       MENU *new_menu(ITEM **items);
11       int free_menu(MENU *menu);
12

DESCRIPTION

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

RETURN VALUE

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

SEE ALSO

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

NOTES

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

PORTABILITY

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

AUTHORS

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