diff options
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 @@ | |||
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); | |||
69 | void print_help (void); | 71 | void print_help (void); |
70 | void print_usage (void); | 72 | void print_usage (void); |
71 | 73 | ||
74 | |||
75 | |||
72 | int | 76 | int |
73 | main (int argc, char **argv) | 77 | main (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 */ |
150 | int | 154 | int |
151 | process_arguments (int argc, char **argv) | 155 | process_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 | |||
210 | int | 218 | int |
211 | validate_arguments () | 219 | validate_arguments () |
212 | { | 220 | { |
@@ -225,9 +233,6 @@ validate_arguments () | |||
225 | 233 | ||
226 | 234 | ||
227 | 235 | ||
228 | |||
229 | |||
230 | |||
231 | void | 236 | void |
232 | print_help (void) | 237 | print_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 | |||
270 | void | 273 | void |
271 | print_usage (void) | 274 | print_usage (void) |
272 | { | 275 | { |