source: trunk/minix/lib/curses/winsertln.c@ 11

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

Minix 3.1.2a

File size: 778 bytes
RevLine 
[9]1#include <curses.h>
2#include "curspriv.h"
3
4/****************************************************************/
5/* Winsertln() inserts a blank line instead of the cursor line */
6/* In window 'win' and pushes other lines down. */
7/****************************************************************/
8
9int winsertln(win)
10WINDOW *win;
11{
12 int *temp, *end, y, blank;
13
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;
20 }
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);
26}
Note: See TracBrowser for help on using the repository browser.