static char sccsid
[] = "@(#)wwupdate.c 3.17 %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.
register union ww_char
*ns
, *os
;
for (i
= top
, touched
= &wwtouched
[i
]; i
< bot
&& !wwinterrupt();
if (*touched
& WWU_MAJOR
&& tt
.tt_clreol
!= 0) {
* The cost of clearing is:
* The cost of straight update is:
* We clear if: nblank - nsame > X
* X is the clreol overhead.
* So we make gain = nblank - nsame.
if ((--ns
)->c_w
== (--os
)->c_w
)
for (j
= wwncol
- best
, os
= &wwos
[i
][best
];
for (j
= 0; j
< wwncol
;) {
char buf
[512]; /* > wwncol */
for (; j
++ < wwncol
&& ns
++->c_w
== os
++->c_w
;)
while (j
< wwncol
&& ns
->c_m
== m
) {
if (ns
->c_w
== os
->c_w
) {
&& i
== wwnrow
- 1 && q
- buf
+ c
== wwncol
) {
tt
.tt_nmodes
= ns
[-2].c_m
;
(*tt
.tt_write
)(&ns
[-2].c_c
, 1);
(*tt
.tt_write
)(buf
, q
-buf
-1);
(*tt
.tt_write
)(buf
, q
- buf
);