| 2516 | } |
| 2517 | |
| 2518 | void |
| 2519 | tty_start_menu(winid window, unsigned long mbehavior) |
| 2520 | { |
| 2521 | struct WinDesc *cw = 0; |
| 2522 | |
| 2523 | if (window == WIN_ERR || (cw = wins[window]) == (struct WinDesc *) 0) |
| 2524 | ttywindowpanic(); |
| 2525 | |
| 2526 | #ifdef TTY_PERM_INVENT |
| 2527 | if (cw->mbehavior == MENU_BEHAVE_PERMINV) { |
| 2528 | /* PERMINV is ready to go already; not much to do here */ |
| 2529 | inuse_only_start = 0; |
| 2530 | return; |
| 2531 | } |
| 2532 | if (mbehavior == MENU_BEHAVE_PERMINV |
| 2533 | && (iflags.perm_invent |
| 2534 | || gp.perm_invent_toggling_direction == toggling_on)) { |
| 2535 | winid w = ttyinv_create_window(window, wins[window]); |
| 2536 | |
| 2537 | if (w == WIN_ERR) { |
| 2538 | ; /* something went wrong, so add clean up code here */ |
| 2539 | } else { |
| 2540 | cw->mbehavior = mbehavior; |
| 2541 | WIN_INVEN = w; |
| 2542 | } |
| 2543 | return; |
| 2544 | } |
| 2545 | #else |
| 2546 | nhUse(mbehavior); |
| 2547 | #endif |
| 2548 | |
| 2549 | tty_clear_nhwindow(window); |
| 2550 | return; |
| 2551 | } |
| 2552 | |
| 2553 | /*ARGSUSED*/ |
| 2554 | /* |
nothing calls this directly
no test coverage detected