summaryrefslogtreecommitdiffhomepage
path: root/Public
diff options
context:
space:
mode:
Diffstat (limited to 'Public')
-rw-r--r--Public/Kits/SystemKit/CoreAPI.hxx9
-rw-r--r--Public/Kits/SystemKit/FileAPI.hxx8
-rw-r--r--Public/Kits/SystemKit/HeapAPI.hxx2
-rw-r--r--Public/Kits/SystemKit/SystemCall.hxx2
-rw-r--r--Public/Kits/SystemKit/ThreadAPI.hxx10
-rw-r--r--Public/Kits/SystemKit/compile_flags.txt4
-rw-r--r--Public/Kits/ZipKit/Zip.cxx2
-rw-r--r--Public/Kits/ZipKit/compile_flags.txt4
-rw-r--r--Public/Tools/MakeNewFS.cxx13
9 files changed, 43 insertions, 11 deletions
diff --git a/Public/Kits/SystemKit/CoreAPI.hxx b/Public/Kits/SystemKit/CoreAPI.hxx
index f3e67e96..fa5e8eef 100644
--- a/Public/Kits/SystemKit/CoreAPI.hxx
+++ b/Public/Kits/SystemKit/CoreAPI.hxx
@@ -9,9 +9,18 @@
#pragma once
+#ifndef __cplusplus
+#error This API is meant to be used with C++
+#endif
+
#ifdef MUST_PASS
#undef MUST_PASS
#endif
// unused by user side, it's a kernel thing.
#define MUST_PASS(e) ((void)e)
+
+#define EXTERN_C extern "C"
+
+#define STDCALL __attribute__((stdcall))
+#define CDECL __attribute__((cdecl))
diff --git a/Public/Kits/SystemKit/FileAPI.hxx b/Public/Kits/SystemKit/FileAPI.hxx
index c55d26ff..350e27f4 100644
--- a/Public/Kits/SystemKit/FileAPI.hxx
+++ b/Public/Kits/SystemKit/FileAPI.hxx
@@ -24,11 +24,11 @@ class HFile final {
HCORE_COPY_DEFAULT(HFile);
public:
- void *Read(SizeT off, SizeT sz);
- void Write(void *buf, SizeT off, SizeT sz);
+ voidPtr Read(SizeT off, SizeT sz);
+ void Write(voidPtr buf, SizeT off, SizeT sz);
void Seek(SizeT off);
- void *Read(SizeT sz);
- void Write(void *buf, SizeT sz);
+ voidPtr Read(SizeT sz);
+ void Write(voidPtr buf, SizeT sz);
void Rewind();
public:
diff --git a/Public/Kits/SystemKit/HeapAPI.hxx b/Public/Kits/SystemKit/HeapAPI.hxx
index 11d4c265..c11b1408 100644
--- a/Public/Kits/SystemKit/HeapAPI.hxx
+++ b/Public/Kits/SystemKit/HeapAPI.hxx
@@ -41,7 +41,7 @@ class HHeap final {
public:
void Delete(HHeapPtr me) noexcept;
- SizeT Tell(HHeapPtr me) noexcept;
+ SizeT Size(HHeapPtr me) noexcept;
HHeapPtr New(const SizeT &sz, const Int32 flags = kHeapNoFlags);
};
diff --git a/Public/Kits/SystemKit/SystemCall.hxx b/Public/Kits/SystemKit/SystemCall.hxx
index 77614099..64d65d4b 100644
--- a/Public/Kits/SystemKit/SystemCall.hxx
+++ b/Public/Kits/SystemKit/SystemCall.hxx
@@ -14,3 +14,5 @@
#pragma once
/// @brief System Call Interface
+
+#include <SystemKit/CoreAPI.hxx>
diff --git a/Public/Kits/SystemKit/ThreadAPI.hxx b/Public/Kits/SystemKit/ThreadAPI.hxx
index a9490033..80742ab9 100644
--- a/Public/Kits/SystemKit/ThreadAPI.hxx
+++ b/Public/Kits/SystemKit/ThreadAPI.hxx
@@ -20,11 +20,11 @@ namespace HCore {
/// @brief Thread Information Block for Local Storage.
/// Located in GS on AMD64, Virtual Address 0x10000 (64x0, 32x0, ARM64)
struct ThreadInformationBlock final {
- const Char NAME[255]; // Module Name
- const UIntPtr START_ADDRESS; // Start Address
- const UIntPtr START_ALLOC; // Allocation Heap
- const UIntPtr START_STACK; // Stack Pointer.
- const Int32 ARCH; // Architecture and/or platform.
+ const Char Name[255]; // Module Name
+ const UIntPtr StartAddress; // Start Address
+ const UIntPtr StartHeap; // Allocation Heap
+ const UIntPtr StartStack; // Stack Pointer.
+ const Int32 ARCH; // Architecture and/or platform.
};
enum {
diff --git a/Public/Kits/SystemKit/compile_flags.txt b/Public/Kits/SystemKit/compile_flags.txt
new file mode 100644
index 00000000..6e721e73
--- /dev/null
+++ b/Public/Kits/SystemKit/compile_flags.txt
@@ -0,0 +1,4 @@
+-I./
+-I../
+-I../../../Private
+-std=c++20
diff --git a/Public/Kits/ZipKit/Zip.cxx b/Public/Kits/ZipKit/Zip.cxx
index 71523143..74e2a5d8 100644
--- a/Public/Kits/ZipKit/Zip.cxx
+++ b/Public/Kits/ZipKit/Zip.cxx
@@ -27,7 +27,7 @@ HFilePtr ZipStream::FlushToFile(const char *name) {
HFilePtr fp = new HFile(name);
MUST_PASS(fp);
- this->fSharedSz = HHeap::Shared()->Tell(this->fSharedData);
+ this->fSharedSz = HHeap::Shared()->Size(this->fSharedData);
fp->SetMIME("application/x-bzip");
fp->Write(this->fSharedData, this->fSharedSz);
diff --git a/Public/Kits/ZipKit/compile_flags.txt b/Public/Kits/ZipKit/compile_flags.txt
new file mode 100644
index 00000000..6e721e73
--- /dev/null
+++ b/Public/Kits/ZipKit/compile_flags.txt
@@ -0,0 +1,4 @@
+-I./
+-I../
+-I../../../Private
+-std=c++20
diff --git a/Public/Tools/MakeNewFS.cxx b/Public/Tools/MakeNewFS.cxx
index d4d28e6d..8871d627 100644
--- a/Public/Tools/MakeNewFS.cxx
+++ b/Public/Tools/MakeNewFS.cxx
@@ -1,3 +1,16 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+ File: MakeNewFS.cpp
+ Purpose:
+
+ Revision History:
+
+ 31/01/24: Added file (amlel)
+
+------------------------------------------- */
+
/***********************************************************************************/
/// @file MakeNewFS.cxx
/// @brief NewFS partition program.