| 733 | finalized in memory */ |
| 734 | |
| 735 | void |
| 736 | curses_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 */ |
no test coverage detected