diff options
author | Miles Bader <miles@gnu.org> | 1995-10-21 00:27:38 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-10-21 00:27:38 +0000 |
commit | b82d6ab855c838b5e0092e7e38d7351e843096b7 (patch) | |
tree | 44e692cefef93b1475ed4ce9f38b3fd3077387b2 | |
parent | 0b46a52e014cb65e2e8e8f5e01612b485b3589e3 (diff) |
(parse_enum): Use argp_error.
-rw-r--r-- | utils/ps.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -110,21 +110,14 @@ parse_enum(char *arg, char **choices, char *kind, bool allow_mismatches) { if (strncmp(*p, arg, arglen) == 0) if (partial_match >= 0) - { - fprintf(stderr, "%s: Ambiguous %s", arg, kind); - argp_help (0, stderr, ARGP_HELP_STD_ERR); - } + argp_error (0, "%s: Ambiguous %s", arg, kind); else partial_match = p - choices; p++; } if (partial_match < 0 && !allow_mismatches) - { - fprintf(stderr, "%s: Invalid %s", arg, kind); - argp_help (0, stderr, ARGP_HELP_STD_ERR); - return 0; - } + argp_error (0, "%s: Invalid %s", arg, kind); return partial_match; } |