libc strcmp,mallon,strlen implementation
This commit is contained in:
parent
22cbfd860d
commit
c0649b8d24
|
@ -109,6 +109,9 @@ void LibC_Register(SymbolsResolver* sym) {
|
||||||
LIB_FUNCTION("hcuQgD53UxM", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::printf);
|
LIB_FUNCTION("hcuQgD53UxM", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::printf);
|
||||||
LIB_FUNCTION("YQ0navp+YIc", "libc", 1, "libc", 1, 1, puts);
|
LIB_FUNCTION("YQ0navp+YIc", "libc", 1, "libc", 1, 1, puts);
|
||||||
LIB_FUNCTION("cpCOXWMgha0", "libc", 1, "libc", 1, 1, rand);
|
LIB_FUNCTION("cpCOXWMgha0", "libc", 1, "libc", 1, 1, rand);
|
||||||
|
LIB_FUNCTION("Ovb2dSJOAuE", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strcmp);
|
||||||
|
LIB_FUNCTION("gQX+4GDQjpM", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::malloc);
|
||||||
|
LIB_FUNCTION("j4ViWNHEgww", "libc", 1, "libc", 1, 1, Emulator::HLE::Libraries::LibC::strlen);
|
||||||
LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc);
|
LIB_OBJ("P330P3dFF68", "libc", 1, "libc", 1, 1, &HLE::Libs::LibC::g_need_sceLibc);
|
||||||
|
|
||||||
LIB_FUNCTION("z+P+xCnWLBk", "libc", 1, "libc", 1, 1, _ZdlPv);
|
LIB_FUNCTION("z+P+xCnWLBk", "libc", 1, "libc", 1, 1, _ZdlPv);
|
||||||
|
|
|
@ -28,4 +28,9 @@ void* PS4_SYSV_ABI memcpy(void* dest, const void* src, size_t n) { return std::m
|
||||||
|
|
||||||
void* PS4_SYSV_ABI memset(void* s, int c, size_t n) { return std::memset(s, c, n); }
|
void* PS4_SYSV_ABI memset(void* s, int c, size_t n) { return std::memset(s, c, n); }
|
||||||
|
|
||||||
|
void* PS4_SYSV_ABI malloc(size_t size) { return std::malloc(size); }
|
||||||
|
|
||||||
|
int PS4_SYSV_ABI strcmp(const char* str1, const char* str2) { return std::strcmp(str1, str2); }
|
||||||
|
|
||||||
|
size_t PS4_SYSV_ABI strlen(const char* str) { return std::strlen(str); }
|
||||||
}; // namespace Emulator::HLE::Libraries::LibC
|
}; // namespace Emulator::HLE::Libraries::LibC
|
|
@ -13,4 +13,7 @@ PS4_SYSV_ABI int atexit(void (*func)());
|
||||||
int PS4_SYSV_ABI memcmp(const void* s1, const void* s2, size_t n);
|
int PS4_SYSV_ABI memcmp(const void* s1, const void* s2, size_t n);
|
||||||
void* PS4_SYSV_ABI memcpy(void* dest, const void* src, size_t n);
|
void* PS4_SYSV_ABI memcpy(void* dest, const void* src, size_t n);
|
||||||
void* PS4_SYSV_ABI memset(void* s, int c, size_t n);
|
void* PS4_SYSV_ABI memset(void* s, int c, size_t n);
|
||||||
|
void* PS4_SYSV_ABI malloc(size_t size);
|
||||||
|
int PS4_SYSV_ABI strcmp(const char* str1, const char* str2);
|
||||||
|
size_t PS4_SYSV_ABI strlen(const char* str);
|
||||||
} // namespace Emulator::HLE::Libraries::LibC
|
} // namespace Emulator::HLE::Libraries::LibC
|
Loading…
Reference in New Issue