summaryrefslogtreecommitdiffstats
path: root/plugins/utils.h
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-18 18:51:23 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-18 18:51:23 (GMT)
commit369d98cc3640a5db78305c8fb0aefdd7cd6cc9f0 (patch)
tree22275ed2d4ea8244b88bdad5cf38ebee6b4b95bd /plugins/utils.h
parenta51e8f82e7c5a51893d43c7d00495ceba6a661ab (diff)
downloadmonitoring-plugins-369d98cc3640a5db78305c8fb0aefdd7cd6cc9f0.tar.gz
plugins/utils: Use C99 booleans
Diffstat (limited to 'plugins/utils.h')
-rw-r--r--plugins/utils.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/plugins/utils.h b/plugins/utils.h
index cb979ce..62e489b 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -16,6 +16,8 @@ suite of plugins. */
16/* now some functions etc are being defined in ../lib/utils_base.c */ 16/* now some functions etc are being defined in ../lib/utils_base.c */
17#include "utils_base.h" 17#include "utils_base.h"
18 18
19#include <stdbool.h>
20
19 21
20#ifdef NP_EXTRA_OPTS 22#ifdef NP_EXTRA_OPTS
21/* Include extra-opts functions if compiled in */ 23/* Include extra-opts functions if compiled in */
@@ -34,21 +36,21 @@ extern time_t start_time, end_time;
34 36
35/* Test input types */ 37/* Test input types */
36 38
37int is_integer (char *); 39bool is_integer (char *);
38int is_intpos (char *); 40bool is_intpos (char *);
39int is_intneg (char *); 41bool is_intneg (char *);
40int is_intnonneg (char *); 42bool is_intnonneg (char *);
41int is_intpercent (char *); 43bool is_intpercent (char *);
42int is_uint64(char *number, uint64_t *target); 44bool is_uint64(char *number, uint64_t *target);
43int is_int64(char *number, int64_t *target); 45bool is_int64(char *number, int64_t *target);
44 46
45int is_numeric (char *); 47bool is_numeric (char *);
46int is_positive (char *); 48bool is_positive (char *);
47int is_negative (char *); 49bool is_negative (char *);
48int is_nonnegative (char *); 50bool is_nonnegative (char *);
49int is_percentage (char *); 51bool is_percentage (char *);
50 52
51int is_option (char *); 53bool is_option (char *);
52 54
53/* Generalized timer that will do milliseconds if available */ 55/* Generalized timer that will do milliseconds if available */
54#ifndef HAVE_STRUCT_TIMEVAL 56#ifndef HAVE_STRUCT_TIMEVAL