Now basically functioning on ANSI-supporting consoles.

This commit is contained in:
Michael Brown
2006-12-19 00:27:25 +00:00
parent 09f9142cbf
commit edbdce6e3d
8 changed files with 215 additions and 95 deletions

View File

@@ -1,7 +1,6 @@
#include <curses.h>
#include <stddef.h>
#include <timer.h>
#include <console.h>
#include "mucurses.h"
/** @file
@@ -38,7 +37,7 @@ int _wgetc ( WINDOW *win ) {
return ERR;
timer = INPUT_DELAY_TIMEOUT;
while ( ! iskey() ) {
while ( ! win->scr->peek( win->scr ) ) {
if ( m_delay == 0 ) // non-blocking read
return ERR;
if ( timer > 0 ) { // time-limited blocking read
@@ -48,7 +47,7 @@ int _wgetc ( WINDOW *win ) {
} else { return ERR; } // non-blocking read
}
c = getchar();
c = win->scr->getc( win->scr );
if ( m_echo && ( c >= 32 && c <= 126 ) ) // printable ASCII characters
_wputch( win, (chtype) ( c | win->attrs ), WRAP );