diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-16 14:00:12 +0000 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-16 14:00:12 +0000 |
| commit | 82f0a2da77af7d79e53f5e65e46c527c1fe92765 (patch) | |
| tree | 319ef7dd933367d64911c0ed9a53f91565002b00 /Private/NewKit | |
| parent | 544d0cadfc371bcfb54d9f7ec15464bc6a79af21 (diff) | |
| parent | 4c7aebf1b8964b99b89a25da0965b30fe6c7e6b3 (diff) | |
Merge branch 'HCR-18' into 'trunk'
HCR-18: First commit, bringing HCoreKrnl.exe into memory.
See merge request mahrouss-logic/micro-kernel!6
Diffstat (limited to 'Private/NewKit')
| -rw-r--r-- | Private/NewKit/Json.hpp | 2 | ||||
| -rw-r--r-- | Private/NewKit/Macros.hpp | 4 | ||||
| -rw-r--r-- | Private/NewKit/Utils.hpp | 35 |
3 files changed, 22 insertions, 19 deletions
diff --git a/Private/NewKit/Json.hpp b/Private/NewKit/Json.hpp index 1c404397..3b201ecc 100644 --- a/Private/NewKit/Json.hpp +++ b/Private/NewKit/Json.hpp @@ -44,7 +44,7 @@ class JsonType final { struct JsonStreamTraits final { JsonType In(const char *full_array) { - SizeT len = string_length(full_array); + SizeT len = rt_string_len(full_array); if (full_array[0] == '\"' && full_array[len - 1] == ',' || full_array[len - 1] == '\"') { diff --git a/Private/NewKit/Macros.hpp b/Private/NewKit/Macros.hpp index 739447b0..ecd2d678 100644 --- a/Private/NewKit/Macros.hpp +++ b/Private/NewKit/Macros.hpp @@ -89,3 +89,7 @@ #define EXTERN extern #define STATIC static + +#ifndef self +#define self this +#endif diff --git a/Private/NewKit/Utils.hpp b/Private/NewKit/Utils.hpp index c02e071f..dc3b1434 100644 --- a/Private/NewKit/Utils.hpp +++ b/Private/NewKit/Utils.hpp @@ -12,21 +12,20 @@ #include <NewKit/Defines.hpp> -namespace HCore -{ - Int rt_copy_memory(const voidPtr src, voidPtr dst, Size len); - Int rt_move_memory(const voidPtr src, voidPtr dst, Size len); - voidPtr rt_set_memory(voidPtr dst, Char val, Size len); - void rt_zero_memory(voidPtr pointer, Size len); - Int string_compare(const Char *src, const Char *cmp, Size len); - const Char *alloc_string(const Char *text); - Size string_length(const Char *str); - Size string_length(const Char *str, SizeT _len); - Boolean rt_to_string(Char *buf, Int limit, Int base); - Boolean is_newln(Char chr); - Boolean is_space(Char chr); - Int rt_to_uppercase(Int c); - Int rt_to_lower(Int c); - voidPtr rt_string_in_string(const char* in, const char* needle); - char* rt_string_from_char(char* str, const char chr); -} // namespace HCore +namespace HCore { +Int rt_copy_memory(const voidPtr src, voidPtr dst, Size len); +Int rt_move_memory(const voidPtr src, voidPtr dst, Size len); +voidPtr rt_set_memory(voidPtr dst, Char val, Size len); +void rt_zero_memory(voidPtr pointer, Size len); +Int rt_string_cmp(const Char *src, const Char *cmp, Size len); +const Char *alloc_string(const Char *text); +Size rt_string_len(const Char *str); +Size rt_string_len(const Char *str, SizeT _len); +Boolean rt_to_string(Char *buf, Int limit, Int base); +Boolean is_newln(Char chr); +Boolean is_space(Char chr); +Int rt_to_uppercase(Int c); +Int rt_to_lower(Int c); +voidPtr rt_string_in_string(const char *in, const char *needle); +char *rt_string_from_char(char *str, const char chr); +} // namespace HCore |
