Commit | Line | Data |
---|---|---|
6e1c93d0 DF |
1 | /* |
2 | * Copyright (c) 1980 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
7 | #ifndef lint | |
8 | static char sccsid[] = "@(#)deleteln.c 5.1 (Berkeley) %G%"; | |
9 | #endif not lint | |
10 | ||
62a5fc29 KA |
11 | # include "curses.ext" |
12 | ||
13 | /* | |
14 | * This routine deletes a line from the screen. It leaves | |
15 | * (_cury,_curx) unchanged. | |
16 | * | |
62a5fc29 KA |
17 | */ |
18 | wdeleteln(win) | |
d45d8bdb JB |
19 | reg WINDOW *win; |
20 | { | |
62a5fc29 KA |
21 | reg char *temp; |
22 | reg int y; | |
23 | reg char *end; | |
d45d8bdb | 24 | reg int x; |
62a5fc29 | 25 | |
d45d8bdb JB |
26 | # ifdef DEBUG |
27 | fprintf(outf, "DELETELN(%0.2o)\n", win); | |
28 | # endif | |
62a5fc29 | 29 | temp = win->_y[win->_cury]; |
8da28f22 | 30 | for (y = win->_cury; y < win->_maxy - 1; y++) { |
d45d8bdb JB |
31 | if (win->_orig == NULL) |
32 | win->_y[y] = win->_y[y + 1]; | |
33 | else | |
34 | bcopy(win->_y[y + 1], win->_y[y], win->_maxx); | |
35 | touchline(win, y, 0, win->_maxx - 1); | |
62a5fc29 | 36 | } |
d45d8bdb JB |
37 | if (win->_orig == NULL) |
38 | win->_y[y] = temp; | |
39 | else | |
40 | temp = win->_y[y]; | |
62a5fc29 KA |
41 | for (end = &temp[win->_maxx]; temp < end; ) |
42 | *temp++ = ' '; | |
d45d8bdb JB |
43 | touchline(win, win->_cury, 0, win->_maxx - 1); |
44 | if (win->_orig == NULL) | |
45 | _id_subwins(win); | |
46 | return OK; | |
62a5fc29 | 47 | } |