userspace/libc: implement fprintf function

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
2025-02-12 02:43:43 +02:00
parent 24fd486764
commit b05868d120
2 changed files with 9 additions and 2 deletions

View File

@ -214,7 +214,14 @@ export FILE *fopen(const char *restrict pathname, const char *restrict mode)
return file;
}
export int fprintf(FILE *restrict, const char *restrict, ...);
export int fprintf(FILE *restrict stream, const char *restrict format, ...)
{
va_list args;
va_start(args, format);
int ret = vfprintf(stream, format, args);
va_end(args);
return ret;
}
export int fputc(int c, FILE *stream)
{