source: trunk/minix/lib/curses/wdeleteln.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: 803 bytes
Line 
1#include <curses.h>
2#include "curspriv.h"
3
4/****************************************************************/
5/* Wdeleteln() deletes the line at the window cursor, and the */
6/* Lines below it are shifted up, inserting a blank line at */
7/* The bottom of the window. */
8/****************************************************************/
9
10int wdeleteln(win)
11WINDOW *win;
12{
13 int *end, *temp, y, blank;
14
15 blank = ' ' | (win->_attrs & ATR_MSK);
16
17 temp = win->_line[win->_cury];
18 for (y = win->_cury; y < win->_regbottom; y++) {
19 win->_line[y] = win->_line[y + 1];
20 win->_minchng[y] = 0;
21 win->_maxchng[y] = win->_maxx;
22 }
23 win->_minchng[y] = 0;
24 win->_maxchng[y] = win->_maxx;
25 win->_line[win->_regbottom] = temp;
26 for (end = &(temp[win->_maxx]); temp <= end;) *temp++ = blank;
27 return(OK);
28}
Note: See TracBrowser for help on using the repository browser.