122672Sdist /* 234677Sbostic * Copyright (c) 1981 Regents of the University of California. 334677Sbostic * All rights reserved. 434677Sbostic * 542653Sbostic * %sccs.include.redist.c% 622672Sdist */ 722672Sdist 822672Sdist #ifndef lint 9*57472Sbostic static char sccsid[] = "@(#)move.c 5.11 (Berkeley) 01/11/93"; 1055967Sbostic #endif /* not lint */ 1122672Sdist 1255967Sbostic #include <curses.h> 1311739Sarnold 1411739Sarnold /* 1555967Sbostic * wmove -- 1655967Sbostic * Moves the cursor to the given point. 1711739Sarnold */ 1855967Sbostic int 1911739Sarnold wmove(win, y, x) 2055967Sbostic register WINDOW *win; 2155967Sbostic register int y, x; 2255967Sbostic { 2311739Sarnold 2455967Sbostic #ifdef DEBUG 2555967Sbostic __TRACE("wmove: (%d, %d)\n", y, x); 2655967Sbostic #endif 2725110Sbloom if (x < 0 || y < 0) 28*57472Sbostic return (ERR); 2956238Selan if (x >= win->maxx || y >= win->maxy) 30*57472Sbostic return (ERR); 3156238Selan win->curx = x; 3256238Selan win->cury = y; 3356296Selan win->lines[y]->flags &= ~__ISPASTEOL; 34*57472Sbostic return (OK); 3511739Sarnold } 36