From 7d6f0ed063790042a808f4bf07c50d308b3f2de4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 16 Jan 2026 13:36:38 +0100 Subject: chore: restructure namespaces --- arch/x86_64/src/vga/text/buffer.cpp | 8 ++++---- arch/x86_64/src/vga/text/device.cpp | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'arch/x86_64/src/vga/text') diff --git a/arch/x86_64/src/vga/text/buffer.cpp b/arch/x86_64/src/vga/text/buffer.cpp index 2dcf084..7112573 100644 --- a/arch/x86_64/src/vga/text/buffer.cpp +++ b/arch/x86_64/src/vga/text/buffer.cpp @@ -1,6 +1,6 @@ -#include "x86_64/vga/text/buffer.hpp" +#include "arch/vga/text/buffer.hpp" -#include "x86_64/vga/text/attribute.hpp" +#include "arch/vga/text/attribute.hpp" #include #include @@ -9,7 +9,7 @@ #include #include -namespace teachos::vga::x86_64::text +namespace arch::vga::text { buffer::buffer(std::size_t width, std::size_t height, cell * start, std::size_t position) : m_width{width} @@ -98,4 +98,4 @@ namespace teachos::vga::x86_64::text m_buffer[m_position++] = std::pair{code_point, std::bit_cast(attribute)}; } -} // namespace teachos::vga::x86_64::text +} // namespace arch::vga::text diff --git a/arch/x86_64/src/vga/text/device.cpp b/arch/x86_64/src/vga/text/device.cpp index 2da9e06..dcacd8c 100644 --- a/arch/x86_64/src/vga/text/device.cpp +++ b/arch/x86_64/src/vga/text/device.cpp @@ -1,16 +1,16 @@ #include "kapi/cio.hpp" -#include "x86_64/boot/boot.hpp" -#include "x86_64/boot/ld.hpp" -#include "x86_64/vga/crtc.hpp" -#include "x86_64/vga/text.hpp" +#include "arch/boot/boot.hpp" +#include "arch/boot/ld.hpp" +#include "arch/vga/crtc.hpp" +#include "arch/vga/text.hpp" #include #include #include #include -namespace teachos::vga::x86_64::text +namespace arch::vga::text { namespace { @@ -22,10 +22,10 @@ namespace teachos::vga::x86_64::text } // namespace device::device() - : m_buffer{default_buffer_width, default_buffer_height, - std::bit_cast(default_buffer_address + - std::bit_cast(&teachos::boot::x86_64::TEACHOS_VMA)), - boot::bootstrap_information.vga_buffer_index} + : m_buffer{ + default_buffer_width, default_buffer_height, + std::bit_cast(default_buffer_address + std::bit_cast(&boot::TEACHOS_VMA)), + kapi::boot::bootstrap_information.vga_buffer_index} { clear(); } @@ -43,12 +43,12 @@ namespace teachos::vga::x86_64::text crtc::data::write(crtc::data::read() | cursor_disable_byte); } - auto device::write(cio::output_stream stream, std::string_view text) -> void + auto device::write(kapi::cio::output_stream stream, std::string_view text) -> void { auto attributes = [&] -> attribute { switch (stream) { - case cio::output_stream::stderr: + case kapi::cio::output_stream::stderr: return red_on_black; default: return green_on_black; @@ -57,4 +57,4 @@ namespace teachos::vga::x86_64::text m_buffer.write(text, attributes); } -} // namespace teachos::vga::x86_64::text +} // namespace arch::vga::text -- cgit v1.2.3