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.12 (Berkeley) 04/13/93"; 10 #endif /* not lint */ 11 12 #include <curses.h> 13 14 /* 15 * wmove -- 16 * Moves the cursor to the given point. 17 */ 18 int 19 wmove(win, y, x) 20 register WINDOW *win; 21 register int y, x; 22 { 23 24 #ifdef DEBUG 25 __TRACE("wmove: (%d, %d)\n", y, x); 26 #endif 27 if (x < 0 || y < 0) 28 return (ERR); 29 if (x >= win->maxx || y >= win->maxy) 30 return (ERR); 31 win->curx = x; 32 win->lines[win->cury]->flags &= ~__ISPASTEOL; 33 win->cury = y; 34 win->lines[y]->flags &= ~__ISPASTEOL; 35 return (OK); 36 } 37