diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2023-09-15 16:02:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-15 16:02:47 -0700 |
| commit | c2193c41eb2001add35be0faedffad3d611ed53b (patch) | |
| tree | 8da3f6a07c77e81bd10f11bcc9d962dea0dcfd8a /include | |
| parent | 287ae62349ac3e1821b420d8dcad7989148d2a9d (diff) | |
JKRHeap (#1927)
* JKRHeap
* d_a_link
Diffstat (limited to 'include')
| -rw-r--r-- | include/JSystem/JUtility/JUTAssert.h | 14 | ||||
| -rw-r--r-- | include/JSystem/JUtility/JUTException.h | 3 | ||||
| -rw-r--r-- | include/MSL_C/MSL_Common/Src/stddef.h | 5 | ||||
| -rw-r--r-- | include/global.h | 1 |
4 files changed, 17 insertions, 6 deletions
diff --git a/include/JSystem/JUtility/JUTAssert.h b/include/JSystem/JUtility/JUTAssert.h index 61edbfbee3..219ef76eea 100644 --- a/include/JSystem/JUtility/JUTAssert.h +++ b/include/JSystem/JUtility/JUTAssert.h @@ -10,17 +10,21 @@ OSPanic(FILE, LINE, "Halt"); \ } -#else -#define JUT_ASSERT(...) -#endif - -#if DEBUG #define JUT_PANIC(FILE, LINE, TEXT) \ JUTAssertion::showAssert(JUTAssertion::getSDevice(), FILE, LINE, TEXT); \ OSPanic(FILE, LINE, "Halt"); +#define JUT_WARN(FILE, LINE, ...) \ + JUTAssertion::setWarningMessage_f(JUTAssertion::getSDevice(), FILE, LINE, __VA_ARGS__) + +#define JUT_LOG(LINE, ...) \ + JUTAssertion::setLogMessage_f(JUTAssertion::getSDevice(), __FILE__, LINE, __VA_ARGS__) + #else +#define JUT_ASSERT(...) #define JUT_PANIC(...) +#define JUT_WARN(...) +#define JUT_LOG(...) #endif namespace JUTAssertion { diff --git a/include/JSystem/JUtility/JUTException.h b/include/JSystem/JUtility/JUTException.h index 99da12c7c8..05a1661c41 100644 --- a/include/JSystem/JUtility/JUTException.h +++ b/include/JSystem/JUtility/JUTException.h @@ -103,6 +103,9 @@ public: static void setMapFile(const char* map) { appendMapFile(map); } + static void panic(const char* file, int line, const char* msg) { + panic_f(file, line, "%s", msg); + } private: static OSMessageQueue sMessageQueue; diff --git a/include/MSL_C/MSL_Common/Src/stddef.h b/include/MSL_C/MSL_Common/Src/stddef.h index 91086efb33..7d93b65045 100644 --- a/include/MSL_C/MSL_Common/Src/stddef.h +++ b/include/MSL_C/MSL_Common/Src/stddef.h @@ -5,8 +5,13 @@ extern "C" { #endif +#if defined __INTELLISENSE__ +typedef unsigned int size_t; +typedef int ptrdiff_t; +#else typedef unsigned long size_t; typedef long ptrdiff_t; +#endif #ifndef NULL #define NULL (0) diff --git a/include/global.h b/include/global.h index 8f0e1a3a78..2a255c6070 100644 --- a/include/global.h +++ b/include/global.h @@ -14,7 +14,6 @@ #define JUT_EXPECT(...) #define ASSERT(...) -#define LOGF(FMT, ...) #define FLAG_ON(V, F) (((V) & (F)) == 0) #define FLOAT_LABEL(x) (*(f32*)&x) |
