diff options
author | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 +0000 |
---|---|---|
committer | Benoit Mortier <opensides@users.sourceforge.net> | 2004-12-01 23:54:51 +0000 |
commit | d19edd4043c498626fe68308005947975ef0a697 (patch) | |
tree | 7a213ee16f9331e928b1c32aa6c521c05519db58 /plugins/negate.c | |
parent | 1d8128e328f714258b7fec0c62245e1d187e0439 (diff) | |
download | monitoring-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.c | 21 |
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 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + $Id$ @@-<article> @@ -69,6 +71,8 @@ int validate_arguments (void); void print_help (void); void print_usage (void); + + int main (int argc, char **argv) { @@ -80,7 +84,7 @@ main (int argc, char **argv) textdomain (PACKAGE); if (process_arguments (argc, argv) == ERROR) - usage (_("Could not parse arguments\n")); + usage (_("negate: could not parse arguments\n")); /* Set signal handling and alarm */ if (signal (SIGALRM, timeout_alarm_handler) == SIG_ERR) @@ -125,8 +129,6 @@ main (int argc, char **argv) else exit (result); } - - /****************************************************************************** @@- @@ -146,6 +148,8 @@ is a only a 'timeout' option.</para> -@@ ******************************************************************************/ + + /* process command-line arguments */ int process_arguments (int argc, char **argv) @@ -169,7 +173,9 @@ process_arguments (int argc, char **argv) switch (c) { case '?': /* help */ - usage3 (_("Unknown argument"), optopt); + printf (_("%s: Unknown argument: %s\n\n"), progname, optarg); + print_usage (); + exit (STATE_UNKNOWN); break; case 'h': /* help */ print_help (); @@ -207,6 +213,8 @@ process_arguments (int argc, char **argv) -@@ ******************************************************************************/ + + int validate_arguments () { @@ -225,9 +233,6 @@ validate_arguments () - - - void print_help (void) { @@ -265,8 +270,6 @@ Otherwise, the output state of the wrapped plugin is unchanged.\n")); - - void print_usage (void) { |