mirror of
https://github.com/zeldaret/oot
synced 2026-07-09 14:45:41 -04:00
f1d183d6fe
* Restructure files, begin header restructure * Format * us2dex * Fix parallel spelling Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com> * Use OS_K0_TO_PHYSICAL in place of VIRTUAL_TO_PHYSICAL in osAiSetNextBuffer * Uppercase hex, exception vector address defines * Interrupt flags 1 Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> * Interrupt flags 2 Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com> Co-authored-by: JoshDuMan <40190173+JoshDuMan@users.noreply.github.com> Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
29 lines
561 B
C
29 lines
561 B
C
#include "global.h"
|
|
|
|
void* proutSprintf(void* dst, const char* fmt, u32 size) {
|
|
return (void*)((u32)memcpy(dst, fmt, size) + size);
|
|
}
|
|
|
|
s32 vsprintf(char* dst, const char* fmt, va_list args) {
|
|
s32 ret = _Printf(proutSprintf, dst, fmt, args);
|
|
if (ret > -1) {
|
|
dst[ret] = '\0';
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
s32 sprintf(char* dst, const char* fmt, ...) {
|
|
s32 ret;
|
|
va_list args;
|
|
va_start(args, fmt);
|
|
|
|
ret = _Printf(proutSprintf, dst, fmt, args);
|
|
if (ret > -1) {
|
|
dst[ret] = '\0';
|
|
}
|
|
|
|
va_end(args);
|
|
|
|
return ret;
|
|
}
|