summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-05-22 04:12:25 +0000
committerMiles Bader <miles@gnu.org>1996-05-22 04:12:25 +0000
commitc1fb9e35f30949eed8af0be619f93bd57f330438 (patch)
tree68743f7a878e51c395c644f463b0551a21cdcb65
parent1b71d030931b7a03baf0f2814bd4c3f67bd20748 (diff)
(argp_parse): Only print a `Try...' message if the error was a parsing error.
-rw-r--r--libshouldbeinlibc/argp-parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c
index 8ec7f223..3f9e3e8c 100644
--- a/libshouldbeinlibc/argp-parse.c
+++ b/libshouldbeinlibc/argp-parse.c
@@ -623,7 +623,8 @@ argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
if (err)
{
/* Maybe print an error message. */
- argp_state_help (&state, stderr, ARGP_HELP_STD_ERR);
+ if (err == EBADKEY)
+ argp_state_help (&state, stderr, ARGP_HELP_STD_ERR);
/* Since we didn't exit, give each parser an error indication. */
for (group = groups; group < egroup; group++)