summaryrefslogtreecommitdiffhomepage
path: root/dev/SCIKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-24 05:08:21 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2025-03-24 05:08:21 +0100
commit77a1bd038f4288a7c24cfe52ad9824ca947c6671 (patch)
treed7e3fe10fce24ddc6a2b3db15a6dc9d6aeee2451 /dev/SCIKit
parent66be78af046c20bd110793c03062a3ff67b04f9c (diff)
kernel(feat): Add basic wide system bug check (memory check), other
changes have been made too, see commit details for more information. Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev/SCIKit')
-rw-r--r--dev/SCIKit/CompilerHint.h12
-rw-r--r--dev/SCIKit/LPC.h2
-rw-r--r--dev/SCIKit/Macros.h20
-rw-r--r--dev/SCIKit/SystemCalls.h (renamed from dev/SCIKit/SCI.h)4
-rw-r--r--dev/SCIKit/src/SCI.cc2
5 files changed, 15 insertions, 25 deletions
diff --git a/dev/SCIKit/CompilerHint.h b/dev/SCIKit/CompilerHint.h
deleted file mode 100644
index a78e59bf..00000000
--- a/dev/SCIKit/CompilerHint.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -------------------------------------------
-
- Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-
-------------------------------------------- */
-
-#ifndef SCI_HINT_H
-#define SCI_HINT_H
-
-#include <HintsKit/CompilerHint.h>
-
-#endif // ifndef SCI_HINT_H
diff --git a/dev/SCIKit/LPC.h b/dev/SCIKit/LPC.h
index 044d272e..b0bb2d83 100644
--- a/dev/SCIKit/LPC.h
+++ b/dev/SCIKit/LPC.h
@@ -9,7 +9,7 @@
#include <SCIKit/Macros.h>
/// @file LPC.h
-/// @brief Local Process Code type and values.
+/// @brief Local Procedure Code type and values.
#define err_local_ok() (kLastError == kErrorSuccess)
#define err_local_fail() (kLastError != kErrorSuccess)
diff --git a/dev/SCIKit/Macros.h b/dev/SCIKit/Macros.h
index c7bd61e8..174d644a 100644
--- a/dev/SCIKit/Macros.h
+++ b/dev/SCIKit/Macros.h
@@ -11,10 +11,10 @@ Purpose: libsci Macros header.
/***********************************************************************************/
/// @file SCIKit/Macros.h
-/// @brief Macros and core types.
+/// @brief Macros and Core types.
/***********************************************************************************/
-#include <SCIKit/CompilerHint.h>
+#include <HintsKit/CompilerHint.h>
#define ATTRIBUTE(X) __attribute__((X))
@@ -23,10 +23,10 @@ Purpose: libsci Macros header.
#define DEPRECATED ATTRIBUTE(deprecated)
-#define EXIT_SUCCESS 0
-#define EXIT_FAILURE 1
+#define EXIT_SUCCESS (0)
+#define EXIT_FAILURE (1)
-#define FILE_MAX_LEN 256
+#define FILE_MAX_LEN (256)
#ifndef BOOL
#define BOOL bool
@@ -37,8 +37,8 @@ typedef bool Boolean;
typedef void Void;
#ifndef __cplusplus
-#define true 1
-#define false 0
+#define true (1)
+#define false (0)
#endif
#define YES true
@@ -87,7 +87,7 @@ IMPORT_C void _rtl_assert(Bool expr, const Char* origin);
#define MUST_PASS(X) _rtl_assert(X, __FILE__)
#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(a) \
- (((sizeof(a) / sizeof(*(a))) / \
- (static_cast<SizeT>(!(sizeof(a) % sizeof(*(a)))))))
+#define ARRAY_SIZE(X) \
+ (((sizeof(X) / sizeof(*(X))) / \
+ (static_cast<SizeT>(!(sizeof(X) % sizeof(*(X)))))))
#endif \ No newline at end of file
diff --git a/dev/SCIKit/SCI.h b/dev/SCIKit/SystemCalls.h
index 3e769262..7615a2d1 100644
--- a/dev/SCIKit/SCI.h
+++ b/dev/SCIKit/SystemCalls.h
@@ -2,7 +2,7 @@
Copyright (C) 2024-2025, Amlal EL Mahrouss, all rights reserved.
-File: SCI.h
+File: SystemCalls.h
Purpose: System Call Interface.
------------------------------------------- */
@@ -336,4 +336,6 @@ IMPORT_C BOOL FsCreateAlias(const char* path, const char* from);
IMPORT_C Char* StrFmt(const Char* fmt, ...);
+IMPORT_C UInt64 MathToNumber(const Char* in, const Char** endp, const SInt16 base);
+
#endif // ifndef SCI_SCI_H
diff --git a/dev/SCIKit/src/SCI.cc b/dev/SCIKit/src/SCI.cc
index 3427ae4e..6556754d 100644
--- a/dev/SCIKit/src/SCI.cc
+++ b/dev/SCIKit/src/SCI.cc
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <SCIKit/SCI.h>
+#include <SCIKit/SystemCalls.h>
/// @file libsci.cc
/// @brief Source file for the memory functions of the libsci.