aboutsummaryrefslogtreecommitdiff
path: root/plugins/utils.h
diff options
context:
space:
mode:
authorGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-08-02 18:22:51 +0000
committerGravatar Karl DeBisschop <kdebisschop@users.sourceforge.net> 2003-08-02 18:22:51 +0000
commit3c48edf660facd4bd93181333b48960afd83934b (patch)
treeb6f4399575f3029580888e4e798b6cb9b94bbe13 /plugins/utils.h
parent743a44e936edbb649e67f99fdf7712e1c60eee39 (diff)
downloadmonitoring-plugins-3c48edf660facd4bd93181333b48960afd83934b.tar.gz
ifdef so utils.h can be header for utils.c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@633 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/utils.h')
-rw-r--r--plugins/utils.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/plugins/utils.h b/plugins/utils.h
index b10f0e5a..e581afaa 100644
--- a/plugins/utils.h
+++ b/plugins/utils.h
@@ -13,18 +13,23 @@ suite of plugins. */
/* Standardize version information, termination */
-char *my_basename (char *);
void support (void);
char *clean_revstring (const char *revstring);
void print_revision (const char *, const char *);
void die (int result, const char *fmt, ...);
-void terminate (int result, char *msg, ...);
-extern RETSIGTYPE timeout_alarm_handler (int);
+void terminate (int result, const char *msg, ...);
/* Handle timeouts */
-time_t start_time, end_time;
+#ifdef LOCAL_TIMEOUT_ALARM_HANDLER
+extern int timeout_interval;
+RETSIGTYPE timeout_alarm_handler (int);
+#else
int timeout_interval = DEFAULT_SOCKET_TIMEOUT;
+extern RETSIGTYPE timeout_alarm_handler (int);
+#endif
+
+time_t start_time, end_time;
/* Test input types */
@@ -59,8 +64,8 @@ double delta_time (struct timeval tv);
/* Handle strings safely */
void strip (char *buffer);
-char *strscpy (char *dest, char *src);
-char *strscat (char *dest, char *src);
+char *strscpy (char *dest, const char *src);
+char *strscat (char *dest, const char *src);
char *strnl (char *str);
char *ssprintf (char *str, const char *fmt, ...); /* deprecate for asprintf */
char *strpcpy (char *dest, const char *src, const char *str);
@@ -124,3 +129,13 @@ char *state_text (int result);
#define UT_TIMEOUT "\
-t, --timeout=INTEGER\n\
Seconds before connection times out (default: %d)\n"
+
+#define UT_SUPPORT "\n\
+Send email to nagios-users@lists.sourceforge.net if you have questions\n\
+regarding use of this software. To submit patches or suggest improvements,\n\
+send email to nagiosplug-devel@lists.sourceforge.net\n"
+
+#define UT_NOWARRANTY "\
+The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute\n\
+copies of the plugins under the terms of the GNU General Public License.\n\
+For more information about these matters, see the file named COPYING.\n"