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*59061Selan static char sccsid[] = "@(#)move.c 5.12 (Berkeley) 04/13/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) 2857472Sbostic return (ERR); 2956238Selan if (x >= win->maxx || y >= win->maxy) 3057472Sbostic return (ERR); 3156238Selan win->curx = x; 32*59061Selan win->lines[win->cury]->flags &= ~__ISPASTEOL; 3356238Selan win->cury = y; 3456296Selan win->lines[y]->flags &= ~__ISPASTEOL; 3557472Sbostic return (OK); 3611739Sarnold } 37