From a13e1c0911c0627184bc38f18c7fdda64447b3ad Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 23 Mar 2025 19:13:48 +0100 Subject: meta(kernel): Reworked repository's filesystem structure. Removing useless parts of the project too. Signed-off-by: Amlal El Mahrouss --- dev/Boot/src/BootTextWriter.cc | 169 ----------------------------------------- 1 file changed, 169 deletions(-) delete mode 100644 dev/Boot/src/BootTextWriter.cc (limited to 'dev/Boot/src/BootTextWriter.cc') diff --git a/dev/Boot/src/BootTextWriter.cc b/dev/Boot/src/BootTextWriter.cc deleted file mode 100644 index b58d3429..00000000 --- a/dev/Boot/src/BootTextWriter.cc +++ /dev/null @@ -1,169 +0,0 @@ -/* ------------------------------------------- - - Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved. - - File: BootTextWriter.cc - Purpose: BootZ string library - - Revision History: - - - -------------------------------------------- */ - -#include -#include -#include -#include - -///////////////////////////////////////////////////////////////////////////////////////////////////////// -/// BUGS: 0 /// -///////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** -@brief puts wrapper over EFI ConOut. -*/ -Boot::BootTextWriter& Boot::BootTextWriter::Write(const CharacterTypeUTF16* str) -{ -#ifdef __DEBUG__ - if (!str || *str == 0) - return *this; - - CharacterTypeUTF16 strTmp[2]; - strTmp[1] = 0; - - for (size_t i = 0; str[i] != 0; i++) - { - if (str[i] == '\r') - { - strTmp[0] = str[i]; - ST->ConOut->OutputString(ST->ConOut, strTmp); - - strTmp[0] = '\n'; - ST->ConOut->OutputString(ST->ConOut, strTmp); - } - else - { - strTmp[0] = str[i]; - ST->ConOut->OutputString(ST->ConOut, strTmp); - } - } -#endif // ifdef __DEBUG__ - - return *this; -} - -/// @brief UTF-8 equivalent of Write (UTF-16). -/// @param str the input string. -Boot::BootTextWriter& Boot::BootTextWriter::Write(const Char* str) -{ -#ifdef __DEBUG__ - if (!str || *str == 0) - return *this; - - CharacterTypeUTF16 strTmp[2]; - strTmp[1] = 0; - - for (size_t i = 0; str[i] != 0; i++) - { - if (str[i] == '\r') - { - strTmp[0] = str[i]; - ST->ConOut->OutputString(ST->ConOut, strTmp); - - strTmp[0] = '\n'; - ST->ConOut->OutputString(ST->ConOut, strTmp); - } - else - { - strTmp[0] = str[i]; - ST->ConOut->OutputString(ST->ConOut, strTmp); - } - } -#endif // ifdef __DEBUG__ - - return *this; -} - -Boot::BootTextWriter& Boot::BootTextWriter::Write(const UChar* str) -{ -#ifdef __DEBUG__ - if (!str || *str == 0) - return *this; - - CharacterTypeUTF16 strTmp[2]; - strTmp[1] = 0; - - for (size_t i = 0; str[i] != 0; i++) - { - if (str[i] == '\r') - { - strTmp[0] = str[i]; - ST->ConOut->OutputString(ST->ConOut, strTmp); - - strTmp[0] = '\n'; - ST->ConOut->OutputString(ST->ConOut, strTmp); - } - else - { - strTmp[0] = str[i]; - ST->ConOut->OutputString(ST->ConOut, strTmp); - } - } -#endif // ifdef __DEBUG__ - - return *this; -} - -/** -@brief putc wrapper over EFI ConOut. -*/ -Boot::BootTextWriter& Boot::BootTextWriter::WriteCharacter(CharacterTypeUTF16 c) -{ -#ifdef __DEBUG__ - EfiCharType str[2]; - - str[0] = c; - str[1] = 0; - ST->ConOut->OutputString(ST->ConOut, str); -#endif // ifdef __DEBUG__ - - return *this; -} - -Boot::BootTextWriter& Boot::BootTextWriter::Write(const Long& x) -{ -#ifdef __DEBUG__ - this->_Write(x); - this->Write("h"); -#endif // ifdef __DEBUG__ - - return *this; -} - -Boot::BootTextWriter& Boot::BootTextWriter::_Write(const Long& x) -{ -#ifdef __DEBUG__ - UInt64 y = (x > 0 ? x : -x) / 16; - UInt64 h = (x > 0 ? x : -x) % 16; - - if (y) - this->_Write(y); - - /* fail if the hex number is not base-16 */ - if (h > 16) - { - this->WriteCharacter('?'); - return *this; - } - - if (y < 0) - y = -y; - - const char cNumbers[] = "0123456789ABCDEF"; - - this->WriteCharacter(cNumbers[h]); -#endif // ifdef __DEBUG__ - - return *this; -} -- cgit v1.2.3