summaryrefslogtreecommitdiffstats
path: root/plugins/utils.h.in
diff options
context:
space:
mode:
authorKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-01-13 12:15:16 +0000
committerKarl DeBisschop <kdebisschop@users.sourceforge.net>2003-01-13 12:15:16 +0000
commit0c3386274ef5002dffc20337ef02407f24d7400c (patch)
tree1e78bac7844a548e56a642b35acfe1fd67342f71 /plugins/utils.h.in
parentde5650f28e4e43a7264913953f95a75d8afe23f0 (diff)
downloadmonitoring-plugins-0c3386274ef5002dffc20337ef02407f24d7400c.tar.gz
convert PROGANE from a define to a const char
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@238 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.h.in')
-rw-r--r--plugins/utils.h.in26
1 files changed, 6 insertions, 20 deletions
diff --git a/plugins/utils.h.in b/plugins/utils.h.in
index 96bf9b2f..317ec46f 100644
--- a/plugins/utils.h.in
+++ b/plugins/utils.h.in
@@ -16,7 +16,7 @@ suite of plugins. */
16char *my_basename (char *); 16char *my_basename (char *);
17void support (void); 17void support (void);
18char *clean_revstring (const char *revstring); 18char *clean_revstring (const char *revstring);
19void print_revision (char *, const char *); 19void print_revision (const char *, const char *);
20void terminate (int result, char *msg, ...); 20void terminate (int result, char *msg, ...);
21extern RETSIGTYPE timeout_alarm_handler (int); 21extern RETSIGTYPE timeout_alarm_handler (int);
22 22
@@ -69,28 +69,14 @@ char *ssprintf (char *str, const char *fmt, ...); /* deprecate for asprintf */
69char *strpcpy (char *dest, const char *src, const char *str); 69char *strpcpy (char *dest, const char *src, const char *str);
70char *strpcat (char *dest, const char *src, const char *str); 70char *strpcat (char *dest, const char *src, const char *str);
71 71
72/* Handle comparisions for STATE_* */ 72int max_state (int a, int b);
73int max_state(int, int);
74 73
75#define max(a,b) ((a)>(b))?(a):(b) 74void usage (char *msg);
75void usage2(char *msg, char *arg);
76void usage3(char *msg, char arg);
76 77
77#define usage(msg) {\
78 printf(msg);\
79 print_usage();\
80 exit(STATE_UNKNOWN);\
81}
82 78
83#define usage2(msg,arg) {\ 79#define max(a,b) (((a)>(b))?(a):(b))
84 printf("%s: %s - %s\n",PROGNAME,msg,arg);\
85 print_usage();\
86 exit(STATE_UNKNOWN);\
87}
88
89#define usage3(msg,arg) {\
90 printf("%s: %s - %c\n",PROGNAME,msg,arg);\
91 print_usage();\
92 exit(STATE_UNKNOWN);\
93}
94 80
95#define state_text(a) \ 81#define state_text(a) \
96(a)==0?"OK":\ 82(a)==0?"OK":\