diff --git a/.gitmodules b/.gitmodules index 5ec6f60..0bb9f62 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "sys/ropkg"] path = sys/ropkg url = git@github.com:washh/ropkg.git +[submodule "lib/libfx"] + path = lib/libfx + url = https://g.wash.red/wash/fx.git diff --git a/lib/libc/core/stdio/printf.c b/lib/libc/core/stdio/printf.c index e355825..988c085 100644 --- a/lib/libc/core/stdio/printf.c +++ b/lib/libc/core/stdio/printf.c @@ -1195,21 +1195,17 @@ int vsnprintf(char *buffer, size_t count, const char *format, va_list va) return _vsnprintf(_out_buffer, buffer, count, format, va); } -int fctprintf( +int __libc_fctprintf( void (*out)(char character, void *arg), void *arg, const char *format, - ...) + va_list va) { - va_list va; - va_start(va, format); const out_fct_wrap_type out_fct_wrap = {out, arg}; - const int ret = _vsnprintf( + return _vsnprintf( _out_fct, (char *)(uintptr_t)&out_fct_wrap, (size_t)-1, format, va); - va_end(va); - return ret; } diff --git a/lib/libfx b/lib/libfx new file mode 160000 index 0000000..6b04920 --- /dev/null +++ b/lib/libfx @@ -0,0 +1 @@ +Subproject commit 6b04920d29f6cc2feec24ad8dd8cf3edf2cf5297