diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2024-01-05 09:58:59 -0600 |
|---|---|---|
| committer | louist103 <35883445+louist103@users.noreply.github.com> | 2024-01-05 18:00:59 -0500 |
| commit | 9be74e0026b563ba680e1dc157521eccc89fc03f (patch) | |
| tree | ad27464c5b19b239991ed369454413ea3a30c802 /src/boot/O2/sprintf.c | |
| parent | 7c7021f3a211a3384d25b5a4175040750d50c248 (diff) | |
Move source into subdirectory
Diffstat (limited to 'src/boot/O2/sprintf.c')
| -rw-r--r-- | src/boot/O2/sprintf.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/boot/O2/sprintf.c b/src/boot/O2/sprintf.c deleted file mode 100644 index 773b982ff..000000000 --- a/src/boot/O2/sprintf.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "ultra64.h" -#include "libc/stdlib.h" -#include "libc/string.h" - -void* proutSprintf(void* dst, const char* fmt, size_t size) { - return (void*)((uintptr_t)memcpy(dst, fmt, size) + size); -} - -int vsprintf(char* dst, char* fmt, va_list args) { - int ans = _Printf(proutSprintf, dst, fmt, args); - if (ans > -1) { - dst[ans] = 0; - } - return ans; -} - -int sprintf(char* dst, const char* fmt, ...) { - int ans; - va_list args; - va_start(args, fmt); - - ans = _Printf(&proutSprintf, dst, fmt, args); - if (ans > -1) { - dst[ans] = 0; - } - - va_end(args); - - return ans; -} |
