Commit | Line | Data |
---|---|---|
8584be19 | 1 | #ifndef lint |
7edc52ec | 2 | static char sccsid[] = "@(#)wwmisc.c 3.8 %G%"; |
8584be19 EW |
3 | #endif |
4 | ||
5 | #include "ww.h" | |
e85b5833 EW |
6 | #include "tt.h" |
7 | #include "char.h" | |
8584be19 | 8 | |
27b31336 | 9 | /* |
f2a77fe1 | 10 | * Sufficient but not necessary test for total visibility. |
27b31336 EW |
11 | */ |
12 | wwvisible(w) | |
13 | register struct ww *w; | |
14 | { | |
15 | register i; | |
16 | register nvis = 0; | |
17 | ||
f2a77fe1 | 18 | for (i = w->ww_i.t; i < w->ww_i.b; i++) |
27b31336 | 19 | nvis += w->ww_nvis[i]; |
f2a77fe1 | 20 | if (w->ww_hascursor |
e011d63a | 21 | && w->ww_cur.r >= w->ww_i.t && w->ww_cur.r < w->ww_i.b |
f2a77fe1 EW |
22 | && w->ww_cur.c >= w->ww_i.l && w->ww_cur.c < w->ww_i.r |
23 | && wwsmap[w->ww_cur.r][w->ww_cur.c] == w->ww_index) | |
27b31336 | 24 | nvis++; |
f2a77fe1 | 25 | return nvis == w->ww_i.nr * w->ww_i.nc; |
27b31336 | 26 | } |
e85b5833 EW |
27 | |
28 | wwbell() | |
29 | { | |
30 | ttputc(ctrl(g)); | |
31 | } |