LibC: add probably functional *printf

I wrote a general printf function that takes an putc function
pointer. We can use this to implement all the printf family
functions. I haven't done thorough testing with this, but it seems
to be functional for the most part
This commit is contained in:
Bananymous
2023-05-10 02:00:28 +03:00
parent 1cf7ef3de6
commit d5ce4c9d2c
4 changed files with 410 additions and 43 deletions

View File

@@ -0,0 +1,11 @@
#pragma once
#include <sys/cdefs.h>
#include <stdarg.h>
#include <stddef.h>
__BEGIN_DECLS
int printf_impl(const char* format, va_list arguments, int (*putc_fun)(int, void*), void* data);
__END_DECLS