Code

fixes for internationalization
[nagiosplug.git] / plugins / check_ssh.c
index 46dd044d11ff5f204252c449cf0e8c89da11677f..a21e2f524cbbbb33c63d39f4cd75e96034a9857a 100644 (file)
  
 ******************************************************************************/
 
-#include "common.h"
-#include "netutils.h"
-#include "utils.h"
-
 const char *progname = "check_ssh";
 const char *revision = "$Revision$";
-const char *copyright = "2000-2003";
+const char *copyright = "2000-2004";
 const char *email = "nagiosplug-devel@lists.sourceforge.net";
 
+#include "common.h"
+#include "netutils.h"
+#include "utils.h"
+
 #ifndef MSG_DONTWAIT
 #define MSG_DONTWAIT 0
 #endif
@@ -51,17 +51,18 @@ int ssh_connect (char *haddr, int hport, char *remote_version);
 int
 main (int argc, char **argv)
 {
-       int result;
+       int result = STATE_UNKNOWN;
 
        setlocale (LC_ALL, "");
        bindtextdomain (PACKAGE, LOCALEDIR);
        textdomain (PACKAGE);
 
-       if (process_arguments (argc, argv) != OK)
-               usage (_("check_ssh: could not parse arguments\n"));
+       if (process_arguments (argc, argv) != TRUE)
+               usage4 (_("Could not parse arguments"));
 
        /* initialize alarm signal handling */
        signal (SIGALRM, socket_timeout_alarm_handler);
+       
        alarm (socket_timeout);
 
        /* ssh_connect exits if error is found */
@@ -286,9 +287,9 @@ print_help (void)
 void
 print_usage (void)
 {
-       printf (_("\
+       printf ("\
 Usage: %s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n"), progname);
-       printf (_(UT_HLP_VRS), progname, progname);
+
+       printf (UT_HLP_VRS, progname, progname);
 }
 
-/* end of check_ssh.c */