diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2023-11-26 22:01:42 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-27 12:01:42 +1100 |
| commit | 6dd16009361b2561f77b7933981611a9b975fa21 (patch) | |
| tree | 606f9bd82debe312be65d4e05798e9dc2435ae41 /src/boot/O2/sprintf.c | |
| parent | 34492a4386446fc82220fe0684ff521d760e84bd (diff) | |
Organize `libc64` files (#1492)
* Move qrand to libc64
* use an union to avoid type punning
* __osMalloc
* math64.c
* fixed_point.h
* sleep
* aprintf.h
* sprintf
* malloc
* use original names on aprintf.c and malloc.c
* qrand cleanup pass
* use original names of sleep.c
* og names for sprintf
* more cleanup
* format
* fixes
* whoops
* use ARRAY_COUNT again
* comment
* Use `fu`
* forgot this one
* review
* fix
* sneak a tiny cleanup
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; -} |
