xref: /original-bsd/lib/libcurses/move.c (revision f0203ecd)
1 /*
2  * Copyright (c) 1981 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  */
7 
8 #ifndef lint
9 static char sccsid[] = "@(#)move.c	5.5 (Berkeley) 06/01/90";
10 #endif /* not lint */
11 
12 # include	"curses.ext"
13 
14 /*
15  *	This routine moves the cursor to the given point
16  *
17  */
18 wmove(win, y, x)
19 reg WINDOW	*win;
20 reg int		y, x; {
21 
22 # ifdef DEBUG
23 	fprintf(outf, "MOVE to (%d, %d)\n", y, x);
24 # endif
25 	if (x < 0 || y < 0)
26 		return ERR;
27 	if (x >= win->_maxx || y >= win->_maxy)
28 		return ERR;
29 	win->_curx = x;
30 	win->_cury = y;
31 	return OK;
32 }
33