X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_dummy.c;h=2dbbaec843b0bc38ee1f8110338ea6f71bf815b0;hb=3438df79d1fbf7d929467855ffe7b9f1c181c09e;hp=7f50834989c5104f6e179969cc62e26d4630fdba;hpb=0c1c9f51e2c33db04918d2aa322fd1f9a688979b;p=nagiosplug.git diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c index 7f50834..2dbbaec 100644 --- a/plugins/check_dummy.c +++ b/plugins/check_dummy.c @@ -14,16 +14,18 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + $Id$ + ******************************************************************************/ -#include "common.h" -#include "utils.h" - const char *progname = "check_dummy"; const char *revision = "$Revision$"; -const char *copyright = "1999-2003"; +const char *copyright = "1999-2004"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; +#include "common.h" +#include "utils.h" + void print_help (void); void print_usage (void); @@ -32,14 +34,14 @@ void print_usage (void); int main (int argc, char **argv) { - int result; + int result = STATE_UNKNOWN; setlocale (LC_ALL, ""); bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); if (argc < 2) - usage (_("Incorrect number of arguments supplied\n")); + usage4 (_("Could not parse arguments")); else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) { print_revision (progname, revision); exit (STATE_OK); @@ -49,7 +51,7 @@ main (int argc, char **argv) exit (STATE_OK); } else if (!is_integer (argv[1])) - usage (_("Arguments to check_dummy must be an integer\n")); + usage4 (_("Arguments to check_dummy must be an integer")); else result = atoi (argv[1]); @@ -89,14 +91,14 @@ print_help (void) printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); + printf (_("\ +This plugin will simply return the state corresponding to the numeric value\n\ +of the argument with optional text.\n\n")); + print_usage (); printf (_(UT_HELP_VRSN)); - printf (_("\n\ -This plugin will simply return the state corresponding to the numeric value\n\ -of the argument with optional text.\n")); - printf (_(UT_SUPPORT)); } @@ -105,5 +107,5 @@ of the argument with optional text.\n")); void print_usage (void) { - printf (_("Usage: %s [optional text]\n"), progname); + printf ("Usage: %s [optional text]\n", progname); }