source: trunk/minix/lib/curses/wgetch.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: 516 bytes
Line 
1#include <curses.h>
2#include <stdio.h>
3#include "curspriv.h"
4
5int wgetch(win)
6WINDOW *win;
7{
8 bool weset = FALSE;
9 char inp;
10
11 if (!win->_scroll && (win->_flags & _FULLWIN)
12 && win->_curx == win->_maxx - 1 && win->_cury == win->_maxy - 1)
13 return ERR;
14 if (_cursvar.echoit && !_cursvar.rawmode) {
15 cbreak();
16 weset++;
17 }
18 inp = getchar();
19 if (_cursvar.echoit) {
20 mvwaddch(curscr, win->_cury + win->_begy,
21 win->_curx + win->_begx, inp);
22 waddch(win, inp);
23 }
24 if (weset) nocbreak();
25 return inp;
26}
Note: See TracBrowser for help on using the repository browser.