xref: /csrg-svn/lib/libcurses/move.c (revision 25110)
122672Sdist /*
222672Sdist  * Copyright (c) 1980 Regents of the University of California.
322672Sdist  * All rights reserved.  The Berkeley software License Agreement
422672Sdist  * specifies the terms and conditions for redistribution.
522672Sdist  */
622672Sdist 
722672Sdist #ifndef lint
8*25110Sbloom static char sccsid[] = "@(#)move.c	5.2 (Berkeley) 10/08/85";
922672Sdist #endif not lint
1022672Sdist 
1111739Sarnold # include	"curses.ext"
1211739Sarnold 
1311739Sarnold /*
1411739Sarnold  *	This routine moves the cursor to the given point
1511739Sarnold  *
1611739Sarnold  */
1711739Sarnold wmove(win, y, x)
1811739Sarnold reg WINDOW	*win;
1911739Sarnold reg int		y, x; {
2011739Sarnold 
2111739Sarnold # ifdef DEBUG
2211739Sarnold 	fprintf(outf, "MOVE to (%d, %d)\n", y, x);
2311739Sarnold # endif
24*25110Sbloom 	if (x < 0 || y < 0)
25*25110Sbloom 		return ERR;
2611739Sarnold 	if (x >= win->_maxx || y >= win->_maxy)
2711739Sarnold 		return ERR;
2811739Sarnold 	win->_curx = x;
2911739Sarnold 	win->_cury = y;
3011739Sarnold 	return OK;
3111739Sarnold }
32