file reorg, pathnames.h, paths.h
[unix-history] / usr / src / usr.bin / window / wwunframe.c
CommitLineData
60de5df9 1/*
46e9ea25
KB
2 * Copyright (c) 1983 Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms are permitted
5e8b0e60
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
60de5df9
EW
16 */
17
46e9ea25 18#ifndef lint
6a1ef78a 19static char sccsid[] = "@(#)wwunframe.c 3.18 (Berkeley) %G%";
46e9ea25
KB
20#endif /* not lint */
21
f50078e9
EW
22#include "ww.h"
23
f50078e9
EW
24wwunframe(w)
25register struct ww *w;
26{
c05972b9 27 int i;
f50078e9 28
f2a77fe1 29 for (i = w->ww_i.t; i < w->ww_i.b; i++) {
c05972b9
EW
30 register j;
31 register char *win = w->ww_win[i];
32 register char *fmap = w->ww_fmap ? w->ww_fmap[i] : 0;
33 register char *smap = wwsmap[i];
6ef62e9e 34 register union ww_char *ns = wwns[i];
04d70db4 35 int nchanged = 0;
9f722fc9 36
c05972b9
EW
37 for (j = w->ww_i.l; j < w->ww_i.r; j++) {
38 if (win[j] & WWM_GLS)
f50078e9 39 continue;
c05972b9
EW
40 win[j] |= WWM_GLS;
41 if (fmap != 0)
42 fmap[j] = 0;
43 if (smap[j] == w->ww_index) {
44 smap[j] = WWX_NOBODY;
45 ns[j].c_w = ' ';
04d70db4 46 nchanged++;
f50078e9 47 }
f50078e9 48 }
6a1ef78a 49 if (nchanged > 0)
04d70db4 50 wwtouched[i] |= WWU_TOUCHED;
f50078e9
EW
51 w->ww_nvis[i] = 0;
52 }
84ad208b 53
c05972b9
EW
54 if (w->ww_forw != &wwhead)
55 wwdelete1(w->ww_forw,
56 w->ww_i.t, w->ww_i.b, w->ww_i.l, w->ww_i.r);
f50078e9 57}