diff options
author | rsc <rsc> | 2007-08-28 18:32:08 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-28 18:32:08 +0000 |
commit | e4d6a21165c01dd743a68e323fb06708ef820ab7 (patch) | |
tree | 3088155cccccdfbed6348199021907587cee15b3 /kbd.c | |
parent | c1b100e93044469de30c634107bc645361cc1a73 (diff) | |
download | xv6-labs-e4d6a21165c01dd743a68e323fb06708ef820ab7.tar.gz xv6-labs-e4d6a21165c01dd743a68e323fb06708ef820ab7.tar.bz2 xv6-labs-e4d6a21165c01dd743a68e323fb06708ef820ab7.zip |
more consistent spacing
Diffstat (limited to 'kbd.c')
-rw-r--r-- | kbd.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -17,15 +17,15 @@ kbd_getc(void) return -1; data = inb(KBDATAP); - if(data == 0xE0) { + if(data == 0xE0){ shift |= E0ESC; return 0; - } else if(data & 0x80) { + }else if(data & 0x80){ // Key released data = (shift & E0ESC ? data : data & 0x7F); shift &= ~(shiftcode[data] | E0ESC); return 0; - } else if(shift & E0ESC) { + }else if(shift & E0ESC){ // Last character was an E0 escape; or with 0x80 data |= 0x80; shift &= ~E0ESC; @@ -34,7 +34,7 @@ kbd_getc(void) shift |= shiftcode[data]; shift ^= togglecode[data]; c = charcode[shift & (CTL | SHIFT)][data]; - if(shift & CAPSLOCK) { + if(shift & CAPSLOCK){ if('a' <= c && c <= 'z') c += 'A' - 'a'; else if('A' <= c && c <= 'Z') |