/* PDCurses */12#include <curspriv.h>34/*man-start**************************************************************56move7----89### Synopsis1011int move(int y, int x);12int mvcur(int oldrow, int oldcol, int newrow, int newcol);13int wmove(WINDOW *win, int y, int x);1415### Description1617move() and wmove() move the cursor associated with the window to the18given location. This does not move the physical cursor of the19terminal until refresh() is called. The position specified is20relative to the upper left corner of the window, which is (0,0).2122mvcur() moves the physical cursor without updating any window cursor23positions.2425### Return Value2627All functions return OK on success and ERR on error.2829### Portability30X/Open ncurses NetBSD31move Y Y Y32mvcur Y Y Y33wmove Y Y Y3435**man-end****************************************************************/3637int move(int y, int x)38{39PDC_LOG(("move() - called: y=%d x=%d\n", y, x));4041if (!stdscr || x < 0 || y < 0 || x >= stdscr->_maxx || y >= stdscr->_maxy)42return ERR;4344stdscr->_curx = x;45stdscr->_cury = y;4647return OK;48}4950int mvcur(int oldrow, int oldcol, int newrow, int newcol)51{52PDC_LOG(("mvcur() - called: oldrow %d oldcol %d newrow %d newcol %d\n",53oldrow, oldcol, newrow, newcol));5455if (!SP || newrow < 0 || newrow >= LINES || newcol < 0 || newcol >= COLS)56return ERR;5758PDC_gotoyx(newrow, newcol);59SP->cursrow = newrow;60SP->curscol = newcol;6162return OK;63}6465int wmove(WINDOW *win, int y, int x)66{67PDC_LOG(("wmove() - called: y=%d x=%d\n", y, x));6869if (!win || x < 0 || y < 0 || x >= win->_maxx || y >= win->_maxy)70return ERR;7172win->_curx = x;73win->_cury = y;7475return OK;76}777879