aboutsummaryrefslogtreecommitdiff
path: root/xsnprintf.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-01-15 08:34:24 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-01-15 08:34:24 +0000
commitc0a3f897757eda924c3f6f4768fa356e312c47bd (patch)
treeb4694f0f3410edcaff64481e62d54dbdfc1993d8 /xsnprintf.h
parentMerge branch 'selection-extend-force-character-wise' (diff)
parentAdd xsnprintf() and remove some unnecessary strlen(3) calls (diff)
Merge branch 'xsnprintf'
Diffstat (limited to 'xsnprintf.h')
-rw-r--r--xsnprintf.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/xsnprintf.h b/xsnprintf.h
new file mode 100644
index 00000000..c745ef3e
--- /dev/null
+++ b/xsnprintf.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#include <stdarg.h>
+#include <stddef.h>
+#include "macros.h"
+
+size_t xsnprintf(char *buf, size_t len, const char *fmt, ...) PRINTF(3) NONNULL_ARGS;
+size_t xvsnprintf(char *buf, size_t len, const char *fmt, va_list ap) VPRINTF(3) NONNULL_ARGS;