menu_requestname(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

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 returns E_NO_MATCH. No cap.

πŸ¦‹ RETURN VALUE πŸ¦‹

Okay so this is the important part, don't skip it:

  • menu_request_name returns NULL on error and sets errno to E_BAD_ARGUMENT. So if something goes wrong, you get a null pointer and errno is like "bestie, bad argument πŸ’€"
  • menu_request_by_name returns E_NO_MATCH on error. And here's the thing β€” it does not set errno. So don't be looking at errno for 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