summaryrefslogtreecommitdiff
path: root/src/lib/libc/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-11 12:10:55 -0400
committerIan Moffett <ian@osmora.org>2025-10-11 12:13:19 -0400
commit62fce6197f3f4b814e64f1990332346462114bbf (patch)
tree5dfe4b237c3d9dad323ed0d777f160d1ee027ce4 /src/lib/libc/include
parent83fbe2b2f748b976a7e2df4adc17f6b20aa11687 (diff)
libc: stdio: Add vsnprintf() and printf() impl
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/lib/libc/include')
-rw-r--r--src/lib/libc/include/stdio.h13
-rw-r--r--src/lib/libc/include/string.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/libc/include/stdio.h b/src/lib/libc/include/stdio.h
index e97e07a..a90c4ad 100644
--- a/src/lib/libc/include/stdio.h
+++ b/src/lib/libc/include/stdio.h
@@ -30,6 +30,9 @@
#ifndef _STDIO_H
#define _STDIO_H 1
+#include <stdarg.h>
+#include <stddef.h>
+
#define EOF (-1)
/*
@@ -43,4 +46,14 @@
*/
int puts(const char *s);
+/*
+ * Write a formatted string to a buffer
+ */
+int vsnprintf(char *s, size_t size, const char *fmt, va_list ap);
+
+/*
+ * Print a formatted string
+ */
+int printf(const char *__restrict fmt, ...);
+
#endif /* _!STDIO_H */
diff --git a/src/lib/libc/include/string.h b/src/lib/libc/include/string.h
index 3923a3b..1572400 100644
--- a/src/lib/libc/include/string.h
+++ b/src/lib/libc/include/string.h
@@ -31,6 +31,7 @@
#define _STRING_H 1
#include <stddef.h>
+#include <stdint.h>
/*
* Get the length of a string