X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/8077fbbd2c6cfb4f4bc0f3e8f704e6af5942d384..2c872e05abde7665fd7d24427d1317995fe97d2f:/usr.bin/window/wwmisc.c diff --git a/usr.bin/window/wwmisc.c b/usr.bin/window/wwmisc.c index b7db34fd93..d7c3829c54 100644 --- a/usr.bin/window/wwmisc.c +++ b/usr.bin/window/wwmisc.c @@ -1,3 +1,6 @@ +/* @(#)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. @@ -13,11 +16,7 @@ * 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. * @@ -32,10 +31,6 @@ * 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" @@ -45,15 +40,15 @@ /* * 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) @@ -61,7 +56,8 @@ register struct ww *w; return nvis == w->ww_i.nr * w->ww_i.nc; } -wwbell() +void +wwbell(void) { ttputc(ctrl('g')); }