1menu_pattern(3X) menu_pattern(3X)
2
3
4
6 set_menu_pattern, menu_pattern - set and get a menu's pattern buffer
7
9 #include <menu.h>
10
11 int set_menu_pattern(MENU *menu, const char *pattern);
12 char *menu_pattern(const MENU *menu);
13
15 Every menu has an associated pattern match buffer. As input events
16 that are printable characters come in, they are appended to this match
17 buffer and tested for a match, as described in menu_driver(3X).
18
19 The function set_menu_pattern sets the pattern buffer for the given
20 menu and tries to find the first matching item. If it succeeds, that
21 item becomes current; if not, the current item does not change.
22
23 The function menu_pattern returns the pattern buffer of the given menu.
24
26 The function menu_pattern returns a pointer, which is NULL if the menu
27 parameter is NULL. Otherwise, it is a pointer to a string which is
28 empty if no pattern has been set. It does not set errno.
29
30 The function set_menu_pattern may return the following error codes:
31
32 E_OK The routine succeeded.
33
34 E_BAD_ARGUMENT
35 Routine detected an incorrect or out-of-range argument.
36
37 E_BAD_STATE
38 Routine was called from an initialization or termination function.
39
40 E_NOT_CONNECTED
41 No items are connected to menu.
42
43 E_NO_MATCH
44 Character failed to match.
45
46 E_SYSTEM_ERROR
47 System error occurred (see errno(3)).
48
50 curses(3X), menu(3X).
51
53 The header file <menu.h> automatically includes the header file
54 <curses.h>.
55
57 These routines emulate the System V menu library. They were not sup‐
58 ported on Version 7 or BSD versions.
59
61 Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
62 Raymond.
63
64
65
66 menu_pattern(3X)