source: trunk/minix/lib/curses/charpick.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.1 KB
RevLine 
[9]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
9int winch(win)
10WINDOW *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
20int mvinch(y, x)
21int y;
22int 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
33int mvwinch(win, y, x)
34WINDOW *win;
35int y;
36int 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.