menu_new(3X)
π menu_new(3X) π
okay so you're in the Library calls aisle of the manual, bestie, and this page is all about new_menu and free_menu β the create-and-destroy duo for menus. periodt. β¨
πΈ NAME πΈ
new_menu, free_menu β create and destroy menus π
β¨ SYNOPSIS β¨
#include <menu.h>
MENU *new_menu(ITEM **items);
int free_menu(MENU *menu);
π¦ DESCRIPTION π¦
So new_menu creates a fresh new menu connected to a specified item pointer array β and bestie, that array must be NULL-terminated. no cap, that part matters. π
π¨ vibe check: the item pointer array has to be NULL-terminated, fr fr.
Then free_menu disconnects menu from its item array and frees the storage that was allocated for the menu. it's giving cleanup era. π§Ήβ¨
π RETURN VALUE π
new_menu returns NULL on error. it sets errno according to the function's failure, like this:
E_NOT_CONNECTEDβ no items are connected to the menu. πE_SYSTEM_ERRORβ system error occurred, e.g.,mallocfailure. π
The function free_menu returns one of these:
E_OKβ the routine succeeded. slay. πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). π«E_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. π©E_POSTEDβ the menu has already been posted. π
π PORTABILITY π
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. iykyk. π§
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. iconic work, honestly. π«Ά
β SEE ALSO β
curses(3X)menu(3X)
π that's the whole page, bestie β brought to you by ncurses 6.5, dated 2024-12-28, and signed menu_new(3X) β¨
π¦ 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