MCPcopy Create free account
hub / github.com/Kitware/CMake / wscrl

Function wscrl

Utilities/cmpdcurses/pdcurses/scroll.c:41–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39**man-end****************************************************************/
40
41int wscrl(WINDOW *win, int n)
42{
43 int i, l, dir, start, end;
44 chtype blank, *temp;
45
46 /* Check if window scrolls. Valid for window AND pad */
47
48 if (!win || !win->_scroll || !n)
49 return ERR;
50
51 blank = win->_bkgd;
52
53 if (n > 0)
54 {
55 start = win->_tmarg;
56 end = win->_bmarg;
57 dir = 1;
58 }
59 else
60 {
61 start = win->_bmarg;
62 end = win->_tmarg;
63 dir = -1;
64 }
65
66 for (l = 0; l < (n * dir); l++)
67 {
68 temp = win->_y[start];
69
70 /* re-arrange line pointers */
71
72 for (i = start; i != end; i += dir)
73 win->_y[i] = win->_y[i + dir];
74
75 win->_y[end] = temp;
76
77 /* make a blank line */
78
79 for (i = 0; i < win->_maxx; i++)
80 *temp++ = blank;
81 }
82
83 touchline(win, win->_tmarg, win->_bmarg - win->_tmarg + 1);
84
85 PDC_sync(win);
86 return OK;
87}
88
89int scrl(int n)
90{

Callers 3

scrlFunction · 0.85
scrollFunction · 0.85
waddchFunction · 0.85

Calls 2

touchlineFunction · 0.85
PDC_syncFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…