summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5133eb5)
raw | patch | inline | side by side (parent: 5133eb5)
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Fri, 1 Aug 2003 06:04:01 +0000 (06:04 +0000) | ||
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | |
Fri, 1 Aug 2003 06:04:01 +0000 (06:04 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@627 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_dummy.c | patch | blob | history |
diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c
index ca37e98e91b9d976862c1c1246c0ff3ba1cdd3ef..c2f1f50d871be633be9b5baf324b7c3896c5303d 100644 (file)
--- a/plugins/check_dummy.c
+++ b/plugins/check_dummy.c
#include "utils.h"
const char *progname = "check_dummy";
+const char *revision = "$Revision$";
+const char *copyright = "1999-2003";
+const char *email = "nagiosplug-devel@lists.sourceforge.net";
-void print_help (const char *);
-void print_usage (const char *);
+void
+print_usage (void)
+{
+ printf (_("Usage: %s <integer state>\n"), progname);
+}
+
+void
+print_help (void)
+{
+ print_revision (progname, revision);
+
+ printf (_(COPYRIGHT), copyright, email);
+
+ print_usage ();
+
+ printf (_(HELP_VRSN));
+
+ printf (_("\n\
+This plugin will simply return the state corresponding to the numeric value\n\
+of the <state> argument.\n"));
+}
int
main (int argc, char **argv)
int result;
if (argc != 2) {
- printf ("Incorrect number of arguments supplied\n");
+ printf (_("Incorrect number of arguments supplied\n"));
exit (STATE_UNKNOWN);
}
else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) {
- print_revision (argv[0], "$Revision$");
+ print_revision (progname, revision);
exit (STATE_OK);
}
else if (strcmp (argv[1], "-h") == 0 || strcmp (argv[1], "--help") == 0) {
- print_help (argv[0]);
+ print_help ();
exit (STATE_OK);
}
else if (!is_integer (argv[1])) {
- print_usage (argv[0]);
+ print_usage ();
exit (STATE_UNKNOWN);
}
result = atoi (argv[1]);
return result;
}
-
-void
-print_help (const char *cmd)
-{
- print_revision (cmd, "$Revision$");
- printf ("Copyright (c) 1999 Ethan Galstad (nagios@nagios.org)\n"
- "License: GPL\n\n");
- print_usage (cmd);
- printf
- ("\nThis plugin will simply return the state corresponding to the numeric value\n"
- "of the <state> argument.\n");
-}
-
-void
-print_usage (const char *cmd)
-{
- printf ("Usage: %s <integer state>\n", cmd);
-}