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

Function init

screen.c:1700–1744  ·  view source on GitHub ↗

* Initialize terminal */

Source from the content-addressed store, hash-verified

1698 * Initialize terminal
1699 */
1700 public void
1701init(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

Callers 4

psignalsFunction · 0.85
lsystemFunction · 0.85
pipe_dataFunction · 0.85
mainFunction · 0.85

Calls 8

ltputsFunction · 0.85
init_mouseFunction · 0.85
putchrFunction · 0.85
line_leftFunction · 0.85
win32_init_termFunction · 0.85
win32_init_vt_termFunction · 0.85
initcolorFunction · 0.85
flushFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…