MCPcopy Create free account
hub / github.com/gwsw/less / deinit

Function deinit

screen.c:1749–1782  ·  view source on GitHub ↗

* Deinitialize terminal */

Source from the content-addressed store, hash-verified

1747 * Deinitialize terminal
1748 */
1749 public void
1750deinit(VOID_PARAM)
1751{
1752 if (!init_done)
1753 return;
1754#if !MSDOS_COMPILER
1755 if (!(quit_if_one_screen && one_screen))
1756 {
1757 if (mousecap)
1758 deinit_mouse();
1759 if (!no_keypad)
1760 ltputs(sc_e_keypad, sc_height, putchr);
1761 if (!no_init)
1762 ltputs(sc_deinit, sc_height, putchr);
1763 }
1764#else
1765 /* Restore system colors. */
1766 SETCOLORS(sy_fg_color, sy_bg_color);
1767#if MSDOS_COMPILER==WIN32C
1768 win32_deinit_vt_term();
1769 if (!(quit_if_one_screen && one_screen))
1770 {
1771 if (mousecap)
1772 deinit_mouse();
1773 if (!no_init)
1774 win32_deinit_term();
1775 }
1776#else
1777 /* Need clreol to make SETCOLORS take effect. */
1778 clreol();
1779#endif
1780#endif
1781 init_done = 0;
1782}
1783
1784/*
1785 * Are we interactive (ie. writing to an initialized tty)?

Callers 4

psignalsFunction · 0.85
lsystemFunction · 0.85
pipe_dataFunction · 0.85
quitFunction · 0.85

Calls 4

deinit_mouseFunction · 0.85
ltputsFunction · 0.85
win32_deinit_vt_termFunction · 0.85
win32_deinit_termFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…