menu_mark(3X)

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

okay so bestie, welcome to the menu_mark(3X) page from the Library calls girlies ✨ this is the one about that little prefix string that sits in front of your selected menu item. yes THAT one. let's get into it πŸŽ€


✨ NAME ✨

set_menu_mark, menu_mark β€” get and set the menu mark string 🫢

✨ SYNOPSIS ✨

#include <menu.h>

int set_menu_mark(MENU *menu, const char *mark);
const char *menu_mark(const MENU *menu);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so like, back in the day, older terminals were out here with no highlighting and no color capability 😭 so the menu library had to be a little extra to make your menu selections visible β€” it marks the selected items in a menu with a prefix string. that's the whole vibe. main character prefix energy, no cap πŸ‘‘

The function set_menu_mark sets the mark string for the given menu. Calling set_menu_mark with a null menu item will abolish the mark string (bye bestie πŸ’€). Note that changing the length of the mark string for a menu while the menu is posted is likely to produce unhelpful behavior β€” like, don't do that, it's giving chaos πŸ™ˆ

The default string is "-" (a dash). Calling set_menu_mark with a non-NULL menu argument will change this default. so yes you can absolutely make it cuter, it's your menu πŸ’…

The function menu_mark returns the menu's mark string (or NULL if there is none). if it's giving nothing, it's giving NULL fr fr.

⭐ RETURN VALUE ⭐

The function menu_mark returns a pointer (which may be NULL). It does not set errno.

The function set_menu_mark may return the following error codes:

  • E_OK β€” the routine succeeded. slay πŸ’–
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument. something's off bestie, check ur args 😭
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). the system is having a moment, go look at errno πŸ”₯

🌈 PORTABILITY 🌈

These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. so if you're on those, respectfully, this isn't your era 🫢

πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute icons, we stan πŸŽ€

🌸 SEE ALSO 🌸

curses(3X), menu(3X)


okay that's the whole page bestie, go forth and mark ur menus ✨

ngl this one came from ncurses 6.5, dated 2024-12-28 β€” that's the source, the version, and the date, all in one cute little sign-off πŸ’œ iykyk
πŸ“¦ where this page comes from