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:
11
libc/include/printf_impl.h
Normal file
11
libc/include/printf_impl.h
Normal 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
|
||||
Reference in New Issue
Block a user