diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-26 02:05:21 -0500 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2009-01-26 02:05:21 -0500 |
commit | ba132e9e521218efc5d35aa5f7a024cba93f5e29 (patch) | |
tree | 9328162d51cc85d99cf7c18b40e3b9684a17dedf /lib/utils_base.h | |
parent | 0a74b6fda08c484cba7216596d2ffa3931b900e5 (diff) | |
download | monitoring-plugins-ba132e9e521218efc5d35aa5f7a024cba93f5e29.tar.gz |
Make extract_value more generic:
Add a separator argument passed using defines.
Diffstat (limited to 'lib/utils_base.h')
-rw-r--r-- | lib/utils_base.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/utils_base.h b/lib/utils_base.h index c34f0445..f40fdb0f 100644 --- a/lib/utils_base.h +++ b/lib/utils_base.h | |||
@@ -56,6 +56,12 @@ int np_warn_if_not_root(void); | |||
56 | * This function can be used to parse NTP control packet data and performance | 56 | * This function can be used to parse NTP control packet data and performance |
57 | * data strings. | 57 | * data strings. |
58 | */ | 58 | */ |
59 | char *np_extract_value(const char*, const char*); | 59 | char *np_extract_value(const char*, const char*, char); |
60 | |||
61 | /* | ||
62 | * Same as np_extract_value with separator suitable for NTP control packet | ||
63 | * payloads (comma) | ||
64 | */ | ||
65 | #define np_extract_ntpvar(l, n) np_extract_value(l, n, ',') | ||
60 | 66 | ||
61 | #endif /* _UTILS_BASE_ */ | 67 | #endif /* _UTILS_BASE_ */ |