summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/lib_move.c
blob: e7a28ebb8e4fcda577d2c2f407fd2d25d7ffe76d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for   *
*  details. If they are missing then this copy is in violation of    *
*  the copyright conditions.                                        */

/*
**	lib_move.c
**
**	The routine wmove().
**
*/

#include "curses.priv.h"

int
wmove(WINDOW *win, int y, int x)
{
#ifdef TRACE
	if (_tracing)
	    _tracef("wmove(%x,%d,%d) called", win, y, x);
#endif

	if (x >= 0  &&  x <= win->_maxx  &&
		y >= 0  &&  y <= win->_maxy)
	{
		win->_curx = x;
		win->_cury = y;

		win->_flags |= _HASMOVED;
		return(OK);
	} else
		return(ERR);
}
OpenPOWER on IntegriCloud