summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2016-08-25 09:13:00 -0400
committerFrans Kaashoek <[email protected]>2016-08-25 09:13:00 -0400
commit7894fcd21732dd2ddfbb9beca52d037a62ed11f4 (patch)
treeeabcfc4f08613dcf7c35e58d9425f02c4c65224f /console.c
parent6de6a3c952dc8786619bd052e26e6bc1c97be2e6 (diff)
downloadxv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.tar.gz
xv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.tar.bz2
xv6-labs-7894fcd21732dd2ddfbb9beca52d037a62ed11f4.zip
Remove trailing white space with:
for f in *.{h,c}; do sed -i .sed 's/[[:blank:]]*$//' $f; done (Thanks to Nicolás Wolovick)
Diffstat (limited to 'console.c')
-rw-r--r--console.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/console.c b/console.c
index 35f221d..298a6e7 100644
--- a/console.c
+++ b/console.c
@@ -107,7 +107,7 @@ panic(char *s)
{
int i;
uint pcs[10];
-
+
cli();
cons.locking = 0;
cprintf("cpu%d: panic: ", cpu->id);
@@ -130,7 +130,7 @@ static void
cgaputc(int c)
{
int pos;
-
+
// Cursor position: col + 80*row.
outb(CRTPORT, 14);
pos = inb(CRTPORT+1) << 8;
@@ -146,13 +146,13 @@ cgaputc(int c)
if(pos < 0 || pos > 25*80)
panic("pos under/overflow");
-
+
if((pos/80) >= 24){ // Scroll up.
memmove(crt, crt+80, sizeof(crt[0])*23*80);
pos -= 80;
memset(crt+pos, 0, sizeof(crt[0])*(24*80 - pos));
}
-
+
outb(CRTPORT, 14);
outb(CRTPORT+1, pos>>8);
outb(CRTPORT, 15);