4 <STRONG>menu_pattern</STRONG> - get and set a menu's pattern buffer
9 <STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
10 int set_menu_pattern(MENU *menu, const char *pattern);
11 char *menu_pattern(const MENU *menu);
15 <H2>DESCRIPTION</H2><PRE>
16 Every menu has an associated pattern match buffer. As
17 input events that are printable ASCII characters come in,
18 they are appended to this match buffer and tested for a
19 match, as described in <STRONG><A HREF="menu_driver.3x.html">menu_driver(3X)</A></STRONG>.
21 The function <STRONG>set_menu_pattern</STRONG> sets the pattern buffer for
22 the given menu and tries to find the first matching item.
23 If it succeeds, that item becomes current; if not, the
24 current item does not change.
26 The function <STRONG>menu_pattern</STRONG> returns the pattern buffer of
27 the given <EM>menu</EM>.
31 <H2>RETURN VALUE</H2><PRE>
32 The function <STRONG>menu_pattern</STRONG> returns <STRONG>NULL</STRONG> on error. The
33 function <STRONG>set_menu_pattern</STRONG> may return the following error
36 <STRONG>E_OK</STRONG> The routine succeeded.
38 <STRONG>E_SYSTEM_ERROR</STRONG>
39 System error occurred (see <STRONG>errno</STRONG>).
41 <STRONG>E_BAD_ARGUMENT</STRONG>
42 Routine detected an incorrect or out-of-range argu-
45 <STRONG>E_NO_MATCH</STRONG>
46 Character failed to match.
50 <H2>SEE ALSO</H2><PRE>
51 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
56 The header file <STRONG><menu.h></STRONG> automatically includes the header
57 file <STRONG><curses.h></STRONG>.
61 <H2>PORTABILITY</H2><PRE>
62 These routines emulate the System V menu library. They
63 were not supported on Version 7 or BSD versions.
68 Juergen Pfeifer. Manual pages and adaptation for new
69 curses by Eric S. Raymond.