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

Function wborder

Utilities/cmpdcurses/pdcurses/border.c:137–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs,
138 chtype tl, chtype tr, chtype bl, chtype br)
139{
140 int i, ymax, xmax;
141
142 PDC_LOG(("wborder() - called\n"));
143
144 if (!win)
145 return ERR;
146
147 ymax = win->_maxy - 1;
148 xmax = win->_maxx - 1;
149
150 ls = _attr_passthru(win, ls ? ls : ACS_VLINE);
151 rs = _attr_passthru(win, rs ? rs : ACS_VLINE);
152 ts = _attr_passthru(win, ts ? ts : ACS_HLINE);
153 bs = _attr_passthru(win, bs ? bs : ACS_HLINE);
154 tl = _attr_passthru(win, tl ? tl : ACS_ULCORNER);
155 tr = _attr_passthru(win, tr ? tr : ACS_URCORNER);
156 bl = _attr_passthru(win, bl ? bl : ACS_LLCORNER);
157 br = _attr_passthru(win, br ? br : ACS_LRCORNER);
158
159 for (i = 1; i < xmax; i++)
160 {
161 win->_y[0][i] = ts;
162 win->_y[ymax][i] = bs;
163 }
164
165 for (i = 1; i < ymax; i++)
166 {
167 win->_y[i][0] = ls;
168 win->_y[i][xmax] = rs;
169 }
170
171 win->_y[0][0] = tl;
172 win->_y[0][xmax] = tr;
173 win->_y[ymax][0] = bl;
174 win->_y[ymax][xmax] = br;
175
176 for (i = 0; i <= ymax; i++)
177 {
178 win->_firstch[i] = 0;
179 win->_lastch[i] = xmax;
180 }
181
182 PDC_sync(win);
183
184 return OK;
185}
186
187int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl,
188 chtype tr, chtype bl, chtype br)

Callers 3

borderFunction · 0.85
boxFunction · 0.85
wborder_setFunction · 0.85

Calls 2

_attr_passthruFunction · 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…