summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorLaslo Hunhold <dev@frign.de>2018-05-19 19:33:04 +0200
committerAaron Marcher <me@drkhsh.at>2018-05-19 19:44:02 +0200
commit422cadfd5ffd78ae1b8fdf15734e03bd0333b26e (patch)
treecf243529272e96e3d65b44afecd08cbb9f4e3005 /util.h
parentf31b113e7e85bf7057cb88a70d88c5ce9325e208 (diff)
Implement esnprintf() and make formatted calls more efficient
Within the components, snprintf() was unchecked and had inefficient calls in some places. We implement esnprintf() that does all the dirty laundry for us and use it exclusively now.
Diffstat (limited to 'util.h')
-rw-r--r--util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.h b/util.h
index bd05574..5111b37 100644
--- a/util.h
+++ b/util.h
@@ -8,6 +8,7 @@ extern char *argv0;
void warn(const char *, ...);
void die(const char *, ...);
+int esnprintf(char *str, size_t size, const char *fmt, ...);
const char *bprintf(const char *fmt, ...);
const char *fmt_scaled(size_t);
int pscanf(const char *path, const char *fmt, ...);