feat(stdio): printf family

This commit is contained in:
2026-09-05 16:27:09 -04:00
parent 7b11452b87
commit 87ab610a9b
4 changed files with 3760 additions and 0 deletions
+33
View File
@@ -25,6 +25,7 @@
#include <vlibc/features.h>
#include <stdarg.h>
#include <stddef.h>
#include <sys/types.h>
@@ -299,4 +300,36 @@ fopen64(const char *restrict path, const char *restrict mode);
}
#endif
/* formatted output (todo 16) */
int
printf(const char *restrict format, ...);
int
fprintf(FILE *restrict stream, const char *restrict format, ...);
int
sprintf(char *restrict s, const char *restrict format, ...);
int
snprintf(char *restrict s, size_t n, const char *restrict format, ...);
int
vprintf(const char *restrict format, va_list ap);
int
vfprintf(FILE *restrict stream, const char *restrict format, va_list ap);
int
vsprintf(char *restrict s, const char *restrict format, va_list ap);
int
vsnprintf(char *restrict s, size_t n, const char *restrict format, va_list ap);
int
dprintf(int fd, const char *restrict format, ...);
int
vdprintf(int fd, const char *restrict format, va_list ap);
void
perror(const char *s);
#if VLIBC_LEVEL_GE(2)
int
asprintf(char **restrict strp, const char *restrict format, ...);
int
vasprintf(char **restrict strp, const char *restrict format, va_list ap);
#endif
#endif /* VLIBC_STDIO_H */