aboutsummaryrefslogtreecommitdiff
path: root/plugins/negate.c
diff options
context:
space:
mode:
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 @@
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)
{