Make (v)fprintf alias to (v)printf instead of throwing an error

We don't have files :) (yet)
But if someone wants to fprintf(stderr), then fine. Do it. Except it won't be any different from fprintf(stdout) or printf().
This commit is contained in:
apio 2022-10-08 13:45:57 +02:00
parent a086ec514b
commit ac72d64490

View File

@ -20,9 +20,13 @@ extern "C"
{ {
NOT_IMPLEMENTED("fopen"); 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*) size_t fread(void*, size_t, size_t, FILE*)
{ {
@ -44,9 +48,10 @@ extern "C"
{ {
NOT_IMPLEMENTED("setbuf"); 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) int puts(const char* s)
{ {