* Copyright (c) 1983 Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Edward Wang at The University of California, Berkeley.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)wwclreol.c 3.20 (Berkeley) %G%";
* 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
)
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
;
wwtouched
[row
] |= WWU_TOUCHED
;