menu_requestname(3X)
menu_requestname(3X) β the ncurses manual, but make it cute β¨
Okay bestie, so this is the manual page for menu_requestname(3X) β a library call situation from the ncurses world. It's giving "niche but iconic" and I'm literally obsessed. Let's get into it π
β¨ NAME β¨
menu_request_by_name, menu_request_name β handle printable menu request names π
π SYNOPSIS π
#include <menu.h>
const char *menu_request_name(int request);
int menu_request_by_name(const char *name);
πΈ DESCRIPTION πΈ
So here's the vibe, bestie:
menu_request_nameβ this one returns the printable name of a menu request code. Like, you give it a request code, and it hands you back the cute readable string version. Slay.menu_request_by_nameβ this one searches in the name-table for a request with the given name and returns its request code. It's the reverse situation, iykyk. And if it can't find a match? It returnsE_NO_MATCH. No cap.
π¦ RETURN VALUE π¦
Okay so this is the important part, don't skip it:
menu_request_namereturnsNULLon error and setserrnotoE_BAD_ARGUMENT. So if something goes wrong, you get a null pointer anderrnois like "bestie, bad argument π"menu_request_by_namereturnsE_NO_MATCHon error. And here's the thing β it does not seterrno. So don't be looking aterrnofor this one, it's not giving that energy.
π PORTABILITY π
So these routines are specific to ncurses. They were not supported on Version 7, BSD or System V implementations. The manual literally recommends that any code depending on them be conditioned using NCURSES_VERSION. So if you're writing portable code, do that check, periodt.
β οΈ Like, actually do the NCURSES_VERSION check if you care about portability. The manual said so, not me π
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. Legends only.
π SEE ALSO π
curses(3X)menu(3X)
Okay that's the whole page, bestie. This is from ncurses 6.5, dated 2024-12-28. Now go forth and handle those printable menu request names like the main character you are π β¨π«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms