diff options
author | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-22 06:22:38 (GMT) |
---|---|---|
committer | Karl DeBisschop <kdebisschop@users.sourceforge.net> | 2003-08-22 06:22:38 (GMT) |
commit | 22bd672d19c378f1e6124ee18e64e5a88cf53739 (patch) | |
tree | 127016323f2f3059819f75adb5568a00a0431fc2 /plugins/check_swap.c | |
parent | d35f99c8a9f546a0f02f09ad3f722f66322e813d (diff) | |
download | monitoring-plugins-22bd672d19c378f1e6124ee18e64e5a88cf53739.tar.gz |
- bindtextdomain for gettext, a few other smale cleanups here and there
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@690 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/check_swap.c')
-rw-r--r-- | plugins/check_swap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c index a4e7e81..3bbea77 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c | |||
@@ -71,6 +71,10 @@ main (int argc, char **argv) | |||
71 | char str[32]; | 71 | char str[32]; |
72 | char *status; | 72 | char *status; |
73 | 73 | ||
74 | setlocale (LC_ALL, ""); | ||
75 | bindtextdomain (PACKAGE, LOCALEDIR); | ||
76 | textdomain (PACKAGE); | ||
77 | |||
74 | status = strdup(""); | 78 | status = strdup(""); |
75 | 79 | ||
76 | if (process_arguments (argc, argv) != OK) | 80 | if (process_arguments (argc, argv) != OK) |
@@ -205,8 +209,6 @@ int | |||
205 | process_arguments (int argc, char **argv) | 209 | process_arguments (int argc, char **argv) |
206 | { | 210 | { |
207 | int c = 0; /* option character */ | 211 | int c = 0; /* option character */ |
208 | int wc = 0; /* warning counter */ | ||
209 | int cc = 0; /* critical counter */ | ||
210 | 212 | ||
211 | int option = 0; | 213 | int option = 0; |
212 | static struct option longopts[] = { | 214 | static struct option longopts[] = { |
@@ -229,7 +231,7 @@ process_arguments (int argc, char **argv) | |||
229 | break; | 231 | break; |
230 | 232 | ||
231 | switch (c) { | 233 | switch (c) { |
232 | case 'w': /* warning time threshold */ | 234 | case 'w': /* warning size threshold */ |
233 | if (is_intnonneg (optarg)) { | 235 | if (is_intnonneg (optarg)) { |
234 | warn_size = atoi (optarg); | 236 | warn_size = atoi (optarg); |
235 | break; | 237 | break; |
@@ -246,7 +248,7 @@ process_arguments (int argc, char **argv) | |||
246 | else { | 248 | else { |
247 | usage (_("Warning threshold must be integer or percentage!\n")); | 249 | usage (_("Warning threshold must be integer or percentage!\n")); |
248 | } | 250 | } |
249 | case 'c': /* critical time threshold */ | 251 | case 'c': /* critical size threshold */ |
250 | if (is_intnonneg (optarg)) { | 252 | if (is_intnonneg (optarg)) { |
251 | crit_size = atoi (optarg); | 253 | crit_size = atoi (optarg); |
252 | break; | 254 | break; |