diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-06-07 11:43:58 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-06-07 11:43:58 +0200 |
commit | bc951ca565d137b2d1bd158e5473bd42cf568d10 (patch) | |
tree | d726fbd8f661b52a7c3d549a5f08f98e0443ca0c /Kernel/TTY/VirtualConsole.cpp | |
parent | 98eeb8f22df509b2a711de0e4a01660b6646f229 (diff) | |
download | serenity-bc951ca565d137b2d1bd158e5473bd42cf568d10.zip |
Kernel: Run clang-format on everything.
Diffstat (limited to 'Kernel/TTY/VirtualConsole.cpp')
-rw-r--r-- | Kernel/TTY/VirtualConsole.cpp | 89 |
1 files changed, 61 insertions, 28 deletions
diff --git a/Kernel/TTY/VirtualConsole.cpp b/Kernel/TTY/VirtualConsole.cpp index c4e3f9eb1a..8a8a28ac04 100644 --- a/Kernel/TTY/VirtualConsole.cpp +++ b/Kernel/TTY/VirtualConsole.cpp @@ -1,8 +1,8 @@ #include "VirtualConsole.h" -#include "kmalloc.h" -#include "i386.h" #include "IO.h" #include "StdLib.h" +#include "i386.h" +#include "kmalloc.h" #include <AK/AKString.h> static byte* s_vga_buffer; @@ -128,7 +128,8 @@ inline bool is_valid_final_character(byte ch) return ch >= 0x40 && ch <= 0x7e; } -enum class VGAColor : byte { +enum class VGAColor : byte +{ Black = 0, Blue, Green, @@ -147,7 +148,8 @@ enum class VGAColor : byte { White, }; -enum class ANSIColor : byte { +enum class ANSIColor : byte +{ Black = 0, Red, Green, @@ -169,22 +171,38 @@ enum class ANSIColor : byte { static inline VGAColor ansi_color_to_vga(ANSIColor color) { switch (color) { - case ANSIColor::Black: return VGAColor::Black; - case ANSIColor::Red: return VGAColor::Red; - case ANSIColor::Brown: return VGAColor::Brown; - case ANSIColor::Blue: return VGAColor::Blue; - case ANSIColor::Magenta: return VGAColor::Magenta; - case ANSIColor::Green: return VGAColor::Green; - case ANSIColor::Cyan: return VGAColor::Cyan; - case ANSIColor::LightGray: return VGAColor::LightGray; - case ANSIColor::DarkGray: return VGAColor::DarkGray; - case ANSIColor::BrightRed: return VGAColor::BrightRed; - case ANSIColor::BrightGreen: return VGAColor::BrightGreen; - case ANSIColor::Yellow: return VGAColor::Yellow; - case ANSIColor::BrightBlue: return VGAColor::BrightBlue; - case ANSIColor::BrightMagenta: return VGAColor::BrightMagenta; - case ANSIColor::BrightCyan: return VGAColor::BrightCyan; - case ANSIColor::White: return VGAColor::White; + case ANSIColor::Black: + return VGAColor::Black; + case ANSIColor::Red: + return VGAColor::Red; + case ANSIColor::Brown: + return VGAColor::Brown; + case ANSIColor::Blue: + return VGAColor::Blue; + case ANSIColor::Magenta: + return VGAColor::Magenta; + case ANSIColor::Green: + return VGAColor::Green; + case ANSIColor::Cyan: + return VGAColor::Cyan; + case ANSIColor::LightGray: + return VGAColor::LightGray; + case ANSIColor::DarkGray: + return VGAColor::DarkGray; + case ANSIColor::BrightRed: + return VGAColor::BrightRed; + case ANSIColor::BrightGreen: + return VGAColor::BrightGreen; + case ANSIColor::Yellow: + return VGAColor::Yellow; + case ANSIColor::BrightBlue: + return VGAColor::BrightBlue; + case ANSIColor::BrightMagenta: + return VGAColor::BrightMagenta; + case ANSIColor::BrightCyan: + return VGAColor::BrightCyan; + case ANSIColor::White: + return VGAColor::White; } ASSERT_NOT_REACHED(); return VGAColor::LightGray; @@ -317,14 +335,29 @@ void VirtualConsole::execute_escape_sequence(byte final) params.append(value); } switch (final) { - case 'A': escape$A(params); break; - case 'D': escape$D(params); break; - case 'H': escape$H(params); break; - case 'J': escape$J(params); break; - case 'm': escape$m(params); break; - case 's': escape$s(params); break; - case 'u': escape$u(params); break; - default: break; + case 'A': + escape$A(params); + break; + case 'D': + escape$D(params); + break; + case 'H': + escape$H(params); + break; + case 'J': + escape$J(params); + break; + case 'm': + escape$m(params); + break; + case 's': + escape$s(params); + break; + case 'u': + escape$u(params); + break; + default: + break; } m_parameters.clear(); |