summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 4c0cab0..6e10a57 100644
--- a/misc.c
+++ b/misc.c
@@ -201,6 +201,10 @@ char *skip_whitespace(const char *str) {
}
}
+int vformat_len(const char *fmt, va_list args) {
+ return vsnprintf(NULL, 0, fmt, args);
+}
+
int format_len(const char *fmt, ...) {
int len = 0;
va_list args;