reset terminal to original state */
| 456 | |
| 457 | /* reset terminal to original state */ |
| 458 | void |
| 459 | settty(const char *s) |
| 460 | { |
| 461 | if (!bombing) |
| 462 | term_end_screen(); |
| 463 | if (s) |
| 464 | raw_print(s); |
| 465 | if (settty_needed) { |
| 466 | disable_broadcast_trapping(); |
| 467 | #if 0 /* let SMG's exit handler do the cleanup (as per doc) */ |
| 468 | /* #ifndef USE_QIO_INPUT */ |
| 469 | if (kb) |
| 470 | smg$delete_virtual_keyboard(&kb), kb = 0; |
| 471 | #endif /* 0 (!USE_QIO_INPUT) */ |
| 472 | if (ctrl_mask) |
| 473 | (void) lib$enable_ctrl(&ctrl_mask, 0); |
| 474 | iflags.echo = ON; |
| 475 | iflags.cbreak = OFF; |
| 476 | /* reset original tab, form-feed, broadcast settings */ |
| 477 | sg.sm.tt_char = tt_char_restore; |
| 478 | sg.sm.tt2_char = tt2_char_restore; |
| 479 | setctty(); |
| 480 | |
| 481 | settty_needed = FALSE; |
| 482 | } |
| 483 | } |
| 484 | |
| 485 | /* same as settty, with no clearing of the screen */ |
| 486 | void |
no test coverage detected