summaryrefslogtreecommitdiffhomepage
path: root/dev/ZBA
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 10:06:13 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-09-02 10:06:13 +0200
commitb3888ff9e2c18da6b73a57f453f7ad36fea61b7b (patch)
tree1c2c6da3f8fba030222f7505f73a104eaf9e17cf /dev/ZBA
parent9b7082353e9f7bd4d3ae077959de553f437316db (diff)
[ META ] Update formating.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/ZBA')
-rw-r--r--dev/ZBA/BootKit/Support.hxx2
-rw-r--r--dev/ZBA/BootKit/Thread.hxx6
-rw-r--r--dev/ZBA/BootKit/Vendor/Qr.hxx4
-rw-r--r--dev/ZBA/BootKit/Vendor/stb_image.hxx16
-rw-r--r--dev/ZBA/Modules/NetBoot/NetBoot.hxx8
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootATA.cxx8
-rw-r--r--dev/ZBA/Sources/HEL/AMD64/BootMain.cxx7
-rw-r--r--dev/ZBA/Sources/Thread.cxx2
8 files changed, 26 insertions, 27 deletions
diff --git a/dev/ZBA/BootKit/Support.hxx b/dev/ZBA/BootKit/Support.hxx
index d7053f66..8b9ab105 100644
--- a/dev/ZBA/BootKit/Support.hxx
+++ b/dev/ZBA/BootKit/Support.hxx
@@ -18,7 +18,7 @@
#define MoveMem(dst, src, sz) memcpy(dst, src, sz)
#define CopyMem(dst, src, sz) memcpy(dst, src, sz)
#define StrLen(src) strlen(src)
-#define StrCmp(dst, src) strcmp(dst, src)
+#define StrCmp(dst, src) strcmp(dst, src)
#endif // __NEWOSLDR__
diff --git a/dev/ZBA/BootKit/Thread.hxx b/dev/ZBA/BootKit/Thread.hxx
index 3946f6eb..558dc9f0 100644
--- a/dev/ZBA/BootKit/Thread.hxx
+++ b/dev/ZBA/BootKit/Thread.hxx
@@ -22,7 +22,7 @@ namespace Boot
{
public:
explicit BThread() = delete;
- ~BThread() = default;
+ ~BThread() = default;
explicit BThread(Kernel::VoidPtr blob);
@@ -32,10 +32,10 @@ namespace Boot
void Start(HEL::HandoverInformationHeader* handover);
const char* GetName();
void SetName(const char* name);
- bool IsValid();
+ bool IsValid();
private:
- Char fBlobName[255] = { "BootThread" };
+ Char fBlobName[255] = {"BootThread"};
VoidPtr fStartAddress{nullptr};
VoidPtr fBlob{nullptr};
};
diff --git a/dev/ZBA/BootKit/Vendor/Qr.hxx b/dev/ZBA/BootKit/Vendor/Qr.hxx
index a2af4367..77a5a802 100644
--- a/dev/ZBA/BootKit/Vendor/Qr.hxx
+++ b/dev/ZBA/BootKit/Vendor/Qr.hxx
@@ -1,12 +1,12 @@
#ifndef QR_HXX
#define QR_HXX
-extern "C" {
+extern "C"
+{
#include <math.h>
#include <stddef.h>
#include <stdint.h>
-
}
#include <BootKit/Vendor/Shared/base.h>
diff --git a/dev/ZBA/BootKit/Vendor/stb_image.hxx b/dev/ZBA/BootKit/Vendor/stb_image.hxx
index ca4576d7..af5f82fc 100644
--- a/dev/ZBA/BootKit/Vendor/stb_image.hxx
+++ b/dev/ZBA/BootKit/Vendor/stb_image.hxx
@@ -659,7 +659,7 @@ typedef unsigned char validate_uint32[sizeof(stbi__uint32) == 4 ? 1 : -1];
#ifdef STBI_HAS_LROTL
#define stbi_lrot(x, y) _lrotl(x, y)
#else
-#define stbi_lrot(x, y) (((x) << (y)) | ((x) >> (-(y) & 31)))
+#define stbi_lrot(x, y) (((x) << (y)) | ((x) >> (-(y)&31)))
#endif
#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED))
@@ -1780,7 +1780,7 @@ static stbi__uint32 stbi__get32le(stbi__context* s)
}
#endif
-#define STBI__BYTECAST(x) ((stbi_uc)((x) & 255)) // truncate int to byte without warnings
+#define STBI__BYTECAST(x) ((stbi_uc)((x)&255)) // truncate int to byte without warnings
#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM)
// nothing
@@ -1826,7 +1826,7 @@ static unsigned char* stbi__convert_format(unsigned char* data, int img_n, int r
unsigned char* src = data + j * x * img_n;
unsigned char* dest = good + j * x * req_comp;
-#define STBI__COMBO(a, b) ((a) * 8 + (b))
+#define STBI__COMBO(a, b) ((a)*8 + (b))
#define STBI__CASE(a, b) \
case STBI__COMBO(a, b): \
for (i = x - 1; i >= 0; --i, src += a, dest += b)
@@ -1951,7 +1951,7 @@ static stbi__uint16* stbi__convert_format16(stbi__uint16* data, int img_n, int r
stbi__uint16* src = data + j * x * img_n;
stbi__uint16* dest = good + j * x * req_comp;
-#define STBI__COMBO(a, b) ((a) * 8 + (b))
+#define STBI__COMBO(a, b) ((a)*8 + (b))
#define STBI__CASE(a, b) \
case STBI__COMBO(a, b): \
for (i = x - 1; i >= 0; --i, src += a, dest += b)
@@ -2726,8 +2726,8 @@ stbi_inline static stbi_uc stbi__clamp(int x)
return (stbi_uc)x;
}
-#define stbi__f2f(x) ((int)(((x) * 4096 + 0.5)))
-#define stbi__fsh(x) ((x) * 4096)
+#define stbi__f2f(x) ((int)(((x)*4096 + 0.5)))
+#define stbi__fsh(x) ((x)*4096)
// derived from jidctint -- DCT_ISLOW
#define STBI__IDCT_1D(s0, s1, s2, s3, s4, s5, s6, s7) \
@@ -4159,7 +4159,7 @@ static stbi_uc* stbi__resample_row_generic(stbi_uc* out, stbi_uc* in_near, stbi_
// this is a reduced-precision calculation of YCbCr-to-RGB introduced
// to make sure the code produces the same results in both SIMD and scalar
-#define stbi__float2fixed(x) (((int)((x) * 4096.0f + 0.5f)) << 8)
+#define stbi__float2fixed(x) (((int)((x)*4096.0f + 0.5f)) << 8)
static void stbi__YCbCr_to_RGB_row(stbi_uc* out, const stbi_uc* y, const stbi_uc* pcb, const stbi_uc* pcr, int count, int step)
{
int i;
@@ -4503,7 +4503,7 @@ static stbi_uc* load_jpeg_image(stbi__jpeg* z, int* out_x, int* out_y, int* comp
coutput[k] = r->resample(z->img_comp[k].linebuf,
y_bot ? r->line1 : r->line0,
y_bot ? r->line0 : r->line1,
- r->w_lores, r->hs);
+ r->w_lores, r->hs);
if (++r->ystep >= r->vs)
{
r->ystep = 0;
diff --git a/dev/ZBA/Modules/NetBoot/NetBoot.hxx b/dev/ZBA/Modules/NetBoot/NetBoot.hxx
index 42dababa..ff8af0da 100644
--- a/dev/ZBA/Modules/NetBoot/NetBoot.hxx
+++ b/dev/ZBA/Modules/NetBoot/NetBoot.hxx
@@ -19,8 +19,8 @@ typedef struct NetBootInternetHeader
Kernel::Char NB3; /// magic char 3 'T'
Kernel::Char NB4; /// magic char 4 'B'
- Kernel::Char PatchName[255]; /// example: ColdChoco
- Kernel::Int32 PatchLength; /// the patch length.
- Kernel::Char PatchTarget[255]; /// the target file.
- Kernel::Boolean ImpliesROM; /// does it imply an EEPROM reprogram?
+ Kernel::Char PatchName[255]; /// example: ColdChoco
+ Kernel::Int32 PatchLength; /// the patch length.
+ Kernel::Char PatchTarget[255]; /// the target file.
+ Kernel::Boolean ImpliesROM; /// does it imply an EEPROM reprogram?
} NetBootInternetHeader;
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx b/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx
index 0c59ef8c..6cc7f9b7 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootATA.cxx
@@ -111,7 +111,7 @@ ATAInit_Retry:
Void boot_ata_read(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, SizeT SectorSz, SizeT Size)
{
- Lba /= SectorSz;
+ Lba /= SectorSz;
UInt8 Command = ((!Master) ? 0xE0 : 0xF0);
@@ -122,7 +122,7 @@ Void boot_ata_read(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf,
Out8(IO + ATA_REG_SEC_COUNT0, ((Size + SectorSz) / SectorSz));
- Out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
+ Out8(IO + ATA_REG_LBA0, (Lba)&0xFF);
Out8(IO + ATA_REG_LBA1, (Lba) >> 8);
Out8(IO + ATA_REG_LBA2, (Lba) >> 16);
Out8(IO + ATA_REG_LBA3, (Lba) >> 24);
@@ -141,7 +141,7 @@ Void boot_ata_read(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf,
Void boot_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf, SizeT SectorSz, SizeT Size)
{
- Lba /= SectorSz;
+ Lba /= SectorSz;
UInt8 Command = ((!Master) ? 0xE0 : 0xF0);
@@ -152,7 +152,7 @@ Void boot_ata_write(UInt64 Lba, UInt16 IO, UInt8 Master, CharacterTypeUTF8* Buf,
Out8(IO + ATA_REG_SEC_COUNT0, ((Size + (SectorSz)) / SectorSz));
- Out8(IO + ATA_REG_LBA0, (Lba) & 0xFF);
+ Out8(IO + ATA_REG_LBA0, (Lba)&0xFF);
Out8(IO + ATA_REG_LBA1, (Lba) >> 8);
Out8(IO + ATA_REG_LBA2, (Lba) >> 16);
Out8(IO + ATA_REG_LBA3, (Lba) >> 24);
diff --git a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
index 382cbcd6..ff8c3211 100644
--- a/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
+++ b/dev/ZBA/Sources/HEL/AMD64/BootMain.cxx
@@ -149,8 +149,7 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
CGDrawString("NEWOSLDR (C) ZKA TECHNOLOGIES.", 10, 10, RGB(0xFF, 0xFF, 0xFF));
CGDrawString((cnt_enabled > 1) ? "MULTIPROCESSOR SYSTEM." : "UNIPROCESSOR SYSTEM.", 20, 10, RGB(0xFF, 0xFF, 0xFF));
- handoverHdrPtr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1
- ;
+ handoverHdrPtr->f_HardwareTables.f_MultiProcessingEnabled = cnt_enabled > 1;
// Fill handover header now.
BS->GetMemoryMap(&SizePtr, Descriptor, &MapKey, &SzDesc, &RevDesc);
@@ -291,8 +290,8 @@ EFI_EXTERN_C EFI_API Int Main(EfiHandlePtr ImageHandle,
if (readerSysDrv.Blob() &&
chimeWav.Blob())
{
- handoverHdrPtr->f_StartupChime = chimeWav.Blob();
- handoverHdrPtr->f_StartupImage = readerKernel.Blob();
+ handoverHdrPtr->f_StartupChime = chimeWav.Blob();
+ handoverHdrPtr->f_StartupImage = readerKernel.Blob();
handoverHdrPtr->f_TTFallbackFont = urbanistTTF.Blob();
}
else
diff --git a/dev/ZBA/Sources/Thread.cxx b/dev/ZBA/Sources/Thread.cxx
index bddbdd52..c7a62a04 100644
--- a/dev/ZBA/Sources/Thread.cxx
+++ b/dev/ZBA/Sources/Thread.cxx
@@ -46,7 +46,7 @@ namespace Boot
if (firstBytes[0] == kMagMz0 &&
firstBytes[1] == kMagMz1)
{
- LDR_EXEC_HEADER_PTR hdrPtr = ldr_find_exec_header(firstBytes);
+ LDR_EXEC_HEADER_PTR hdrPtr = ldr_find_exec_header(firstBytes);
LDR_OPTIONAL_HEADER_PTR optHdr = ldr_find_opt_exec_header(firstBytes);
if (hdrPtr->mMachine != kPeMachineAMD64 ||