]> Chaos Git - corbenik/corbenik.git/commitdiff
More loader cleanup
authorchaoskagami <chaos.kagami@gmail.com>
Tue, 4 Oct 2016 01:52:15 +0000 (21:52 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Tue, 4 Oct 2016 01:52:15 +0000 (21:52 -0400)
external/loader/source/internal.h [deleted file]
external/loader/source/interp.c
external/loader/source/loader.c
external/loader/source/logger.c
external/loader/source/memory.c
external/loader/source/memory.h
external/loader/source/patcher.c
external/loader/source/statics.c

diff --git a/external/loader/source/internal.h b/external/loader/source/internal.h
deleted file mode 100644 (file)
index ba61b2b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __INTERNAL_H
-#define __INTERNAL_H
-
-// These are libc builtins, so there's no need to carry an implementation here.
-void *memcpy(void *dest, const void *src, size_t len);
-size_t strlen(const char *string);
-
-#endif
index e706cf8f62fa1372898c12453272aeda4689e2c3..e1c500170ff031f04db5876a662d9396d67068d2 100644 (file)
@@ -4,7 +4,9 @@
 #include "patcher.h"
 #include "exheader.h"
 #include "fsldr.h"
-#include "internal.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include "memory.h"
 #include "logger.h"
 
index b753db4d577894deac64f31168daa3199e6e7df6..23041c85c78956612b244dd895ab2b8a08dd01ec 100644 (file)
@@ -6,7 +6,9 @@
 #include "pxipm.h"
 #include "srvsys.h"
 #include <lzss.c>
-#include "internal.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include "logger.h"
 
 // TODO - a lot of this is unecessarily verbose and shitty. Clean it up to be
index f57627388878db9f7b78107699a509c91cf8b6f7..6ff8856520f59fe90e5b6d7018e0753ee2838f85 100644 (file)
@@ -1,7 +1,9 @@
 #include <3ds.h>
 #include "patcher.h"
 #include "fsldr.h"
-#include "internal.h"
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include "memory.h"
 
 #ifndef PATH_MAX
index ab3d93159caf2b42c63602c6f85665d1b6f66ede..416492b97e194c8e291b263ebc7713f70ca704e1 100644 (file)
@@ -2,7 +2,7 @@
 #include <string.h>
 #include "patcher.h"
 #include "fsldr.h"
-#include "internal.h"
+#include <string.h>
 
 #ifndef PATH_MAX
 #define PATH_MAX 255
@@ -63,14 +63,3 @@ patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, int offset, c
 
     return i;
 }
-
-size_t
-strnlen(const char *string, size_t maxlen)
-{
-    size_t size;
-
-    for (size = 0; *string && size < maxlen; string++, size++)
-        ;
-
-    return size;
-}
index f0c81e5ba2f6e12080af3dd1522e8ae365d53c5c..ec1f49fb94fbd2740e31f7499bedef9fc0628a91 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef __MEMORY_H
 #define __MEMORY_H
 
-//int memcmp(const void *buf1, const void *buf2, u32 size);
 u8 *memfind(u8 *startPos, u32 size, const void *pattern, u32 patternSize);
 u32 patchMemory(u8 *start, u32 size, const void *pattern, u32 patSize, int offset, const void *replace, u32 repSize, u32 count);
-size_t strnlen(const char *string, size_t maxlen);
 
 #endif
index a94c2e85b1f683353dc8a89082166316a2cf72b8..0024bc79ef18f6fdae59f22fbcb95a4e423c52d3 100644 (file)
@@ -3,7 +3,9 @@
 #include "patcher.h"
 #include "exheader.h"
 #include "fsldr.h"
-#include "internal.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include "memory.h"
 #include "logger.h"
 #include <patch_format.h>
index 856f92fa653d334eaa08e0402492a587c1d6e85e..e4c5dcdc1df5ba30d3c1bb4ea072e55adf08669c 100644 (file)
@@ -5,7 +5,7 @@
 #include "fsreg.h"
 #include "pxipm.h"
 #include "srvsys.h"
-#include "internal.h"
+#include <string.h>
 #include "logger.h"
 
 extern char* fake_heap_start;