1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-17 05:15:16 +00:00

libc cleanup (#1568)

* libc cleanup

* Suggested changes, small alloca tweak

* Remove printf include
This commit is contained in:
Tharo 2023-10-27 15:06:44 +01:00 committed by GitHub
parent 4e55168eaa
commit 3475651701
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
46 changed files with 571 additions and 432 deletions

View file

@ -1,9 +1,9 @@
#include "global.h"
NORETURN void __assert(const char* exp, const char* file, s32 line) {
NORETURN void __assert(const char* assertion, const char* file, int line) {
char msg[256];
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", exp, file, line, osGetThreadId(NULL));
osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", assertion, file, line, osGetThreadId(NULL));
sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
Fault_AddHungupAndCrashImpl(msg, exp);
Fault_AddHungupAndCrashImpl(msg, assertion);
}

View file

@ -40,7 +40,7 @@ void rmonPrintf(const char* fmt, ...) {
va_end(args);
}
void* is_proutSyncPrintf(void* arg, const char* str, u32 count) {
void* is_proutSyncPrintf(void* arg, const char* str, size_t count) {
u32 data;
s32 pos;
s32 start;