diff options
author | dzwdz | 2022-07-29 21:33:15 +0200 |
---|---|---|
committer | dzwdz | 2022-07-29 21:33:15 +0200 |
commit | 99da70deba62de235454ef1852745610a9c9f741 (patch) | |
tree | d4d1297bd3f1df579362603d40a0f7c57ff15c3b /src/user/lib/include | |
parent | df7e4aeeed27c35994bc12614d5ffcb82ec6497b (diff) |
user/libc: properly implement snprintf; the v*printf family
Diffstat (limited to 'src/user/lib/include')
-rw-r--r-- | src/user/lib/include/stdio.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/user/lib/include/stdio.h b/src/user/lib/include/stdio.h index bf9e09e..fe754da 100644 --- a/src/user/lib/include/stdio.h +++ b/src/user/lib/include/stdio.h @@ -1,5 +1,6 @@ #pragma once #include <bits/file.h> +#include <stdarg.h> #include <stddef.h> #define EOF (-1) @@ -8,8 +9,13 @@ #define SEEK_CUR 2 #define SEEK_END 3 -int printf(const char *fmt, ...); -int snprintf(char *str, size_t len, const char *fmt, ...); +int printf(const char *restrict fmt, ...); +int fprintf(FILE *restrict f, const char *restrict fmt, ...); +int snprintf(char *restrict str, size_t len, const char *restrict fmt, ...); + +int vprintf(const char *restrict fmt, va_list ap); +int vfprintf(FILE *restrict f, const char *restrict fmt, va_list ap); +int vsnprintf(char *restrict str, size_t len, const char *restrict fmt, va_list ap); int _klogf(const char *fmt, ...); // for kernel debugging only |