xref: /original-bsd/usr.bin/window/wwflush.c (revision 30e23803)
1 /*
2  * Copyright (c) 1983 Regents of the University of California.
3  * All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Edward Wang at The University of California, Berkeley.
7  *
8  * %sccs.include.redist.c%
9  */
10 
11 #ifndef lint
12 static char sccsid[] = "@(#)wwflush.c	3.12 (Berkeley) 06/06/90";
13 #endif /* not lint */
14 
15 #include "ww.h"
16 #include "tt.h"
17 
18 wwflush()
19 {
20 	register row, col;
21 
22 	if ((row = wwcursorrow) < 0)
23 		row = 0;
24 	else if (row >= wwnrow)
25 		row = wwnrow - 1;
26 	if ((col = wwcursorcol) < 0)
27 		col = 0;
28 	else if (col >= wwncol)
29 		col = wwncol - 1;
30 	xxmove(row, col);
31 	xxflush(1);
32 }
33