summaryrefslogtreecommitdiff
path: root/kernel/src/klibc/stdio.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/klibc/stdio.hpp')
-rw-r--r--kernel/src/klibc/stdio.hpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/kernel/src/klibc/stdio.hpp b/kernel/src/klibc/stdio.hpp
new file mode 100644
index 0000000..cce2bcf
--- /dev/null
+++ b/kernel/src/klibc/stdio.hpp
@@ -0,0 +1,18 @@
+#pragma once
+
+#include <cstdint>
+#include <cstdarg>
+
+namespace klibc {
+
+ int _snprintf(char *buffer, std::size_t bufsz, char const *fmt, va_list vlist);
+
+ inline static int __printfbuf(char* buffer, std::size_t bufsf, char const* fmt, ...) {
+ va_list val;
+ va_start(val, fmt);
+ return _snprintf(buffer,bufsf,fmt,val);
+ va_end(val);
+ }
+
+ void printf(const char* fmt, ...);
+}; \ No newline at end of file