Files
oot/src/libultra/rmon/sprintf.c
T
Tharo f1d183d6fe libultra files and directories restructure (#1038)
* 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>
2021-11-30 19:08:57 -05:00

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;
}