* Initialize terminal */
| 1698 | * Initialize terminal |
| 1699 | */ |
| 1700 | public void |
| 1701 | init(VOID_PARAM) |
| 1702 | { |
| 1703 | #if !MSDOS_COMPILER |
| 1704 | if (!(quit_if_one_screen && one_screen)) |
| 1705 | { |
| 1706 | if (!no_init) |
| 1707 | ltputs(sc_init, sc_height, putchr); |
| 1708 | if (!no_keypad) |
| 1709 | ltputs(sc_s_keypad, sc_height, putchr); |
| 1710 | if (mousecap) |
| 1711 | init_mouse(); |
| 1712 | } |
| 1713 | init_done = 1; |
| 1714 | if (top_scroll) |
| 1715 | { |
| 1716 | int i; |
| 1717 | |
| 1718 | /* |
| 1719 | * This is nice to terminals with no alternate screen, |
| 1720 | * but with saved scrolled-off-the-top lines. This way, |
| 1721 | * no previous line is lost, but we start with a whole |
| 1722 | * screen to ourself. |
| 1723 | */ |
| 1724 | for (i = 1; i < sc_height; i++) |
| 1725 | putchr('\n'); |
| 1726 | } else |
| 1727 | line_left(); |
| 1728 | #else |
| 1729 | #if MSDOS_COMPILER==WIN32C |
| 1730 | if (!(quit_if_one_screen && one_screen)) |
| 1731 | { |
| 1732 | if (!no_init) |
| 1733 | win32_init_term(); |
| 1734 | if (mousecap) |
| 1735 | init_mouse(); |
| 1736 | |
| 1737 | } |
| 1738 | win32_init_vt_term(); |
| 1739 | #endif |
| 1740 | init_done = 1; |
| 1741 | initcolor(); |
| 1742 | flush(); |
| 1743 | #endif |
| 1744 | } |
| 1745 | |
| 1746 | /* |
| 1747 | * Deinitialize terminal |
no test coverage detected
searching dependent graphs…