| 1 |
|
| 2 |
|
| 3 |
#include <curspriv.h> |
| 4 |
|
| 5 |
RCSID("$Id: move.c,v 1.28 2008/07/13 16:08:18 wmcbrine Exp $") |
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
int move(int y, int x) |
| 31 |
{ |
| 32 |
PDC_LOG(("move() - called: y=%d x=%d\n", y, x)); |
| 33 |
|
| 34 |
if (!stdscr || x < 0 || y < 0 || x >= stdscr->_maxx || y >= stdscr->_maxy) |
| 35 |
return ERR; |
| 36 |
|
| 37 |
stdscr->_curx = x; |
| 38 |
stdscr->_cury = y; |
| 39 |
|
| 40 |
return OK; |
| 41 |
} |
| 42 |
|
| 43 |
int wmove(WINDOW *win, int y, int x) |
| 44 |
{ |
| 45 |
PDC_LOG(("wmove() - called: y=%d x=%d\n", y, x)); |
| 46 |
|
| 47 |
if (!win || x < 0 || y < 0 || x >= win->_maxx || y >= win->_maxy) |
| 48 |
return ERR; |
| 49 |
|
| 50 |
win->_curx = x; |
| 51 |
win->_cury = y; |
| 52 |
|
| 53 |
return OK; |
| 54 |
} |