From 422cadfd5ffd78ae1b8fdf15734e03bd0333b26e Mon Sep 17 00:00:00 2001 From: Laslo Hunhold Date: Sat, 19 May 2018 19:33:04 +0200 Subject: 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. --- util.h | 1 + 1 file changed, 1 insertion(+) (limited to 'util.h') 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, ...); -- cgit v1.2.3