requestname(3MENU)

✨ requestname(3MENU) ✨

okay bestie, welcome to requestname(3MENU) β€” a lil library-calls page from the ncurses 6.6 squad, and it's all about handling printable menu request names. two lil functions, one big vibe. 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 tea, bestie. there's two functions and they're like two halves of one iconic friendship 🫢

menu_request_name returns the printable name of a menu request code. that's it, that's the job. you hand it a request code, it hands you back a cute lil string name.

menu_request_by_name does the reverse glow-up ✨ it searches in the name-table for a request with the given name and returns its request code. and if it can't find your lil name anywhere? it gives you back E_NO_MATCH. no match, no notes πŸ’€


🌈 RETURN VALUE 🌈

  • menu_request_name returns NULL on error, and it sets errno to E_BAD_ARGUMENT. so if you get nothing back, check that errno, bestie πŸ‘€
  • menu_request_by_name returns E_NO_MATCH on error. and ngl, it does not set errno. it's just like that πŸ™ˆ

πŸ¦‹ PORTABILITY πŸ¦‹

these routines are specific to ncurses. they were not supported on Version 7, BSD or System V implementations.

so fr fr, if you got code depending on them, it is recommended that you condition it using NCURSES_VERSION. don't get caught out here, periodt πŸ’€


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.


⭐ SEE ALSO ⭐

  • ncurses(3NCURSES)
  • menu(3MENU)

and that's the whole page, bestie πŸ’– this was ncurses 6.6, dated 2024-12-28 β€” now go forth and slay those menu request names, you absolute main character 🧚✨

πŸ“¦ where this page comes from