source: trunk/minix/lib/curses/werase.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 722 bytes
Line 
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
9void werase(win)
10WINDOW *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.