menu_requestname(3X)
β¨ menu_requestname β the manual page bestie π
okay so this is a 3X library calls page for menu_requestname β yes that's the whole family name, and honestly it's giving "handle printable menu request names" π. Sit down, grab a boba, we're doing this together.
πΈ NAME πΈ
menu_request_by_name, menu_request_name β handle printable menu request names π¦
no literally that's it. two little functions, one big job: turning request codes into names and names back into request codes. iykyk π
β¨ SYNOPSIS β¨
#include <menu.h>
const char *menu_request_name(int request);
int menu_request_by_name(const char *name);
two of them. one gives you a name, one gives you a code. they're a matched set bestie, like bestie bracelets but for ncurses π₯
π DESCRIPTION π
okay so, function number one: menu_request_name returns the printable name of a menu request code. that's it, that's the whole vibe. you hand it a request, it hands you back the cute string version.
function number two: menu_request_by_name goes searching in the name-table for a request with the given name and returns its request code. it's like a little lookup goblin π§. and if it doesn't find it? E_NO_MATCH is returned. no match, no code, we move on. π
β RETURN VALUE β
menu_request_namereturnsNULLon error and setserrnotoE_BAD_ARGUMENT. yes it setserrno, she's thorough.menu_request_by_namereturnsE_NO_MATCHon error. and here's the thing β it does not seterrno. not its business, not its problem π
fr fr keep that distinction in your head, bestie β one of them touches errno and one of them absolutely does not.
π PORTABILITY π
these routines are specific to ncurses. they were not supported on Version 7, BSD or System V implementations. so if you're out here writing code that depends on them, it is recommended that you condition it using NCURSES_VERSION β like, wrap it, protect it, keep it safe π«Ά.
not me warning you that your portable-ish code is about to be deeply unportable. condition on NCURSES_VERSION, periodt.
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. absolute icons, both of them πβ¨
π¦ SEE ALSO π¦
curses(3X)menu(3X)
go read those next, bestie, they're the rest of the lore π
and that's the whole page!! slay π this was the ncurses 6.6 version, dated 2024-12-28, and it lives under the name menu_requestname(3X). mwah, go write some menus ππ
π¦ 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