aboutsummaryrefslogtreecommitdiff
path: root/payloads/libpayload/curses/PDCurses/pdcurses/move.c
diff options
context:
space:
mode:
authorStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-10 09:00:41 -0800
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-11 21:38:48 +0100
commit4f85a1eb76d1e7109bcc60ba6f3262a5654ac61b (patch)
treee996818c6aa6b6f702a6c805c447c20724eff265 /payloads/libpayload/curses/PDCurses/pdcurses/move.c
parent2ea24dabd658b8396e0abf79318a538ef0f3a5b8 (diff)
libpayload: Rename PDCurses-3.4 to PDCurses
Change-Id: If881ec130833c7e7e62caa3d31e350a531f5bc8e Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/12398 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'payloads/libpayload/curses/PDCurses/pdcurses/move.c')
-rw-r--r--payloads/libpayload/curses/PDCurses/pdcurses/move.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/payloads/libpayload/curses/PDCurses/pdcurses/move.c b/payloads/libpayload/curses/PDCurses/pdcurses/move.c
new file mode 100644
index 0000000000..30e59084e2
--- /dev/null
+++ b/payloads/libpayload/curses/PDCurses/pdcurses/move.c
@@ -0,0 +1,54 @@
+/* Public Domain Curses */
+
+#include <curspriv.h>
+
+RCSID("$Id: move.c,v 1.28 2008/07/13 16:08:18 wmcbrine Exp $")
+
+/*man-start**************************************************************
+
+ Name: move
+
+ Synopsis:
+ int move(int y, int x);
+ int wmove(WINDOW *win, int y, int x);
+
+ Description:
+ The cursor associated with the window is moved to the given
+ location. This does not move the physical cursor of the
+ terminal until refresh() is called. The position specified is
+ relative to the upper left corner of the window, which is (0,0).
+
+ Return Value:
+ All functions return OK on success and ERR on error.
+
+ Portability X/Open BSD SYS V
+ move Y Y Y
+ wmove Y Y Y
+
+**man-end****************************************************************/
+
+int move(int y, int x)
+{
+ PDC_LOG(("move() - called: y=%d x=%d\n", y, x));
+
+ if (!stdscr || x < 0 || y < 0 || x >= stdscr->_maxx || y >= stdscr->_maxy)
+ return ERR;
+
+ stdscr->_curx = x;
+ stdscr->_cury = y;
+
+ return OK;
+}
+
+int wmove(WINDOW *win, int y, int x)
+{
+ PDC_LOG(("wmove() - called: y=%d x=%d\n", y, x));
+
+ if (!win || x < 0 || y < 0 || x >= win->_maxx || y >= win->_maxy)
+ return ERR;
+
+ win->_curx = x;
+ win->_cury = y;
+
+ return OK;
+}