summaryrefslogtreecommitdiffhomepage
path: root/SDK
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-06-06 10:27:55 +0000
committerAmlal <amlalelmahrouss@icloud.com>2024-06-06 10:27:55 +0000
commit4e75e05a20ddd0dbca982e8f3bc2ea8043ed3a3f (patch)
tree95409c0e32b644578b94a5c230417da684d79dc9 /SDK
parentf5081a8f9a8537ad5be5d639955cd1d0e68a9e1d (diff)
parent9994b8f3f88131f41be1061fb0947177e66dc7b0 (diff)
Merged in MHR-23 (pull request #14)
Draft: MHR-23
Diffstat (limited to 'SDK')
-rw-r--r--SDK/Dist/.gitkeep (renamed from SDK/Library/.gitkeep)0
-rw-r--r--SDK/Libraries/.gitkeep (renamed from SDK/Library/CoreCxxRuntime/.gitkeep)0
-rw-r--r--SDK/Libraries/CoreCxxRuntime/.gitkeep (renamed from SDK/Library/CorePEFRuntime/.gitkeep)0
-rw-r--r--SDK/Libraries/CoreCxxRuntime/Private.xml (renamed from SDK/Library/CoreCxxRuntime/Private.xml)0
-rw-r--r--SDK/Libraries/CoreCxxRuntime/Sources/New+Delete.cxx (renamed from SDK/Library/CoreCxxRuntime/Sources/New+Delete.cxx)0
-rw-r--r--SDK/Libraries/CorePEFRuntime/.gitkeep (renamed from SDK/Library/CoreSystem/.gitkeep)0
-rw-r--r--SDK/Libraries/CorePEFRuntime/Private.xml (renamed from SDK/Library/CorePEFRuntime/Private.xml)0
-rw-r--r--SDK/Libraries/CorePEFRuntime/Sources/PEFStart.c (renamed from SDK/Library/CorePEFRuntime/Sources/PEFStart.c)0
-rw-r--r--SDK/Libraries/CoreSystem/.gitkeep (renamed from SDK/Library/CoreSystem/ARM64/.gitkeep)0
-rw-r--r--SDK/Libraries/CoreSystem/AMD64/CoreAssembly.s (renamed from SDK/Library/CoreSystem/AMD64/CoreAssembly.s)0
-rw-r--r--SDK/Libraries/CoreSystem/ARM64/.gitkeep (renamed from SDK/Library/CoreSystem/RISCV/.gitkeep)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Alert.h (renamed from SDK/Library/CoreSystem/Headers/Alert.h)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Defines.h (renamed from SDK/Library/CoreSystem/Headers/Defines.h)4
-rw-r--r--SDK/Libraries/CoreSystem/Headers/File.h (renamed from SDK/Library/CoreSystem/Headers/File.h)9
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Heap.h (renamed from SDK/Library/CoreSystem/Headers/Heap.h)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Hint.h (renamed from SDK/Library/CoreSystem/Headers/Hint.h)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Intl.h (renamed from SDK/Library/CoreSystem/Headers/Intl.h)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Math.h (renamed from SDK/Library/CoreSystem/Headers/Math.h)2
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Rsrc.h (renamed from SDK/Library/CoreSystem/Headers/Rsrc.h)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Thread.h (renamed from SDK/Library/CoreSystem/Headers/Thread.h)0
-rw-r--r--SDK/Libraries/CoreSystem/Headers/Transport.h (renamed from SDK/Library/CoreSystem/Headers/Transport.h)0
-rw-r--r--SDK/Libraries/CoreSystem/POWER/CoreAssembly.s (renamed from SDK/Library/CoreSystem/POWER/CoreAssembly.s)0
-rw-r--r--SDK/Libraries/CoreSystem/Private.xml (renamed from SDK/Library/CoreSystem/Private.xml)0
-rw-r--r--SDK/Libraries/CoreSystem/RISCV/.gitkeep (renamed from SDK/Tools/.gitkeep)0
-rw-r--r--SDK/Libraries/CoreSystem/ReadMe.md (renamed from SDK/Library/CoreSystem/ReadMe.md)0
-rw-r--r--SDK/Libraries/CoreSystem/Sources/App.c (renamed from SDK/Library/CoreSystem/Sources/App.c)0
-rw-r--r--SDK/Libraries/CoreSystem/Sources/CRTStartup.c (renamed from SDK/Library/CoreSystem/Sources/CRTStartup.c)0
-rw-r--r--SDK/Libraries/CoreSystem/Sources/File.c (renamed from SDK/Library/CoreSystem/Sources/File.c)13
-rw-r--r--SDK/Libraries/CoreSystem/Sources/Heap.c (renamed from SDK/Library/CoreSystem/Sources/Heap.c)0
-rw-r--r--SDK/Libraries/CoreSystem/Sources/Math.c (renamed from SDK/Library/CoreSystem/Sources/Math.c)0
-rw-r--r--SDK/Libraries/CoreSystem/Sources/Thread.c (renamed from SDK/Library/CoreSystem/Sources/Thread.c)0
-rw-r--r--SDK/Libraries/CoreSystem/amd64.mk (renamed from SDK/Library/CoreSystem/amd64.mk)0
-rw-r--r--SDK/Libraries/CoreSystem/compile_flags.txt (renamed from SDK/Library/CoreSystem/compile_flags.txt)0
33 files changed, 22 insertions, 6 deletions
diff --git a/SDK/Library/.gitkeep b/SDK/Dist/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Library/.gitkeep
+++ b/SDK/Dist/.gitkeep
diff --git a/SDK/Library/CoreCxxRuntime/.gitkeep b/SDK/Libraries/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Library/CoreCxxRuntime/.gitkeep
+++ b/SDK/Libraries/.gitkeep
diff --git a/SDK/Library/CorePEFRuntime/.gitkeep b/SDK/Libraries/CoreCxxRuntime/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Library/CorePEFRuntime/.gitkeep
+++ b/SDK/Libraries/CoreCxxRuntime/.gitkeep
diff --git a/SDK/Library/CoreCxxRuntime/Private.xml b/SDK/Libraries/CoreCxxRuntime/Private.xml
index 7ee426c0..7ee426c0 100644
--- a/SDK/Library/CoreCxxRuntime/Private.xml
+++ b/SDK/Libraries/CoreCxxRuntime/Private.xml
diff --git a/SDK/Library/CoreCxxRuntime/Sources/New+Delete.cxx b/SDK/Libraries/CoreCxxRuntime/Sources/New+Delete.cxx
index cc59586f..cc59586f 100644
--- a/SDK/Library/CoreCxxRuntime/Sources/New+Delete.cxx
+++ b/SDK/Libraries/CoreCxxRuntime/Sources/New+Delete.cxx
diff --git a/SDK/Library/CoreSystem/.gitkeep b/SDK/Libraries/CorePEFRuntime/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Library/CoreSystem/.gitkeep
+++ b/SDK/Libraries/CorePEFRuntime/.gitkeep
diff --git a/SDK/Library/CorePEFRuntime/Private.xml b/SDK/Libraries/CorePEFRuntime/Private.xml
index 7ee426c0..7ee426c0 100644
--- a/SDK/Library/CorePEFRuntime/Private.xml
+++ b/SDK/Libraries/CorePEFRuntime/Private.xml
diff --git a/SDK/Library/CorePEFRuntime/Sources/PEFStart.c b/SDK/Libraries/CorePEFRuntime/Sources/PEFStart.c
index e9a45f09..e9a45f09 100644
--- a/SDK/Library/CorePEFRuntime/Sources/PEFStart.c
+++ b/SDK/Libraries/CorePEFRuntime/Sources/PEFStart.c
diff --git a/SDK/Library/CoreSystem/ARM64/.gitkeep b/SDK/Libraries/CoreSystem/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Library/CoreSystem/ARM64/.gitkeep
+++ b/SDK/Libraries/CoreSystem/.gitkeep
diff --git a/SDK/Library/CoreSystem/AMD64/CoreAssembly.s b/SDK/Libraries/CoreSystem/AMD64/CoreAssembly.s
index 5d1484cf..5d1484cf 100644
--- a/SDK/Library/CoreSystem/AMD64/CoreAssembly.s
+++ b/SDK/Libraries/CoreSystem/AMD64/CoreAssembly.s
diff --git a/SDK/Library/CoreSystem/RISCV/.gitkeep b/SDK/Libraries/CoreSystem/ARM64/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Library/CoreSystem/RISCV/.gitkeep
+++ b/SDK/Libraries/CoreSystem/ARM64/.gitkeep
diff --git a/SDK/Library/CoreSystem/Headers/Alert.h b/SDK/Libraries/CoreSystem/Headers/Alert.h
index 7decd4ca..7decd4ca 100644
--- a/SDK/Library/CoreSystem/Headers/Alert.h
+++ b/SDK/Libraries/CoreSystem/Headers/Alert.h
diff --git a/SDK/Library/CoreSystem/Headers/Defines.h b/SDK/Libraries/CoreSystem/Headers/Defines.h
index a7e46234..713d6df8 100644
--- a/SDK/Library/CoreSystem/Headers/Defines.h
+++ b/SDK/Libraries/CoreSystem/Headers/Defines.h
@@ -32,6 +32,8 @@
#endif
+#include <Headers/Alert.h>
+
struct ApplicationInterface;
struct GUID;
@@ -231,5 +233,3 @@ typedef CharacterTypeUTF8 StrType255[255];
#ifndef kInvalidRef
#define kInvalidRef 0
#endif
-
-#include <Headers/Alert.h>
diff --git a/SDK/Library/CoreSystem/Headers/File.h b/SDK/Libraries/CoreSystem/Headers/File.h
index 594b4edb..cfd9ee30 100644
--- a/SDK/Library/CoreSystem/Headers/File.h
+++ b/SDK/Libraries/CoreSystem/Headers/File.h
@@ -8,6 +8,8 @@
#include <Headers/Defines.h>
+#define kMaxForkNameLength (256U) /* long fork names. */
+
struct _Fork;
/// @brief Filesystem wrapper.
@@ -25,8 +27,6 @@ CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path, const CharacterTypeU
/// @return
CS_EXTERN_C VoidType CSCloseFile(FSRef refCS);
-#define kMaxForkNameLength (256U) /* long fork names. */
-
/// @brief A fork information header.
typedef struct _Fork
{
@@ -49,4 +49,9 @@ CS_EXTERN_C FSForkRef CSGetFork(FSRef refCS, const CharacterTypeUTF8* forkName);
/// @return if not return false, or true.
CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path);
+/// @brief Flush file
+/// @param refCS the file reference.
+/// @return
+CS_EXTERN_C VoidType CSFlushFile(FSRef refCS);
+
/// END OF FILE
diff --git a/SDK/Library/CoreSystem/Headers/Heap.h b/SDK/Libraries/CoreSystem/Headers/Heap.h
index b2ad6e74..b2ad6e74 100644
--- a/SDK/Library/CoreSystem/Headers/Heap.h
+++ b/SDK/Libraries/CoreSystem/Headers/Heap.h
diff --git a/SDK/Library/CoreSystem/Headers/Hint.h b/SDK/Libraries/CoreSystem/Headers/Hint.h
index ee14711d..ee14711d 100644
--- a/SDK/Library/CoreSystem/Headers/Hint.h
+++ b/SDK/Libraries/CoreSystem/Headers/Hint.h
diff --git a/SDK/Library/CoreSystem/Headers/Intl.h b/SDK/Libraries/CoreSystem/Headers/Intl.h
index b868adca..b868adca 100644
--- a/SDK/Library/CoreSystem/Headers/Intl.h
+++ b/SDK/Libraries/CoreSystem/Headers/Intl.h
diff --git a/SDK/Library/CoreSystem/Headers/Math.h b/SDK/Libraries/CoreSystem/Headers/Math.h
index 0a13e86f..0079803e 100644
--- a/SDK/Library/CoreSystem/Headers/Math.h
+++ b/SDK/Libraries/CoreSystem/Headers/Math.h
@@ -9,7 +9,7 @@
#include <Headers/Defines.h>
///////////////////////////////////////////////////////////////////////
-/// Random functions ///
+/// Random number generators functions ///
///////////////////////////////////////////////////////////////////////
/// @brief Number generator helper.
diff --git a/SDK/Library/CoreSystem/Headers/Rsrc.h b/SDK/Libraries/CoreSystem/Headers/Rsrc.h
index 7fe52910..7fe52910 100644
--- a/SDK/Library/CoreSystem/Headers/Rsrc.h
+++ b/SDK/Libraries/CoreSystem/Headers/Rsrc.h
diff --git a/SDK/Library/CoreSystem/Headers/Thread.h b/SDK/Libraries/CoreSystem/Headers/Thread.h
index 15b40df3..15b40df3 100644
--- a/SDK/Library/CoreSystem/Headers/Thread.h
+++ b/SDK/Libraries/CoreSystem/Headers/Thread.h
diff --git a/SDK/Library/CoreSystem/Headers/Transport.h b/SDK/Libraries/CoreSystem/Headers/Transport.h
index 3f6db3f1..3f6db3f1 100644
--- a/SDK/Library/CoreSystem/Headers/Transport.h
+++ b/SDK/Libraries/CoreSystem/Headers/Transport.h
diff --git a/SDK/Library/CoreSystem/POWER/CoreAssembly.s b/SDK/Libraries/CoreSystem/POWER/CoreAssembly.s
index e7919f23..e7919f23 100644
--- a/SDK/Library/CoreSystem/POWER/CoreAssembly.s
+++ b/SDK/Libraries/CoreSystem/POWER/CoreAssembly.s
diff --git a/SDK/Library/CoreSystem/Private.xml b/SDK/Libraries/CoreSystem/Private.xml
index 4be6c388..4be6c388 100644
--- a/SDK/Library/CoreSystem/Private.xml
+++ b/SDK/Libraries/CoreSystem/Private.xml
diff --git a/SDK/Tools/.gitkeep b/SDK/Libraries/CoreSystem/RISCV/.gitkeep
index e69de29b..e69de29b 100644
--- a/SDK/Tools/.gitkeep
+++ b/SDK/Libraries/CoreSystem/RISCV/.gitkeep
diff --git a/SDK/Library/CoreSystem/ReadMe.md b/SDK/Libraries/CoreSystem/ReadMe.md
index ae5df339..ae5df339 100644
--- a/SDK/Library/CoreSystem/ReadMe.md
+++ b/SDK/Libraries/CoreSystem/ReadMe.md
diff --git a/SDK/Library/CoreSystem/Sources/App.c b/SDK/Libraries/CoreSystem/Sources/App.c
index 42ea19c6..42ea19c6 100644
--- a/SDK/Library/CoreSystem/Sources/App.c
+++ b/SDK/Libraries/CoreSystem/Sources/App.c
diff --git a/SDK/Library/CoreSystem/Sources/CRTStartup.c b/SDK/Libraries/CoreSystem/Sources/CRTStartup.c
index 1cfad65d..1cfad65d 100644
--- a/SDK/Library/CoreSystem/Sources/CRTStartup.c
+++ b/SDK/Libraries/CoreSystem/Sources/CRTStartup.c
diff --git a/SDK/Library/CoreSystem/Sources/File.c b/SDK/Libraries/CoreSystem/Sources/File.c
index 7547e7f2..6e0e810a 100644
--- a/SDK/Library/CoreSystem/Sources/File.c
+++ b/SDK/Libraries/CoreSystem/Sources/File.c
@@ -38,10 +38,21 @@ CS_EXTERN_C VoidType CSCloseFile(FSRef refCS)
{
CS_MUST_PASS(kSharedApplication);
- kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile);
+ CSFlushFile(refCS);
+
kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS);
}
+/// @brief Flush file
+/// @param refCS the file reference.
+/// @return
+CS_EXTERN_C VoidType CSFlushFile(FSRef refCS)
+{
+ CS_MUST_PASS(kSharedApplication);
+
+ kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile);
+}
+
/// @brief Check if filesystem path is valid.
/// @param path
/// @return
diff --git a/SDK/Library/CoreSystem/Sources/Heap.c b/SDK/Libraries/CoreSystem/Sources/Heap.c
index e7a77ba5..e7a77ba5 100644
--- a/SDK/Library/CoreSystem/Sources/Heap.c
+++ b/SDK/Libraries/CoreSystem/Sources/Heap.c
diff --git a/SDK/Library/CoreSystem/Sources/Math.c b/SDK/Libraries/CoreSystem/Sources/Math.c
index 19df42f3..19df42f3 100644
--- a/SDK/Library/CoreSystem/Sources/Math.c
+++ b/SDK/Libraries/CoreSystem/Sources/Math.c
diff --git a/SDK/Library/CoreSystem/Sources/Thread.c b/SDK/Libraries/CoreSystem/Sources/Thread.c
index 7d00bf9e..7d00bf9e 100644
--- a/SDK/Library/CoreSystem/Sources/Thread.c
+++ b/SDK/Libraries/CoreSystem/Sources/Thread.c
diff --git a/SDK/Library/CoreSystem/amd64.mk b/SDK/Libraries/CoreSystem/amd64.mk
index e64de90f..e64de90f 100644
--- a/SDK/Library/CoreSystem/amd64.mk
+++ b/SDK/Libraries/CoreSystem/amd64.mk
diff --git a/SDK/Library/CoreSystem/compile_flags.txt b/SDK/Libraries/CoreSystem/compile_flags.txt
index 749a500e..749a500e 100644
--- a/SDK/Library/CoreSystem/compile_flags.txt
+++ b/SDK/Libraries/CoreSystem/compile_flags.txt