Centralise all sprintf()/snprintf() calls in a compatibility wrapper pv_snprintf()

This commit is contained in:
Andrew Wood
2023-07-22 22:40:07 +01:00
parent cab177814a
commit b6d1f62979
13 changed files with 205 additions and 159 deletions
+8
View File
@@ -9,6 +9,8 @@
#ifndef _PV_H
#define _PV_H 1
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
@@ -53,6 +55,12 @@ extern unsigned long long pv_getnum_ull(const char *);
*/
extern int pv_getnum_check(const char *, pv_numtype_t);
/*
* Wrapper for sprintf(), with less safe fallbacks for systems without that
* function.
*/
extern int pv_snprintf(char *, size_t, const char *, ...);
/*
* Main PV functions.
*/