summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <[email protected]>2010-09-02 18:54:50 -0400
committerAustin Clements <[email protected]>2010-09-02 18:54:50 -0400
commit8440dbfee13a5c728c5060af515f9273889a4679 (patch)
tree778ec51dbf50d996213ec13f55ae87d15289c639
parent08eef9eae5989d3a709588352e228041e62e2c2c (diff)
downloadxv6-labs-8440dbfee13a5c728c5060af515f9273889a4679.tar.gz
xv6-labs-8440dbfee13a5c728c5060af515f9273889a4679.tar.bz2
xv6-labs-8440dbfee13a5c728c5060af515f9273889a4679.zip
Get consoleintr back on one page
-rw-r--r--console.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/console.c b/console.c
index e7ed248..19b3296 100644
--- a/console.c
+++ b/console.c
@@ -198,8 +198,7 @@ consoleintr(int (*getc)(void))
consputc(BACKSPACE);
}
break;
- case C('H'): // Backspace
- case '\x7f':
+ case C('H'): case '\x7f': // Backspace
if(input.e != input.w){
input.e--;
consputc(BACKSPACE);
@@ -207,9 +206,7 @@ consoleintr(int (*getc)(void))
break;
default:
if(c != 0 && input.e-input.r < INPUT_BUF){
- // The serial port produces 0x13, not 0x10
- if(c == '\r')
- c = '\n';
+ c = (c == '\r') ? '\n' : c;
input.buf[input.e++ % INPUT_BUF] = c;
consputc(c);
if(c == '\n' || c == C('D') || input.e == input.r+INPUT_BUF){