'\"!  tbl | mmdoc
'\"macro stdmacro
.if n .pH g3x.menu_pattern @(#)menu_pattern	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/menu_pattern	1.3"
.nr X
.if \nX=0 .ds x} menu_pattern 3X "" "\&"
.if \nX=1 .ds x} menu_pattern 3X ""
.if \nX=2 .ds x} menu_pattern 3X "" "\&"
.if \nX=3 .ds x} menu_pattern "" "" "\&"
.TH \*(x}
.SH NAME
\f4menu_pattern\f2: \f4 set_menu_pattern\f1, \f4menu_pattern\f1 \- set and get \f4menus\fP pattern match buffer
.SH SYNOPSIS
.nf
.ft 4
#include <menu.h>
.sp
int set_menu_pattern(MENU *menu, char *pat);
.sp 0.5
char *menu_pattern(MENU *menu);
.ft 1
.fi
.SH DESCRIPTION
Every menu has a pattern buffer to match entered data with menu items.
\f4set_menu_pattern\fP sets the pattern buffer to \f2pat\fP and
tries to find the first item that matches the pattern.
If it does, the matching item becomes the current item.
If not, the current item does not change.
\f4menu_pattern\fP returns the string in the pattern buffer of \f2menu\f1.
.SH RETURN VALUE
\f4menu_pattern\fP
returns \f4NULL\fP on error.
\f4set_menu_pattern\fP returns one of the following:
.TS
lfCWw(1.25i)1 c1 l .
E_OK	\-	The routine returned successfully.
E_SYSTEM_ERROR	\-	System error.
E_BAD_ARGUMENT	\-	An incorrect argument was passed to the routine.
E_NO_MATCH	\-	The character failed to match.
.TE
.RE
.SH NOTES
.PP
The header file \f4<menu.h>\f1 automatically includes the header files
\f4<eti.h>\fP and \f4<curses.h>\fP.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4menus\fP(3X).
.ad
