X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.h;fp=src%2Fcommon.h;h=434ed019bc2d1a2359db6bbcf8d982fba98e091c;hb=9901983046c6a4e2793c060b3c10b4c7d467f813;hp=b2e4c6766ad20b4552f6f64fd49b483fe4aaf7a3;hpb=3281172053c295f958c5e2fa6e8a4ffa3b8d0565;p=collectd.git diff --git a/src/common.h b/src/common.h index b2e4c676..434ed019 100644 --- a/src/common.h +++ b/src/common.h @@ -347,6 +347,10 @@ int service_name_to_port_number (const char *service_name); * failure. If failure is returned, ret_value is not touched. */ int strtoderive (const char *string, derive_t *ret_value); +/** Parse a string to a gauge_t value. Returns zero on success or non-zero on + * failure. If failure is returned, ret_value is not touched. */ +int strtogauge (const char *string, gauge_t *ret_value); + int strarray_add (char ***ret_array, size_t *ret_array_len, char const *str); void strarray_free (char **array, size_t array_len);