Code

Fix includes for gettext
[nagiosplug.git] / plugins / check_time.c
index 8381fb2feb380e2d273b09db578fd5b993f02744..63d7ee255bb94ed0dc2a21196ed728161dbe80b8 100644 (file)
@@ -62,7 +62,7 @@ main (int argc, char **argv)
        bindtextdomain (PACKAGE, LOCALEDIR);
        textdomain (PACKAGE);
 
-       if (process_arguments (argc, argv) != TRUE)
+       if (process_arguments (argc, argv) == ERROR)
                usage4 (_("Could not parse arguments"));
 
        /* initialize alarm signal handling */
@@ -241,11 +241,11 @@ process_arguments (int argc, char **argv)
                                        check_warning_time = TRUE;
                                }
                                else {
-                                       usage (_("Warning thresholds must be a positive integer\n"));
+                                       usage4 (_("Warning thresholds must be a positive integer"));
                                }
                        }
                        else {
-                               usage (_("Warning threshold must be a positive integer\n"));
+                               usage4 (_("Warning threshold must be a positive integer"));
                        }
                        break;
                case 'c':                                                                       /* critical-variance */
@@ -260,30 +260,30 @@ process_arguments (int argc, char **argv)
                                        check_critical_time = TRUE;
                                }
                                else {
-                                       usage (_("Critical thresholds must be a positive integer\n"));
+                                       usage4 (_("Critical thresholds must be a positive integer"));
                                }
                        }
                        else {
-                               usage (_("Critical threshold must be a positive integer\n"));
+                               usage4 (_("Critical threshold must be a positive integer"));
                        }
                        break;
                case 'W':                                                                       /* warning-connect */
                        if (!is_intnonneg (optarg))
-                               usage (_("Warning threshold must be a positive integer\n"));
+                               usage4 (_("Warning threshold must be a positive integer"));
                        else
                                warning_time = atoi (optarg);
                        check_warning_time = TRUE;
                        break;
                case 'C':                                                                       /* critical-connect */
                        if (!is_intnonneg (optarg))
-                               usage (_("Critical threshold must be a positive integer\n"));
+                               usage4 (_("Critical threshold must be a positive integer"));
                        else
                                critical_time = atoi (optarg);
                        check_critical_time = TRUE;
                        break;
                case 'p':                                                                       /* port */
                        if (!is_intnonneg (optarg))
-                               usage (_("Port must be a positive integer\n"));
+                               usage4 (_("Port must be a positive integer"));
                        else
                                server_port = atoi (optarg);
                        break;
@@ -306,7 +306,7 @@ process_arguments (int argc, char **argv)
                        server_address = argv[c];
                }
                else {
-                       usage (_("Hostname was not supplied\n"));
+                       usage4 (_("Hostname was not supplied"));
                }
        }
 
@@ -326,8 +326,7 @@ print_help (void)
        printf ("Copyright (c) 1999 Ethan Galstad\n");
        printf (COPYRIGHT, copyright, email);
 
-       printf (_("\
-This plugin will check the time on the specified host.\n\n"));
+       printf (_("This plugin will check the time on the specified host.\n\n"));
 
        print_usage ();
 
@@ -357,8 +356,7 @@ This plugin will check the time on the specified host.\n\n"));
 void
 print_usage (void)
 {
-       printf (_("\
+       printf ("\
 Usage: %s -H <host_address> [-p port] [-u] [-w variance] [-c variance]\n\
-    [-W connect_time] [-C connect_time] [-t timeout]\n"), progname);
-       printf (_(UT_HLP_VRS), progname, progname);
+                  [-W connect_time] [-C connect_time] [-t timeout]\n", progname);
 }