From 923703edeea3d669af6b1803b1f4093d480a8d37 Mon Sep 17 00:00:00 2001 From: Julian Barathieu Date: Sat, 18 May 2019 22:58:30 +0200 Subject: [PATCH] colors --- kaleid/kernel/init/init.c | 5 +++-- kaleid/kernel/sh/shell.c | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 3f5c0a4..57fe9d8 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -43,7 +43,8 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) IoEnableCursor(); IoUpdateCursor(0, 0); - KernLog("%c%c%c OS/K\n\n", 219, 219, 219); + KernLog("%C%c%c%c OS/K%C\n\n", VGA_COLOR_WHITE, + 219, 219, 219, VGA_COLOR_LIGHT_GREY); // Sanity checks BtDoSanityChecks(mbMagic); @@ -63,7 +64,7 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) IoEnableKeyb(); MmActivatePageHandler(); - KernLog("%CThis %Cis %Ca %CColor %Ctest%C...%C\n", + KernLog("\n%CThis %Cis %Ca %CColor %Ctest%C...%C\n", VGA_COLOR_LIGHT_BLUE, VGA_COLOR_BROWN, VGA_COLOR_MAGENTA, diff --git a/kaleid/kernel/sh/shell.c b/kaleid/kernel/sh/shell.c index f499fe1..e37c31b 100644 --- a/kaleid/kernel/sh/shell.c +++ b/kaleid/kernel/sh/shell.c @@ -71,7 +71,7 @@ void KeStartShell(void) memzero(argvbuf, ARG_MAX * 2); shargv = (char **)argvbuf; - KernLog("\n%Cshell> ", shcol); + KernLog("\n%Cshell> %C", VGA_COLOR_WHITE, shcol); BFlushBuf(BStdOut); while ((rc = BGetFromBuf(BStdIn, &ch)) == EOK || rc == EENDF) { @@ -84,7 +84,7 @@ void KeStartShell(void) memzero(cmdbuf, CMDBUFSIZE); BFlushBuf(BStdIn); - KernLog("%Cshell> ", shcol); + KernLog("%Cshell> %C", VGA_COLOR_WHITE, shcol); BFlushBuf(BStdOut); } else break; @@ -135,7 +135,7 @@ void KeStartShell(void) ExecuteCommand(cmdbuf); memzero(cmdbuf, CMDBUFSIZE); - KernLog("%Cshell> ", shcol); + KernLog("%Cshell> %C", VGA_COLOR_WHITE, shcol); BFlushBuf(BStdIn); BFlushBuf(BStdOut); break;