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