MCPcopy Create free account
hub / github.com/NetHack/NetHack / curses_finalize_nhmenu

Function curses_finalize_nhmenu

win/curses/cursdial.c:735–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

733 finalized in memory */
734
735void
736curses_finalize_nhmenu(winid wid, const char *prompt)
737{
738 int count = 0;
739 nhmenu_item *menu_item_ptr;
740 nhmenu *current_menu = get_menu(wid);
741
742 if (current_menu == NULL) {
743 impossible(
744 "curses_finalize_nhmenu: attempt to finalize nonexistent menu");
745 return;
746 }
747 for (menu_item_ptr = current_menu->entries;
748 menu_item_ptr != NULL; menu_item_ptr = menu_item_ptr->next_item)
749 count++;
750
751 current_menu->num_entries = count;
752 current_menu->prompt = curses_copy_of(prompt);
753}
754
755
756/* Display a nethack menu, and return a selection, if applicable */

Callers 1

curses_end_menuFunction · 0.85

Calls 3

get_menuFunction · 0.85
curses_copy_ofFunction · 0.85
impossibleFunction · 0.50

Tested by

no test coverage detected