#include <curses.h>
#include <stddef.h>
#include <timer.h>
+#include <console.h>
#include "core.h"
/** @file
return ERR;
timer = INPUT_DELAY_TIMEOUT;
- while ( ! win->scr->peek( win->scr ) ) {
+ while ( ! iskey() ) {
if ( m_delay == 0 ) // non-blocking read
return ERR;
if ( timer > 0 ) { // time-limited blocking read
} else { return ERR; } // non-blocking read
}
- c = win->scr->getc( win->scr );
+ c = getchar();
if ( m_echo && ( c >= 32 && c <= 126 ) ) // printable ASCII characters
_wputch( win, (chtype) ( c | win->attrs ), WRAP );
* @v c character to be written
*/
void ( * putc ) ( struct _curses_screen *scr, chtype c );
- /**
- * Pop a character from the keyboard input stream
- *
- * @v scr screen on which to operate
- * @ret c popped character
- */
- int ( * getc ) ( struct _curses_screen *scr );
- /**
- * Checks to see whether a character is waiting in the input stream
- *
- * @v scr screen on which to operate
- * @ret TRUE character waiting in stream
- * @ret FALSE no character waiting in stream
- */
- bool ( *peek ) ( struct _curses_screen *scr );
} SCREEN;
/** Curses Window struct */