minix/lib/curses/charpick.c
Kees van Reeuwijk c43cdf06f8 Removed some uses of uninitialized variables in update.c, presumably remnands of old color support.
Fixed a few cases where free-ed memory blocks were subsequently read.
Removed some unused variables, #includes, other small cleanup.
2010-01-21 22:36:15 +00:00

40 lines
1.1 KiB
C

#include <curses.h>
/****************************************************************/
/* Winch(win) returns the character at the current position in */
/* Window 'win'. */
/****************************************************************/
int winch(win)
WINDOW *win;
{
return((win->_line[win->_cury][win->_curx]) & 0xff);
} /* winch */
/****************************************************************/
/* Mvinch() moves the stdscr cursor to a new position, then */
/* Returns the character at that position. */
/****************************************************************/
int mvinch(y, x)
int y;
int x;
{
if (wmove(stdscr, y, x) == ERR) return(ERR);
return((stdscr->_line[stdscr->_cury][stdscr->_curx]) & 0xff);
}
/****************************************************************/
/* Mvwinch() moves the cursor of window 'win' to a new posi- */
/* Tion, then returns the character at that position. */
/****************************************************************/
int mvwinch(win, y, x)
WINDOW *win;
int y;
int x;
{
if (wmove(win, y, x) == ERR) return(ERR);
return((win->_line[win->_cury][win->_curx]) & 0xff);
}