Uninitialized vector entry?
[minix3.git] / lib / curses / werase.c
blob46872b8cea9188a5514b71d9d44470aa55068c60
1 #include <curses.h>
2 #include "curspriv.h"
4 /****************************************************************/
5 /* Werase() fills all lines of window 'win' with blanks and po- */
6 /* Sitions the cursor at home in the scroll region. */
7 /****************************************************************/
9 void werase(win)
10 WINDOW *win;
12 int *end, *start, y, blank;
14 blank = ' ' | (win->_attrs & ATR_MSK);
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;
24 win->_cury = win->_regtop; /* cursor home */
25 win->_curx = 0;