Rev | Line | |
---|
[9] | 1 | #include <curses.h>
|
---|
| 2 | #include "curspriv.h"
|
---|
| 3 |
|
---|
| 4 | /****************************************************************/
|
---|
| 5 | /* Werase() fills all lines of window 'win' with blanks and po- */
|
---|
| 6 | /* Sitions the cursor at home in the scroll region. */
|
---|
| 7 | /****************************************************************/
|
---|
| 8 |
|
---|
| 9 | void werase(win)
|
---|
| 10 | WINDOW *win;
|
---|
| 11 | {
|
---|
| 12 | int *end, *start, y, blank;
|
---|
| 13 |
|
---|
| 14 | blank = ' ' | (win->_attrs & ATR_MSK);
|
---|
| 15 |
|
---|
| 16 | for (y = win->_regtop; y <= win->_regbottom; y++) { /* clear all lines */
|
---|
| 17 | start = win->_line[y];
|
---|
| 18 | end = &start[win->_maxx];
|
---|
| 19 | while (start <= end) /* clear all line */
|
---|
| 20 | *start++ = blank;
|
---|
| 21 | win->_minchng[y] = 0;
|
---|
| 22 | win->_maxchng[y] = win->_maxx;
|
---|
| 23 | }
|
---|
| 24 | win->_cury = win->_regtop; /* cursor home */
|
---|
| 25 | win->_curx = 0;
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.