static char *sccsid
= "@(#)wwclreol.c 3.1 83/08/09";
* Clear w to the end of line.
* If cleared is true, then the screen line has already been cleared
wwclreol(w
, line
, col
, cleared
)
int row
= line
- w
->ww_scroll
;
int srow
= w
->ww_w
.t
+ row
;
int scol
= w
->ww_w
.l
+ col
;
register union ww_char
*s
, *buf
;
register char *smap
, *win
;
if (row
< 0 || row
>= w
->ww_w
.nr
) {
/* can't even see it, so just clear the buffer */
buf
= &w
->ww_buf
[line
][col
];
for (i
= w
->ww_w
.nc
- col
; --i
>= 0;)
smap
= &wwsmap
[srow
][scol
];
win
= &w
->ww_win
[row
][col
];
buf
= &w
->ww_buf
[row
][col
];
for (i
= w
->ww_w
.nc
- col
; --i
>= 0;) {
if (*smap
++ != w
->ww_index
) {
s
++->c_w
= ' ' | *win
++ << WWC_MSHIFT
;
if (!cleared
&& tt
.tt_clreol
!= 0
&& ncleared
> wwncol
- scol
- nblank
&& nblank
> (wwncol
- scol
) / 2) {
(*tt
.tt_move
)(srow
, scol
);
for (i
= w
->ww_w
.nc
- col
; --i
>= 0;)