blob: d218eb49aadceca0cf246716e5116b345a96a09b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
* details. If they are missing then this copy is in violation of *
* the copyright conditions. */
/*
** lib_deleteln.c
**
** The routine wdeleteln().
**
*/
#include "curses.priv.h"
#include <nterm.h>
int wdeleteln(WINDOW *win)
{
chtype *end, *temp;
int y, touched = 0;
T(("wdeleteln(%x) called", win));
temp = win->_line[win->_cury];
if (win->_idlok && (delete_line != NULL)) {
putp(delete_line);
touched = 1;
}
for (y = win->_cury; y < win->_regbottom; y++) {
win->_line[y] = win->_line[y+1];
if (!touched) {
win->_firstchar[y] = 0;
win->_lastchar[y] = win->_maxx;
}
}
win->_line[win->_regbottom] = temp;
if (!touched) {
win->_firstchar[win->_regbottom] = 0;
win->_lastchar[win->_regbottom] = win->_maxx;
}
for (end = &(temp[win->_maxx]); temp <= end; )
*temp++ = ' ' | win->_attrs;
return OK;
}
|