Code

markupf for translation
[nagiosplug.git] / plugins / utils.h
index d95422ad9ccb2e71a2721bd84c2324246057bbc5..83793e4650ab5891d57f1abcccb3b30f93fb56eb 100644 (file)
@@ -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);
@@ -92,37 +97,49 @@ char *state_text (int result);
 #define COPYRIGHT "Copyright (c) %s Nagios Plugin Development Team\n\
 \t<%s>\n\n"
 
-#define HELP_VRSN "\
+#define UT_HLP_VRS "\
+       %s (-h | --help) for detailed help\n\
+       %s (-V | --version) for version information\n"
+
+#define UT_HELP_VRSN "\
 \nOptions:\n\
  -h, --help\n\
     Print detailed help screen\n\
  -V, --version\n\
     Print version information\n"
 
-#define HOST_PORT "\
+#define UT_HOST_PORT "\
  -H, --hostname=ADDRESS\n\
     Host name or IP Address\n\
  -%c, --port=INTEGER\n\
     Port number (default: %s)\n"
 
-#define IPv46 "\
+#define UT_IPv46 "\
  -4, --use-ipv4\n\
     Use IPv4 connection\n\
  -6, --use-ipv6\n\
     Use IPv6 connection\n"
 
-#define VRBS "\
+#define UT_VERBOSE "\
  -v, --verbose\n\
     Show details for command-line debugging (Nagios may truncate output)\n"
 
-#define WARN_CRIT_TO "\
+#define UT_WARN_CRIT "\
  -w, --warning=DOUBLE\n\
     Response time to result in warning status (seconds)\n\
  -c, --critical=DOUBLE\n\
-    Response time to result in critical status (seconds)\n\
- -t, --timeout=INTEGER\n\
-    Seconds before connection times out (default: %d)\n"
+    Response time to result in critical status (seconds)\n"
 
-#define TIMEOUT "\
+#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"