requestname(3FORM)

πŸ’– requestname(3FORM) β€” the form-request name translator, bestie πŸ’–

okay so this is a library call from the ncurses family, and honestly? it's giving "tiny little lookup helpers that you will absolutely forget exist until you need them." Two functions, both about matching form request codes to their printable names and back again. Short page, big slay. ✨


🌸 NAME 🌸

form_request_by_name, form_request_name β€” handle printable form request names πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <form.h>

const char *form_request_name(int request);
int form_request_by_name(const char *name);

✨ DESCRIPTION ✨

so here's the tea, no cap. πŸ«–

  • form_request_name returns the printable name of a form request code. that's it. that's the whole job. iconic behavior honestly.
  • form_request_by_name goes digging in the name-table for a request with the given name, and returns its request code. and if it can't find one? it hands you back E_NO_MATCH. sad girl hours. 😭

πŸ’… RETURN VALUE πŸ’…

  • form_request_name returns NULL on error, and sets errno to E_BAD_ARGUMENT. so like, if you get NULL back, check errno, she's talking. πŸ‘‘
  • form_request_by_name returns E_NO_MATCH on error. and listen β€” it does not set errno. so don't go staring at errno expecting answers, bestie, she's not the one. πŸ’€

🌈 PORTABILITY 🌈

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

so if you're writing code that depends on them, the recommendation is to condition it using NCURSES_VERSION. protect your peace, gate your code. 🧚


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. legends, both of them. 🫢


πŸ“ SEE ALSO πŸ“

  • ncurses(3NCURSES)
  • form(3FORM)

and that's the whole page, babes. this one's from ncurses 6.6, dated 2024-12-28, so go forth and match your request names with confidence. mwah. πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from