panic() cleanup.
[minix.git] / lib / libcurses / charpick.c
blob4b464a38229301538719327c0294443bceed8fe1
1 #include <curses.h>
3 /****************************************************************/
4 /* Winch(win) returns the character at the current position in */
5 /* Window 'win'. */
6 /****************************************************************/
8 int winch(win)
9 WINDOW *win;
11 return((win->_line[win->_cury][win->_curx]) & 0xff);
12 } /* winch */
14 /****************************************************************/
15 /* Mvinch() moves the stdscr cursor to a new position, then */
16 /* Returns the character at that position. */
17 /****************************************************************/
19 int mvinch(y, x)
20 int y;
21 int x;
23 if (wmove(stdscr, y, x) == ERR) return(ERR);
24 return((stdscr->_line[stdscr->_cury][stdscr->_curx]) & 0xff);
27 /****************************************************************/
28 /* Mvwinch() moves the cursor of window 'win' to a new posi- */
29 /* Tion, then returns the character at that position. */
30 /****************************************************************/
32 int mvwinch(win, y, x)
33 WINDOW *win;
34 int y;
35 int x;
37 if (wmove(win, y, x) == ERR) return(ERR);
38 return((win->_line[win->_cury][win->_curx]) & 0xff);