Add an implementation of the BSD function strtonum (#2238)

The main difference with the original function is that we allow to
specify the base.
Credit for the original idea and the first implementation to @0xA50C1A1
This commit is contained in:
Ivan Nardi
2024-01-04 13:16:39 +01:00
committed by GitHub
parent 7f9973bd0c
commit f23e9dc7bb
3 changed files with 62 additions and 0 deletions
+1
View File
@@ -2209,6 +2209,7 @@ extern "C" {
/* ******************************* */
int64_t ndpi_strtonum(const char *numstr, int64_t minval, int64_t maxval, const char **errstrp, int base);
int ndpi_vsnprintf(char * str, size_t size, char const * format, va_list va_args);
int ndpi_snprintf(char * str, size_t size, char const * format, ...);
struct tm *ndpi_gmtime_r(const time_t *timep,