summaryrefslogtreecommitdiffhomepage
path: root/Usr/Sys/CoreSystem/Sources
diff options
context:
space:
mode:
Diffstat (limited to 'Usr/Sys/CoreSystem/Sources')
-rw-r--r--Usr/Sys/CoreSystem/Sources/App.c31
-rw-r--r--Usr/Sys/CoreSystem/Sources/CRTStartup.c12
-rw-r--r--Usr/Sys/CoreSystem/Sources/File.c69
-rw-r--r--Usr/Sys/CoreSystem/Sources/Heap.c54
-rw-r--r--Usr/Sys/CoreSystem/Sources/Math.c14
-rw-r--r--Usr/Sys/CoreSystem/Sources/Thread.c9
6 files changed, 0 insertions, 189 deletions
diff --git a/Usr/Sys/CoreSystem/Sources/App.c b/Usr/Sys/CoreSystem/Sources/App.c
deleted file mode 100644
index 3334dad4..00000000
--- a/Usr/Sys/CoreSystem/Sources/App.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-
-/// @brief Main Application object, retrieved from the RtGetAppPointer symbol.
-ApplicationInterfaceRef kSharedApplication = NullPtr;
-
-/// @brief Gets the app arguments count.
-/// @param void no arguments.
-/// @return The number of arguments given to the application.
-CS_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
-{
- CS_MUST_PASS(kSharedApplication);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallGetArgsCount);
-}
-
-/// @brief Gets the app arguments pointer.
-/// @param void no arguments.
-/// @return
-CS_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType)
-{
- CS_MUST_PASS(kSharedApplication);
-
- return (CharacterTypeUTF8**)kSharedApplication->Invoke(kSharedApplication,
- kCallGetArgsPtr);
-}
diff --git a/Usr/Sys/CoreSystem/Sources/CRTStartup.c b/Usr/Sys/CoreSystem/Sources/CRTStartup.c
deleted file mode 100644
index 2dc9b1c4..00000000
--- a/Usr/Sys/CoreSystem/Sources/CRTStartup.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-
-VoidType __DllMainCRTStartup(VoidType)
-{
- kSharedApplication = RtGetAppPointer();
-} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/File.c b/Usr/Sys/CoreSystem/Sources/File.c
deleted file mode 100644
index 2e34d782..00000000
--- a/Usr/Sys/CoreSystem/Sources/File.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-#include <Headers/File.h>
-
-enum FileOp
-{
- kFlushFile,
- kReadFork,
- kWriteFork,
- kOpenFork,
- kCloseFork,
-};
-
-/// @brief Opens a new file.
-/// @param path where to find it.
-/// @param rest the restrict (rw, rwe, r+, w+, r, w)
-/// @return FSRef file reference.
-CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path,
- const CharacterTypeUTF8* rest)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(path && CSIsValidPath(path) == Yes);
- CS_MUST_PASS(rest);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path,
- rest);
-}
-
-/// @brief Closes the file and flushes it to the said file.
-/// @param refCS the filesystem reference.
-/// @return void
-CS_EXTERN_C VoidType CSCloseFile(FSRef refCS)
-{
- CS_MUST_PASS(kSharedApplication);
-
- CSFlushFile(refCS);
-
- kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS);
-}
-
-/// @brief Flush file
-/// @param refCS the file reference.
-/// @return void
-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 the filesystem path.
-/// @return if the path is valid or not.
-CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(path);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallFileExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallDirectoryExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallSymlinkExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallDriveExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallDeviceExists, path);
-} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/Heap.c b/Usr/Sys/CoreSystem/Sources/Heap.c
deleted file mode 100644
index 1f96648d..00000000
--- a/Usr/Sys/CoreSystem/Sources/Heap.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-#include <Headers/Heap.h>
-
-/// @brief Allocate from the user's heap.
-/// @param sz size of object.
-/// @param flags flags.
-/// @return
-CS_EXTERN_C PtrVoidType CSAllocateHeap(QWordType sz, DWordType flags)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(sz);
- CS_MUST_PASS(flags);
-
- return (PtrVoidType)kSharedApplication->Invoke(kSharedApplication,
- kCallAllocPtr, sz, flags);
-}
-
-/// @brief Free pointer from the user's heap.
-/// @param ptr the pointer to free.
-CS_EXTERN_C VoidType CSFreeHeap(PtrVoidType ptr)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(ptr);
-
- CS_UNREFERENCED_PARAMETER(
- kSharedApplication->Invoke(kSharedApplication, kCallFreePtr, ptr));
-}
-
-/// @brief Get pointer size.
-/// @param ptr the pointer to find.
-/// @return the size.
-CS_EXTERN_C QWordType CSGetHeapSize(PtrVoidType ptr)
-{
- CS_MUST_PASS(kSharedApplication);
-
- CS_MUST_PASS(ptr);
- return kSharedApplication->Invoke(kSharedApplication, kCallSizePtr, ptr);
-}
-
-/// @brief Check if the pointer exists.
-/// @param ptr the pointer to check.
-/// @return if it exists
-CS_EXTERN_C BooleanType CSIsHeapValid(PtrVoidType ptr)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(ptr);
- return kSharedApplication->Invoke(kSharedApplication, kCallCheckPtr, ptr);
-}
diff --git a/Usr/Sys/CoreSystem/Sources/Math.c b/Usr/Sys/CoreSystem/Sources/Math.c
deleted file mode 100644
index 2d9536f6..00000000
--- a/Usr/Sys/CoreSystem/Sources/Math.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Math.h>
-
-/// @brief Number generator helper.
-/// @return Random generated number.
-CS_EXTERN_C SizeType MathRand(VoidType)
-{
- return kSharedApplication->Invoke(kSharedApplication, kCallRandomNumberGenerator);
-} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/Thread.c b/Usr/Sys/CoreSystem/Sources/Thread.c
deleted file mode 100644
index 630787e1..00000000
--- a/Usr/Sys/CoreSystem/Sources/Thread.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Thread.h>
-
-ThreadRef kMainThread = 0;