static char sccsid
[] = "@(#)wwclreol.c 3.14 %G%";
* Copyright (c) 1983 Regents of the University of California,
* All rights reserved. Redistribution permitted subject to
* the terms of the Berkeley Software License Agreement.
* 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
;
win
= &w
->ww_win
[row
][i
];
for (i
= w
->ww_i
.r
- i
; --i
>= 0;) {
if (*smap
++ != w
->ww_index
)
s
++->c_w
= ' ' | *win
++ << WWC_MSHIFT
;
register union ww_char
*s
;
register char *smap
, *win
;
for (; i
< w
->ww_i
.r
; i
++) {
if (*smap
++ != w
->ww_index
) {
} else if (win
[i
] == 0) {
short c
= ' ' | win
[i
] << WWC_MSHIFT
;
for (i
= wwncol
- i
; --i
>= 0;)
wwtouched
[row
] |= WWU_TOUCHED
;
* Can/Should we use clear eol?
if (!cleared
&& tt
.tt_clreol
!= 0 && gain
> 4) {
register union ww_char
*s
;
for (i
= wwncol
- col
; --i
>= 0;)