113926Sedward #ifndef lint 2*33248Sbostic static char sccsid[] = "@(#)wwmisc.c 3.10 01/03/88"; 313926Sedward #endif 413926Sedward 518727Sedward /* 618727Sedward * Copyright (c) 1983 Regents of the University of California, 718727Sedward * All rights reserved. Redistribution permitted subject to 818727Sedward * the terms of the Berkeley Software License Agreement. 918727Sedward */ 1018727Sedward 1113926Sedward #include "ww.h" 1216322Sedward #include "tt.h" 1316322Sedward #include "char.h" 1413926Sedward 1514896Sedward /* 1614986Sedward * Sufficient but not necessary test for total visibility. 1714896Sedward */ 1814896Sedward wwvisible(w) 1914896Sedward register struct ww *w; 2014896Sedward { 2114896Sedward register i; 2214896Sedward register nvis = 0; 2314896Sedward 2414986Sedward for (i = w->ww_i.t; i < w->ww_i.b; i++) 2514896Sedward nvis += w->ww_nvis[i]; 2614986Sedward if (w->ww_hascursor 2715656Sedward && w->ww_cur.r >= w->ww_i.t && w->ww_cur.r < w->ww_i.b 2814986Sedward && w->ww_cur.c >= w->ww_i.l && w->ww_cur.c < w->ww_i.r 2914986Sedward && wwsmap[w->ww_cur.r][w->ww_cur.c] == w->ww_index) 3014896Sedward nvis++; 3114986Sedward return nvis == w->ww_i.nr * w->ww_i.nc; 3214896Sedward } 3316322Sedward 3416322Sedward wwbell() 3516322Sedward { 36*33248Sbostic ttputc(ctrl('g')); 3716322Sedward } 38