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.
This commit is contained in:
parent
f31b113e7e
commit
422cadfd5f
6 changed files with 72 additions and 23 deletions
1
util.h
1
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, ...);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue