diff options
| author | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-18 17:03:17 +0100 |
|---|---|---|
| committer | Amlal <amlal.elmahrouss@icloud.com> | 2025-02-18 17:03:17 +0100 |
| commit | b119e2e741dc82bca93374df7c5e4cd4b6468bc1 (patch) | |
| tree | 2cc92ec7114ab85994b81a27b10a6a2fbbf4d22f /dev | |
| parent | 36ec3e50aa1328bed5f3d2cfbf6a0596caa7a7c5 (diff) | |
ADD: Refactor make_app command line to work with NeOS, like the open command.
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/Kernel/HALKit/AMD64/HalSystemCallInstall.cc | 1 | ||||
| -rw-r--r-- | dev/LibSCI/Macros.h | 2 | ||||
| -rw-r--r-- | dev/LibSCI/SCI.h | 20 | ||||
| -rw-r--r-- | dev/Usr/LibCF/Array.h | 12 |
4 files changed, 31 insertions, 4 deletions
diff --git a/dev/Kernel/HALKit/AMD64/HalSystemCallInstall.cc b/dev/Kernel/HALKit/AMD64/HalSystemCallInstall.cc index 3e360582..e4e9daab 100644 --- a/dev/Kernel/HALKit/AMD64/HalSystemCallInstall.cc +++ b/dev/Kernel/HALKit/AMD64/HalSystemCallInstall.cc @@ -5,4 +5,3 @@ ------------------------------------------- */ #include <ArchKit/ArchKit.h> - diff --git a/dev/LibSCI/Macros.h b/dev/LibSCI/Macros.h index 3236176c..92461f3f 100644 --- a/dev/LibSCI/Macros.h +++ b/dev/LibSCI/Macros.h @@ -78,5 +78,5 @@ IMPORT_C void _rtl_assert(Bool expr, const Char* origin); #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) \ (((sizeof(a) / sizeof(*(a))) / \ - (static_cast<Kernel::Size>(!(sizeof(a) % sizeof(*(a))))))) + (static_cast<SizeT>(!(sizeof(a) % sizeof(*(a))))))) #endif
\ No newline at end of file diff --git a/dev/LibSCI/SCI.h b/dev/LibSCI/SCI.h index 736c2d33..3b03bee2 100644 --- a/dev/LibSCI/SCI.h +++ b/dev/LibSCI/SCI.h @@ -329,4 +329,24 @@ IMPORT_C SInt32 VideoGetColorProfile(VoidPtr* in); IMPORT_C SInt32 VideoQueryInfo(VoidPtr* info_ptr, SizeT* info_sz);
+IMPORT_C BOOL FsCopy(const char* path, const char* dst);
+IMPORT_C BOOL FsMove(const char* path, const char* dst);
+
+IMPORT_C BOOL FsExists(const char* path);
+
+IMPORT_C BOOL FsCreateDir(const char* path);
+IMPORT_C BOOL FsCreateFile(const char* path);
+IMPORT_C BOOL FsCreateAlias(const char* path, const char* from);
+
+IMPORT_C Char* StrFmt(const Char* fmt, ...);
+
+IMPORT_C SInt32 MsgFree(VoidPtr handle);
+IMPORT_C SInt32 MsgShow(VoidPtr handle);
+
+/// @note fmt could be any POSIX argument, or the extended ones (%$, %{})
+IMPORT_C SInt32 MsgSend(VoidPtr handle, const Char* fmt, ...);
+IMPORT_C SInt32 MsgAlloc(VoidPtr handle);
+
+IMPORT_C VoidPtr kAlertMsg, kInfoMsg, kErrorMsg;
+
#endif // ifndef SCI_SCI_H
diff --git a/dev/Usr/LibCF/Array.h b/dev/Usr/LibCF/Array.h index ed3e736b..c466b0fb 100644 --- a/dev/Usr/LibCF/Array.h +++ b/dev/Usr/LibCF/Array.h @@ -38,7 +38,15 @@ namespace LibCF const SizeT Count() { - return N; + auto cnt = 0UL; + + for (auto i = 0; i < N; ++i) + { + if (fArray[i]) + ++cnt; + } + + return cnt; } const T* CData() @@ -52,7 +60,7 @@ namespace LibCF } private: - T fArray[N]; + T fArray[N] = {nullptr}; }; template <typename ValueType> |
