diff --git a/libs/libc/src/stdio.cpp b/libs/libc/src/stdio.cpp index a59357ad..7768dc77 100644 --- a/libs/libc/src/stdio.cpp +++ b/libs/libc/src/stdio.cpp @@ -20,9 +20,13 @@ extern "C" { NOT_IMPLEMENTED("fopen"); } - int fprintf(FILE*, const char*, ...) + int fprintf(FILE*, const char* format, ...) // FIXME: Make fprintf print to the selected file instead of stdout. { - NOT_IMPLEMENTED("fprintf"); + va_list ap; + va_start(ap, format); + int written = vprintf(format, ap); + va_end(ap); + return written; } size_t fread(void*, size_t, size_t, FILE*) { @@ -44,9 +48,10 @@ extern "C" { NOT_IMPLEMENTED("setbuf"); } - int vfprintf(FILE*, const char*, va_list) + int vfprintf(FILE*, const char* format, + va_list ap) // FIXME: Make vfprintf print to the selected file instead of stdout. { - NOT_IMPLEMENTED("vfprintf"); + return vprintf(format, ap); } int puts(const char* s) {