diff --git a/src/sys/include/ubixos/tty.h b/src/sys/include/ubixos/tty.h index 9192350..94fe09e 100644 --- a/src/sys/include/ubixos/tty.h +++ b/src/sys/include/ubixos/tty.h @@ -41,6 +41,8 @@ uInt16 tty_x; uInt16 tty_y; pidType owner; + char stdin[512]; + int stdinSize; } tty_term; int tty_init(); @@ -54,6 +56,9 @@ /*** $Log$ + Revision 1.7 2004/08/14 11:23:02 reddawg + Changes + Revision 1.6 2004/08/09 12:58:05 reddawg let me know when you got the surce diff --git a/src/sys/isa/atkbd.c b/src/sys/isa/atkbd.c index e31b1c3..f097131 100644 --- a/src/sys/isa/atkbd.c +++ b/src/sys/isa/atkbd.c @@ -258,16 +258,28 @@ switch ((uInt32)keyboardMap[key][keyMap]) { case 8: backSpace(); - stdinBuffer[stdinSize] = keyboardMap[key][keyMap]; - stdinSize++; + if (tty_foreground == 0x0) { + stdinBuffer[stdinSize] = keyboardMap[key][keyMap]; + stdinSize++; + } + else { + tty_foreground->stdin[tty_foreground->stdinSize] = keyboardMap[key][keyMap]; + tty_foreground->stdinSize++; + } break; case 0x3: //endTask(_current->id); //kprintf("CTRL-C pressed\n"); break; default: - stdinBuffer[stdinSize] = keyboardMap[key][keyMap]; - stdinSize++; + if (tty_foreground == 0x0) { + stdinBuffer[stdinSize] = keyboardMap[key][keyMap]; + stdinSize++; + } + else { + tty_foreground->stdin[tty_foreground->stdinSize] = keyboardMap[key][keyMap]; + tty_foreground->stdinSize++; + } break; } } @@ -298,15 +310,27 @@ uInt8 retKey = 0x0; uInt32 i = 0x0; - if (stdinSize == 0x0) - return(0x0); - //while (stdinSize == 0); + if (tty_foreground == 0x0) { + if (stdinSize == 0x0) + return(0x0); - retKey = stdinBuffer[0]; - stdinSize--; + retKey = stdinBuffer[0]; + stdinSize--; - for (i=0x0;istdinSize == 0x0) + return(0x0); + + retKey = tty_foreground->stdin[0]; + tty_foreground->stdinSize--; + + for (i=0x0;istdinSize;i++) { + tty_foreground->stdin[i] = tty_foreground->stdin[i+0x1]; + } } return(retKey); } @@ -314,6 +338,9 @@ /*** $Log$ + Revision 1.24 2004/09/06 15:13:25 reddawg + Last commit before FreeBSD 6.0 + Revision 1.23 2004/08/21 23:47:50 reddawg *** empty log message ***