summaryrefslogtreecommitdiffstats
path: root/plugins/negate.c
diff options
context:
space:
mode:
authorBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 +0000
committerBenoit Mortier <opensides@users.sourceforge.net>2004-12-01 23:54:51 +0000
commitd19edd4043c498626fe68308005947975ef0a697 (patch)
tree7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/negate.c
parent1d8128e328f714258b7fec0c62245e1d187e0439 (diff)
downloadmonitoring-plugins-d19edd4043c498626fe68308005947975ef0a697.tar.gz
standardize localization string
standardize unknow arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@969 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/negate.c')
-rw-r--r--plugins/negate.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/negate.c b/plugins/negate.c
index a71f1b67..9e5cf46f 100644
--- a/plugins/negate.c
+++ b/plugins/negate.c
@@ -13,6 +13,8 @@
13 You should have received a copy of the GNU General Public License 13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software 14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 15 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
17 $Id$
16 18
17@@-<article> 19@@-<article>
18 20
@@ -69,6 +71,8 @@ int validate_arguments (void);
69void print_help (void); 71void print_help (void);
70void print_usage (void); 72void print_usage (void);
71 73
74
75
72int 76int
73main (int argc, char **argv) 77main (int argc, char **argv)
74{ 78{
@@ -80,7 +84,7 @@ main (int argc, char **argv)
80 textdomain (PACKAGE); 84 textdomain (PACKAGE);
81 85
82 if (process_arguments (argc, argv) == ERROR) 86 if (process_arguments (argc, argv) == ERROR)
83 usage (_("Could not parse arguments\n")); 87 usage (_("negate: could not parse arguments\n"));
84 88
85 /* Set signal handling and alarm */ 89 /* Set signal handling and alarm */
86 if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR) 90 if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR)
@@ -125,8 +129,6 @@ main (int argc, char **argv)
125 else 129 else
126 exit (result); 130 exit (result);
127} 131}
128
129
130 132
131/****************************************************************************** 133/******************************************************************************
132@@- 134@@-
@@ -146,6 +148,8 @@ is a only a 'timeout' option.</para>
146-@@ 148-@@
147******************************************************************************/ 149******************************************************************************/
148 150
151
152
149/* process command-line arguments */ 153/* process command-line arguments */
150int 154int
151process_arguments (int argc, char **argv) 155process_arguments (int argc, char **argv)
@@ -169,7 +173,9 @@ process_arguments (int argc, char **argv)
169 173
170 switch (c) { 174 switch (c) {
171 case '?': /* help */ 175 case '?': /* help */
172 usage3 (_("Unknown argument"), optopt); 176 printf (_("%s: Unknown argument: %s\n\n"), progname, optarg);
177 print_usage ();
178 exit (STATE_UNKNOWN);
173 break; 179 break;
174 case 'h': /* help */ 180 case 'h': /* help */
175 print_help (); 181 print_help ();
@@ -207,6 +213,8 @@ process_arguments (int argc, char **argv)
207-@@ 213-@@
208******************************************************************************/ 214******************************************************************************/
209 215
216
217
210int 218int
211validate_arguments () 219validate_arguments ()
212{ 220{
@@ -225,9 +233,6 @@ validate_arguments ()
225 233
226 234
227 235
228
229
230
231void 236void
232print_help (void) 237print_help (void)
233{ 238{
@@ -265,8 +270,6 @@ Otherwise, the output state of the wrapped plugin is unchanged.\n"));
265 270
266 271
267 272
268
269
270void 273void
271print_usage (void) 274print_usage (void)
272{ 275{