From 81bee45f6e562ffc30e1129cf00cd76444a77ce8 Mon Sep 17 00:00:00 2001 From: Benoit Mortier Date: Sat, 4 Dec 2004 12:12:30 +0000 Subject: [PATCH] internationalization fixes bugfixes git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1001 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/Makefile.am | 4 +++- plugins/check_by_ssh.c | 2 +- plugins/check_dig.c | 4 ++-- plugins/check_http.c | 2 +- plugins/{check_ide-smart.c => check_ide_smart.c} | 0 plugins/check_mrtg.c | 2 +- plugins/check_nt.c | 2 +- plugins/check_nwstat.c | 2 +- plugins/check_overcr.c | 2 +- plugins/check_real.c | 8 ++++---- plugins/check_smtp.c | 10 +++++----- plugins/check_swap.c | 4 ++-- plugins/check_tcp.c | 16 ++++++++-------- plugins/check_time.c | 16 ++++++++-------- plugins/check_udp.c | 6 +++--- po/POTFILES.in | 1 + 16 files changed, 42 insertions(+), 39 deletions(-) rename plugins/{check_ide-smart.c => check_ide_smart.c} (100%) diff --git a/plugins/Makefile.am b/plugins/Makefile.am index feccd00..b87154d 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -21,7 +21,7 @@ check_tcp_programs = check_ftp check_imap check_nntp check_pop check_udp2 \ EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ check_swap check_fping check_ldap check_game check_dig \ - check_nagios check_by_ssh check_dns check_nt check_ide-smart check_procs + check_nagios check_by_ssh check_dns check_nt check_ide_smart check_procs EXTRA_DIST = t utils.c netutils.c popen.c utils.h netutils.h popen.h common.h \ getaddrinfo.c getaddrinfo.h gethostbyname.c gethostbyname.h @@ -76,6 +76,7 @@ check_udp_LDADD = $(NETLIBS) check_ups_LDADD = $(NETLIBS) check_users_LDADD = $(BASEOBJS) popen.o check_by_ssh_LDADD = $(NETLIBS) popen.o +check_ide_smart_LDADD = $(BASEOBJS) negate_LDADD = $(BASEOBJS) popen.o urlize_LDADD = $(BASEOBJS) popen.o @@ -111,6 +112,7 @@ check_udp_DEPENDENCIES = check_udp.c $(NETOBJS) $(DEPLIBS) check_ups_DEPENDENCIES = check_ups.c $(NETOBJS) $(DEPLIBS) check_users_DEPENDENCIES = check_users.c $(BASEOBJS) popen.o $(DEPLIBS) check_by_ssh_DEPENDENCIES = check_by_ssh.c $(NETOBJS) popen.o $(DEPLIBS) +check_ide_smart_DEPENDENCIES = check_ide_smart.c $(BASEOBJS) $(DEPLIBS) negate_DEPENDENCIES = negate.c $(BASEOBJS) popen.o $(DEPLIBS) urlize_DEPENDENCIES = urlize.c $(BASEOBJS) popen.o $(DEPLIBS) check_icmp_DEPENDENCIES = check_icmp.c $(DEPLIBS) diff --git a/plugins/check_by_ssh.c b/plugins/check_by_ssh.c index 6d0f4c2..d34b267 100644 --- a/plugins/check_by_ssh.c +++ b/plugins/check_by_ssh.c @@ -411,5 +411,5 @@ print_usage (void) { printf ("\n\ Usage: %s [-f46] [-t timeout] [-i identity] [-l user] -H -C \n\ - [-n name] [-s servicelist] [-O outputfile] [-p port]\n", progname); + [-n name] [-s servicelist] [-O outputfile] [-p port]\n", progname); } diff --git a/plugins/check_dig.c b/plugins/check_dig.c index 3907186..a44d578 100644 --- a/plugins/check_dig.c +++ b/plugins/check_dig.c @@ -355,6 +355,6 @@ print_usage (void) { printf ("\ Usage: %s -H host -l lookup [-p ] [-T ]\n\ - [-w ] [-c ] [-t ]\n\ - [-a ] [-v]\n", progname); + [-w ] [-c ] [-t ]\n\ + [-a ] [-v]\n", progname); } diff --git a/plugins/check_http.c b/plugins/check_http.c index c0b18fc..6f8ad9a 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -1496,5 +1496,5 @@ Usage: %s -H | -I ) [-u ] [-p ]\n\ [-a auth] [-f ] [-e ]\n\ [-s string] [-l] [-r | -R ]\n\ [-P string] [-m min_pg_size] [-4|-6] [-N] [-M ]\n\ - [-A string] [-k string]\n"), progname); + [-A string] [-k string]\n"), progname); } diff --git a/plugins/check_ide-smart.c b/plugins/check_ide_smart.c similarity index 100% rename from plugins/check_ide-smart.c rename to plugins/check_ide_smart.c diff --git a/plugins/check_mrtg.c b/plugins/check_mrtg.c index f895321..bd37aef 100644 --- a/plugins/check_mrtg.c +++ b/plugins/check_mrtg.c @@ -378,5 +378,5 @@ print_usage (void) printf ("\ Usage: %s -F log_file -a -v variable -w warning -c critical\n\ [-l label] [-u units] [-e expire_minutes] [-t timeout]\n\ - [-v]\n", progname); + [-v]\n", progname); } diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 03a7c5d..e52b5a2 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c @@ -688,5 +688,5 @@ void print_usage(void) { printf("\ Usage: %s -H host -v variable [-p port] [-w warning] [-c critical]\n\ - [-l params] [-d SHOWALL] [-t timeout]\n", progname); + [-l params] [-d SHOWALL] [-t timeout]\n", progname); } diff --git a/plugins/check_nwstat.c b/plugins/check_nwstat.c index 53e3f1d..d8913bc 100644 --- a/plugins/check_nwstat.c +++ b/plugins/check_nwstat.c @@ -989,5 +989,5 @@ void print_usage(void) { printf ("\ Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\ - [-t timeout].\n", progname); + [-t timeout].\n", progname); } diff --git a/plugins/check_overcr.c b/plugins/check_overcr.c index 756402b..9bf40d3 100644 --- a/plugins/check_overcr.c +++ b/plugins/check_overcr.c @@ -465,5 +465,5 @@ print_usage (void) { printf ("\ Usage: %s -H host [-p port] [-v variable] [-w warning] [-c critical]\n\ - [-t timeout]\n", progname); + [-t timeout]\n", progname); } diff --git a/plugins/check_real.c b/plugins/check_real.c index 492848c..3042465 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c @@ -312,7 +312,7 @@ process_arguments (int argc, char **argv) server_port = atoi (optarg); } else { - usage (_("Port must be a positive integer\n")); + usage4 (_("Port must be a positive integer")); } break; case 'w': /* warning time threshold */ @@ -321,7 +321,7 @@ process_arguments (int argc, char **argv) check_warning_time = TRUE; } else { - usage (_("Warning time must be a positive integer\n")); + usage4 (_("Warning time must be a positive integer")); } break; case 'c': /* critical time threshold */ @@ -330,7 +330,7 @@ process_arguments (int argc, char **argv) check_critical_time = TRUE; } else { - usage (_("Critical time must be a nonnegative integer\n")); + usage4 (_("Critical time must be a nonnegative integer")); } break; case 'v': /* verbose */ @@ -341,7 +341,7 @@ process_arguments (int argc, char **argv) socket_timeout = atoi (optarg); } else { - usage (_("Time interval must be a nonnegative integer\n")); + usage4 (_("Time interval must be a nonnegative integer")); } break; case 'V': /* version */ diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index f12b69e..ab1b950 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -295,7 +295,7 @@ process_arguments (int argc, char **argv) if (is_intpos (optarg)) server_port = atoi (optarg); else - usage (_("Port must be a positive integer\n")); + usage4 (_("Port must be a positive integer")); break; case 'f': /* from argument */ from_arg = optarg; @@ -330,7 +330,7 @@ process_arguments (int argc, char **argv) check_critical_time = TRUE; } else { - usage (_("Critical time must be a positive integer\n")); + usage4 (_("Critical time must be a positive integer")); } break; case 'w': /* warning time threshold */ @@ -339,7 +339,7 @@ process_arguments (int argc, char **argv) check_warning_time = TRUE; } else { - usage (_("Warning time must be a positive integer\n")); + usage4 (_("Warning time must be a positive integer")); } break; case 'v': /* verbose */ @@ -350,7 +350,7 @@ process_arguments (int argc, char **argv) socket_timeout = atoi (optarg); } else { - usage (_("Time interval must be a positive integer\n")); + usage4 (_("Time interval must be a positive integer")); } break; case '4': @@ -360,7 +360,7 @@ process_arguments (int argc, char **argv) #ifdef USE_IPV6 address_family = AF_INET6; #else - usage (_("IPv6 support not available\n")); + usage4 (_("IPv6 support not available")); #endif break; case 'V': /* version */ diff --git a/plugins/check_swap.c b/plugins/check_swap.c index ba353bc..3067f85 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -515,6 +515,6 @@ void print_usage (void) { printf ("\ - Usage: %s [-av] -w %% -c %%\n\ - %s [-av] -w -c \n", progname, progname); +Usage: %s [-av] -w %% -c %%\n\ + %s [-av] -w -c \n", progname, progname); } diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 418438a..ce57631 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -474,7 +474,7 @@ process_arguments (int argc, char **argv) #ifdef USE_IPV6 address_family = AF_INET6; #else - usage (_("IPv6 support not available\n")); + usage4 (_("IPv6 support not available")); #endif break; case 'H': /* hostname */ @@ -484,7 +484,7 @@ process_arguments (int argc, char **argv) break; case 'c': /* critical */ if (!is_intnonneg (optarg)) - usage (_("Critical threshold must be a positive integer\n")); + usage4 (_("Critical threshold must be a positive integer")); else critical_time = strtod (optarg, NULL); check_critical_time = TRUE; @@ -494,7 +494,7 @@ process_arguments (int argc, char **argv) break; case 'w': /* warning */ if (!is_intnonneg (optarg)) - usage (_("Warning threshold must be a positive integer\n")); + usage4 (_("Warning threshold must be a positive integer")); else warning_time = strtod (optarg, NULL); check_warning_time = TRUE; @@ -509,13 +509,13 @@ process_arguments (int argc, char **argv) break; case 't': /* timeout */ if (!is_intpos (optarg)) - usage (_("Timeout interval must be a positive integer\n")); + usage4 (_("Timeout interval must be a positive integer")); else socket_timeout = atoi (optarg); break; case 'p': /* port */ if (!is_intpos (optarg)) - usage (_("Port must be a positive integer\n")); + usage4 (_("Port must be a positive integer")); else server_port = atoi (optarg); break; @@ -532,7 +532,7 @@ process_arguments (int argc, char **argv) break; case 'm': if (!is_intpos (optarg)) - usage (_("Maxbytes must be a positive integer\n")); + usage4 (_("Maxbytes must be a positive integer")); else maxbytes = atoi (optarg); case 'q': @@ -546,13 +546,13 @@ process_arguments (int argc, char **argv) else if (!strncmp(optarg,"crit",4)) econn_refuse_state = STATE_CRITICAL; else - usage (_("Refuse must be one of ok, warn, crit\n")); + usage4 (_("Refuse must be one of ok, warn, crit")); break; case 'd': if (is_intpos (optarg)) delay = atoi (optarg); else - usage (_("Delay must be a positive integer\n")); + usage4 (_("Delay must be a positive integer")); break; case 'D': /* Check SSL cert validity - days 'til certificate expiration */ #ifdef HAVE_SSL diff --git a/plugins/check_time.c b/plugins/check_time.c index dae2dd5..63d7ee2 100644 --- a/plugins/check_time.c +++ b/plugins/check_time.c @@ -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")); } } diff --git a/plugins/check_udp.c b/plugins/check_udp.c index aa8be1c..b79f31f 100644 --- a/plugins/check_udp.c +++ b/plugins/check_udp.c @@ -165,14 +165,14 @@ process_arguments (int argc, char **argv) break; case 'c': /* critical */ 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 'w': /* warning */ 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; @@ -185,7 +185,7 @@ process_arguments (int argc, char **argv) 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; diff --git a/po/POTFILES.in b/po/POTFILES.in index 993bd90..51a84c7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -31,6 +31,7 @@ plugins/check_time.c plugins/check_udp.c plugins/check_ups.c plugins/check_users.c +plugins/check_ide_smart.c plugins/getaddrinfo.c plugins/gethostbyname.c plugins/negate.c -- 2.30.2