mirror of https://github.com/ipxe/ipxe.git
- works with test ansi tty, but will need a rethink when we start
getting key_ codes insteadpull/1/head
parent
f78fa3c59d
commit
11e280670d
|
@ -94,7 +94,8 @@ int wgetnstr ( WINDOW *win, char *str, int n ) {
|
||||||
|
|
||||||
_str = str;
|
_str = str;
|
||||||
|
|
||||||
while ( ( ( c = wgetch( win ) ) != '\n' ) && !( n == 0 ) ) {
|
while (!( n == 0 ) ) {
|
||||||
|
c = wgetch( win );
|
||||||
if ( c >= 0401 && c <= 0633 ) {
|
if ( c >= 0401 && c <= 0633 ) {
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case KEY_LEFT :
|
case KEY_LEFT :
|
||||||
|
@ -107,6 +108,9 @@ int wgetnstr ( WINDOW *win, char *str, int n ) {
|
||||||
*_str = '\0';
|
*_str = '\0';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if ( c == '\n' ) {
|
||||||
|
*_str = '\0';
|
||||||
|
break;
|
||||||
}else { // *should* only be ASCII chars now
|
}else { // *should* only be ASCII chars now
|
||||||
*(_str++) = (char)c;
|
*(_str++) = (char)c;
|
||||||
n--;
|
n--;
|
||||||
|
|
Loading…
Reference in New Issue