From 565b1f7579876e08f2898fe07549cb348a222e93 Mon Sep 17 00:00:00 2001 From: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Date: Mon, 11 Oct 2021 19:28:16 +0100 Subject: `flg_set.c` OK and documented (#335) * Draw OK, Update very much not * Flag table imported * Update OK * Actually OK this time * Begin documenting * Rename some stuff * Rename functions * spec * Review * Format * Anghelo's review * Fix lifemeter bss * Format * Missed one * idle.c bss --- src/boot_O2/gfxprint.c | 11 +++++++---- src/boot_O2/printutils.c | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src/boot_O2') diff --git a/src/boot_O2/gfxprint.c b/src/boot_O2/gfxprint.c index f65d88200..a6f84a7a4 100644 --- a/src/boot_O2/gfxprint.c +++ b/src/boot_O2/gfxprint.c @@ -171,15 +171,18 @@ Gfx* GfxPrint_Close(GfxPrint* this) { return ret; } -void GfxPrint_VPrintf(GfxPrint* this, const char* fmt, va_list args) { - PrintUtils_VPrintf((PrintCallback*)&this->callback, fmt, args); +s32 GfxPrint_VPrintf(GfxPrint* this, const char* fmt, va_list args) { + return PrintUtils_VPrintf((PrintCallback*)&this->callback, fmt, args); } -void GfxPrint_Printf(GfxPrint* this, const char* fmt, ...) { +s32 GfxPrint_Printf(GfxPrint* this, const char* fmt, ...) { + s32 ret; va_list args; va_start(args, fmt); - GfxPrint_VPrintf(this, fmt, args); + ret = GfxPrint_VPrintf(this, fmt, args); va_end(args); + + return ret; } diff --git a/src/boot_O2/printutils.c b/src/boot_O2/printutils.c index ca62b91b7..3fb8cf367 100644 --- a/src/boot_O2/printutils.c +++ b/src/boot_O2/printutils.c @@ -1,14 +1,17 @@ #include "global.h" -void PrintUtils_VPrintf(PrintCallback* pfn, const char* fmt, va_list args) { - _Printf(*pfn, pfn, fmt, args); +s32 PrintUtils_VPrintf(PrintCallback* pfn, const char* fmt, va_list args) { + return _Printf(*pfn, pfn, fmt, args); } -void PrintUtils_Printf(PrintCallback* pfn, const char* fmt, ...) { +s32 PrintUtils_Printf(PrintCallback* pfn, const char* fmt, ...) { + s32 ret; va_list args; va_start(args, fmt); - PrintUtils_VPrintf(pfn, fmt, args); + ret = PrintUtils_VPrintf(pfn, fmt, args); va_end(args); + + return ret; } -- cgit v1.2.3