diff options
author | Michael Brown <mcb30@etherboot.org> | 2006-12-18 20:46:41 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2006-12-18 20:46:41 +0000 |
commit | ba26defa6e6bd87546708c7a7e66d9a12f2d0a02 (patch) | |
tree | 66c694bb96a53d840d1118d9691cb92a9a80c1d2 /src/hci/mucurses/cursor.h | |
parent | 56970053f4f5294a0fc55400cd732f6ae91efa80 (diff) | |
download | ipxe-ba26defa6e6bd87546708c7a7e66d9a12f2d0a02.tar.gz |
Convert _{store,restore}_cursor_pos to static inlines.
Diffstat (limited to 'src/hci/mucurses/cursor.h')
-rw-r--r-- | src/hci/mucurses/cursor.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/hci/mucurses/cursor.h b/src/hci/mucurses/cursor.h index 72c6d0382..af86519ca 100644 --- a/src/hci/mucurses/cursor.h +++ b/src/hci/mucurses/cursor.h @@ -11,7 +11,25 @@ struct cursor_pos { unsigned int y, x; }; -void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ); -void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ); +/** + * Restore cursor position from encoded backup variable + * + * @v *win window on which to operate + * @v *pos pointer to struct in which original cursor position is stored + */ +static inline void _restore_curs_pos ( WINDOW *win, struct cursor_pos *pos ) { + wmove ( win, pos->y, pos->x ); +} + +/** + * Store cursor position for later restoration + * + * @v *win window on which to operate + * @v *pos pointer to struct in which to store cursor position + */ +static inline void _store_curs_pos ( WINDOW *win, struct cursor_pos *pos ) { + pos->y = win->curs_y; + pos->x = win->curs_x; +} #endif /* CURSOR_H */ |