menupattern(3X) menupattern(3X)
NAME
menupattern - get and set a menu's pattern buffer
SYNOPSIS
##include <>
int setmenupattern(MENU *menu, const char *pattern);
char *menupattern(const MENU *menu);
DESCRIPTION
Every menu has an associated pattern match buffer. As input events
that are printable ASCI characters come in, they are appended to this
match buffer and tested for a match, as described in menudriver(3X).
The function setmenupattern sets the pattern buffer for the given
menu and tries to find the first matching item. If it succeeds, that
item becomes current; if not, the current item does not change.
The function menupattern returns the pattern buffer of the given menu.
RETURN VALUE
The function menupattern returns NUL on error. The function
setmenupattern may return the following error codes:
EOK The routine succeeded.
ESYSTEMEROR
System error occurred (see errno).
EBADARGUMENT
Routine detected an incorrect or out-of-range argument.
ENOMATCH
Character failed to match.
SEE ALSO
curses(3X), menu(3X).
NOTES
The header file <> automatically includes the header file
<>.
PORTABILITY
These routines emulate the System V menu library. They were not sup-
ported on Version 7 or BSD versions.
AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S.
Raymond.
menupattern(3X)
|