aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-01-04 13:16:39 +0100
committerGitHub <noreply@github.com>2024-01-04 13:16:39 +0100
commitf23e9dc7bb7ffc4fe0b5c1151ecefa29a0ce5b79 (patch)
treef935e033f08dad050b163ab41a827da8feb55125 /src/include
parent7f9973bd0ce2366c09c614d2fdb2883f27ba1106 (diff)
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
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index 7238b04b3..b20305e33 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -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,