+/* @(#)wwmisc.c 8.1 (Berkeley) 6/6/93 */
+/* $NetBSD: wwmisc.c,v 1.7 2003/08/07 11:17:41 agc Exp $ */
+
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * @(#)wwmisc.c 8.1 (Berkeley) 6/6/93
- * $FreeBSD: src/usr.bin/window/wwmisc.c,v 1.1.1.1.14.1 2001/05/17 09:45:01 obrien Exp $
- * $DragonFly: src/usr.bin/window/wwmisc.c,v 1.2 2003/06/17 04:29:34 dillon Exp $
*/
#include "ww.h"
/*
* Sufficient but not necessary test for total visibility.
*/
-wwvisible(w)
-register struct ww *w;
+int
+wwvisible(struct ww *w)
{
- register i;
- register nvis = 0;
+ int i;
+ int nvis = 0;
for (i = w->ww_i.t; i < w->ww_i.b; i++)
nvis += w->ww_nvis[i];
- if (w->ww_hascursor
+ if (ISSET(w->ww_wflags, WWW_HASCURSOR)
&& w->ww_cur.r >= w->ww_i.t && w->ww_cur.r < w->ww_i.b
&& w->ww_cur.c >= w->ww_i.l && w->ww_cur.c < w->ww_i.r
&& wwsmap[w->ww_cur.r][w->ww_cur.c] == w->ww_index)
return nvis == w->ww_i.nr * w->ww_i.nc;
}
-wwbell()
+void
+wwbell(void)
{
ttputc(ctrl('g'));
}