aboutsummaryrefslogtreecommitdiff
path: root/xsnprintf.h
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-01-14 21:30:06 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2021-01-14 21:30:06 +0000
commit3f4cfa338b5035b3789ea414eab9f139a18d140b (patch)
treeb4694f0f3410edcaff64481e62d54dbdfc1993d8 /xsnprintf.h
parentMerge branch 'selection-extend-force-character-wise' (diff)
Add xsnprintf() and remove some unnecessary strlen(3) calls
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;