removed support for -r, -h, and rmail
[unix-history] / usr / src / usr.bin / window / wwredrawwin.c
/*
* Copyright (c) 1983 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
*/
#ifndef lint
static char sccsid[] = "@(#)wwredrawwin.c 3.12 (Berkeley) %G%";
#endif /* not lint */
#include "ww.h"
wwredrawwin1(w, row1, row2, offset)
register struct ww *w;
int row1, row2, offset;
{
int row;
register col;
register char *smap;
register union ww_char *buf;
register char *win;
register union ww_char *ns;
int x;
int nchanged;
for (row = row1; row < row2; row++) {
col = w->ww_i.l;
ns = wwns[row];
smap = &wwsmap[row][col];
buf = w->ww_buf[row + offset];
win = w->ww_win[row];
nchanged = 0;
for (; col < w->ww_i.r; col++)
if (*smap++ == w->ww_index &&
ns[col].c_w !=
(x = buf[col].c_w ^ win[col] << WWC_MSHIFT)) {
nchanged++;
ns[col].c_w = x;
}
if (nchanged > 4)
wwtouched[row] |= WWU_MAJOR|WWU_TOUCHED;
else if (nchanged > 0)
wwtouched[row] |= WWU_TOUCHED;
}
}