. use library function to parse memory string
[minix3.git] / lib / curses / winsertln.c
blobfa6b83f2778fd1928ad039235919f3a1c09352d4
1 #include <curses.h>
2 #include "curspriv.h"
4 /****************************************************************/
5 /* Winsertln() inserts a blank line instead of the cursor line */
6 /* In window 'win' and pushes other lines down. */
7 /****************************************************************/
9 int winsertln(win)
10 WINDOW *win;
12 int *temp, *end, y, blank;
14 blank = ' ' | (win->_attrs & ATR_MSK);
15 temp = win->_line[win->_regbottom];
16 for (y = win->_regbottom; y > win->_cury; y--) {
17 win->_line[y] = win->_line[y - 1];
18 win->_minchng[y] = 0;
19 win->_maxchng[y] = win->_maxx;
21 win->_line[win->_cury] = temp;
22 for (end = &temp[win->_maxx]; temp <= end; temp++) *temp = blank;
23 win->_minchng[win->_cury] = 0;
24 win->_maxchng[win->_cury] = win->_maxx;
25 return(OK);