summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJcw87 <Jcw87@users.noreply.github.com>2023-04-24 15:28:31 -0700
committerGitHub <noreply@github.com>2023-04-24 15:28:31 -0700
commitb440ae74fbd2f4fbeb6de2aa35f885727eea2134 (patch)
tree1e58749f8a9c4ffa544dfa8789e3285176849a3f /include
parente1a0f636e5c68d53b4e00a4cff85700f6588ef1b (diff)
MSL_C (#319)
* MSL_C/string.h * MSL_C/stdlib.h
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JAudio2/JASWaveArcLoader.h1
-rw-r--r--include/JSystem/JUtility/JUTFont.h2
-rw-r--r--include/MSL_C/MSL_Common/Src/wchar_io.h2
-rw-r--r--include/MSL_C/stdlib.h10
-rw-r--r--include/MSL_C/string.h23
-rw-r--r--include/d/save/d_save.h2
-rw-r--r--include/init.h1
7 files changed, 18 insertions, 23 deletions
diff --git a/include/JSystem/JAudio2/JASWaveArcLoader.h b/include/JSystem/JAudio2/JASWaveArcLoader.h
index 2d7e55e0aa..95fb0280b0 100644
--- a/include/JSystem/JAudio2/JASWaveArcLoader.h
+++ b/include/JSystem/JAudio2/JASWaveArcLoader.h
@@ -5,7 +5,6 @@
#include "dolphin/types.h"
#include "global.h"
-#include "MSL_C/MSL_Common/Src/string.h"
#include "dolphin/os/OSMutex.h"
#include "JSystem/JAudio2/JASDvdThread.h"
diff --git a/include/JSystem/JUtility/JUTFont.h b/include/JSystem/JUtility/JUTFont.h
index d1d88b1417..4cb04da538 100644
--- a/include/JSystem/JUtility/JUTFont.h
+++ b/include/JSystem/JUtility/JUTFont.h
@@ -2,7 +2,7 @@
#define JUTFONT_H
#include "JSystem/JUtility/TColor.h"
-#include "MSL_C/MSL_Common/Src/string.h"
+#include "MSL_C/string.h"
#include "dolphin/gx/GX.h"
#include "dolphin/types.h"
diff --git a/include/MSL_C/MSL_Common/Src/wchar_io.h b/include/MSL_C/MSL_Common/Src/wchar_io.h
index d42110c016..be6fb63783 100644
--- a/include/MSL_C/MSL_Common/Src/wchar_io.h
+++ b/include/MSL_C/MSL_Common/Src/wchar_io.h
@@ -3,7 +3,9 @@
#include "MSL_C/MSL_Common/Src/ansi_files.h"
+#ifndef __cplusplus
typedef unsigned short wchar_t;
+#endif
int fwide(FILE* file, int mode);
diff --git a/include/MSL_C/stdlib.h b/include/MSL_C/stdlib.h
new file mode 100644
index 0000000000..0a0532aa40
--- /dev/null
+++ b/include/MSL_C/stdlib.h
@@ -0,0 +1,10 @@
+#ifndef MSL_STDLIB_H_
+#define MSL_STDLIB_H_
+
+#include "MSL_C/MSL_Common/Src/abort_exit.h"
+#include "MSL_C/MSL_Common/Src/alloc.h"
+#include "MSL_C/MSL_Common/Src/arith.h"
+#include "MSL_C/MSL_Common/Src/mbstring.h"
+#include "MSL_C/MSL_Common/Src/strtoul.h"
+
+#endif
diff --git a/include/MSL_C/string.h b/include/MSL_C/string.h
index 21cb9c7274..ea08c98fa4 100644
--- a/include/MSL_C/string.h
+++ b/include/MSL_C/string.h
@@ -1,23 +1,8 @@
#ifndef MSL_STRING_H_
#define MSL_STRING_H_
-#include "MSL_C/MSL_Common/Src/stddef.h"
+#include "MSL_C/MSL_Common/Src/extras.h"
+#include "MSL_C/MSL_Common/Src/mem.h"
+#include "MSL_C/MSL_Common/Src/string.h"
-
-// TODO: move to MSL_C/
-extern "C" {
-void memcpy(void*, const void*, size_t);
-void* memset(void* dest, int ch, size_t count);
-char* strrchr(const char* s, int c);
-char* strchr(const char* s, int c);
-int strncmp(const char* s1, const char* s2, size_t n);
-int strcmp(const char* s1, const char* s2);
-int stricmp(const char*, const char*);
-char* strcat(char* dest, const char* source);
-char* strncpy(char* dest, const char* source, size_t n);
-char* strcpy(char* dest, const char* source);
-size_t strlen(const char* s);
-int tolower(int);
-}
-
-#endif \ No newline at end of file
+#endif
diff --git a/include/d/save/d_save.h b/include/d/save/d_save.h
index 46d8d8dc28..8acbe2582c 100644
--- a/include/d/save/d_save.h
+++ b/include/d/save/d_save.h
@@ -1,7 +1,7 @@
#ifndef D_SAVE_D_SAVE_H
#define D_SAVE_D_SAVE_H
-#include "MSL_C/MSL_Common/Src/string.h"
+#include "MSL_C/string.h"
#include "SSystem/SComponent/c_xyz.h"
#include "dolphin/os/OS.h"
#include "dolphin/types.h"
diff --git a/include/init.h b/include/init.h
index b0937bf24b..12079a2282 100644
--- a/include/init.h
+++ b/include/init.h
@@ -1,7 +1,6 @@
#ifndef INIT_H
#define INIT_H
-#include "MSL_C/MSL_Common/Src/string.h"
#include "dolphin/types.h"
#ifdef __cplusplus