Line | |
---|
1 | #include <curses.h>
|
---|
2 | #include "curspriv.h"
|
---|
3 |
|
---|
4 | /****************************************************************/
|
---|
5 | /* Winch(win) returns the character at the current position in */
|
---|
6 | /* Window 'win'. */
|
---|
7 | /****************************************************************/
|
---|
8 |
|
---|
9 | int winch(win)
|
---|
10 | WINDOW *win;
|
---|
11 | {
|
---|
12 | return((win->_line[win->_cury][win->_curx]) & 0xff);
|
---|
13 | } /* winch */
|
---|
14 |
|
---|
15 | /****************************************************************/
|
---|
16 | /* Mvinch() moves the stdscr cursor to a new position, then */
|
---|
17 | /* Returns the character at that position. */
|
---|
18 | /****************************************************************/
|
---|
19 |
|
---|
20 | int mvinch(y, x)
|
---|
21 | int y;
|
---|
22 | int x;
|
---|
23 | {
|
---|
24 | if (wmove(stdscr, y, x) == ERR) return(ERR);
|
---|
25 | return((stdscr->_line[stdscr->_cury][stdscr->_curx]) & 0xff);
|
---|
26 | }
|
---|
27 |
|
---|
28 | /****************************************************************/
|
---|
29 | /* Mvwinch() moves the cursor of window 'win' to a new posi- */
|
---|
30 | /* Tion, then returns the character at that position. */
|
---|
31 | /****************************************************************/
|
---|
32 |
|
---|
33 | int mvwinch(win, y, x)
|
---|
34 | WINDOW *win;
|
---|
35 | int y;
|
---|
36 | int x;
|
---|
37 | {
|
---|
38 | if (wmove(win, y, x) == ERR) return(ERR);
|
---|
39 | return((win->_line[win->_cury][win->_curx]) & 0xff);
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.