static char *sccsid
= "@(#)wwclreol.c 3.9 83/09/15";
* Clear w to the end of line.
* If cleared is true, then the screen line has already been cleared
wwclreol1(w
, row
, col
, cleared
)
* Clear the buffer right off
register union ww_char
*buf
;
buf
= &w
->ww_buf
[row
][col
];
for (i
= w
->ww_b
.r
- col
; --i
>= 0;)
* If can't see it, just return.
if (row
< w
->ww_i
.t
|| row
>= w
->ww_i
.b
|| w
->ww_i
.r
<= 0 || w
->ww_i
.r
<= col
)
* Now find out how much is actually cleared, and fix wwns.
register union ww_char
*s
;
register char *smap
, *win
;
smap
= &wwsmap
[row
][col
];
touched
= &wwtouched
[row
];
win
= &w
->ww_win
[row
][col
];
for (i
= w
->ww_i
.r
- col
; --i
>= 0;) {
if (*smap
++ != w
->ww_index
) {
s
++->c_w
= ' ' | *win
++ << WWC_MSHIFT
;
* Can/Should we use clear eol?
if (!cleared
&& tt
.tt_clreol
!= 0
&& ncleared
> wwncol
- col
- nblank
&& nblank
> (wwncol
- col
) / 2) {
register union ww_char
*s
;
for (i
= wwncol
- col
; --i
>= 0;)