menu_pattern(3X)
β¨ NAME β¨
okay so bestie, this is the menu_pattern(3X) page, filed under Library calls, and itβs all about set_menu_pattern, menu_pattern β set and get a menuβs pattern buffer. periodt. π
π SYNOPSIS π
#include <menu.h>
int set_menu_pattern(MENU *menu, const char *pattern);
char *menu_pattern(const MENU *menu);
π DESCRIPTION π
Every menu has an associated pattern match buffer. When input events that are printable characters come in, they get appended to this match buffer and tested for a match, as described in menu_driver(3X). itβs giving very βtype and it findsβ energy. π
The function set_menu_pattern 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. no cap.
The function menu_pattern returns the pattern buffer of the given menu. thatβs it, thatβs the tea. π
π«Ά RETURN VALUE π«Ά
The function menu_pattern returns a pointer, which is NULL if the menu parameter is NULL. Otherwise, it is a pointer to a string which is empty if no pattern has been set. It does not set errno. bestie, read that again. π
The function set_menu_pattern may return the following error codes:
E_OKβ the routine succeeded. slay. β¨E_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. πE_BAD_STATEβ routine was called from an initialization or termination function. not the vibe.E_NOT_CONNECTEDβ no items are connected to menu. πE_NO_MATCHβ character failed to match. tragic.E_SYSTEM_ERRORβ system error occurred (seeerrno(3)). π¨
π PORTABILITY π
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. so if youβre on those, itβs a no from them. π¦
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. iconic behavior, fr fr. π
π¦ SEE ALSO π¦
curses(3X), menu(3X)
mwah π β this page is from ncurses 6.6, dated 2024-12-28, and itβs literally called menu_pattern(3X). bye bestie, go match some patterns. πΈ
π¦ where this page comes from
- alpine 3.24: ncurses-doc 6.6_p20260516-r0 Β· X11
- arch rolling: ncurses 6.6-2 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms