diff options
author | Jim Meyering <jim@meyering.net> | 2004-06-21 15:02:14 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-06-21 15:02:14 +0000 |
commit | bddcb0eab2b264292a55c2c9bea6515df70b51d8 (patch) | |
tree | c0dba488fad4e786b548086aa5edbdd543b9a85f | |
parent | f04e77d3648555db5977ed9809cdb9690ca96d75 (diff) | |
download | coreutils-bddcb0eab2b264292a55c2c9bea6515df70b51d8.tar.xz |
Standardize on the diagnostics given when someone gives
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
(add_file_name, main): Likewise.
-rw-r--r-- | src/join.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/join.c b/src/join.c index a804e5943..3b2383ebf 100644 --- a/src/join.c +++ b/src/join.c @@ -736,7 +736,7 @@ add_file_name (char const *name, char const *names[2], int *nfiles) { if (*nfiles == 2) { - error (0, 0, _("too many non-option arguments")); + error (0, 0, _("extra operand %s"), quote (name)); usage (EXIT_FAILURE); } names[(*nfiles)++] = name; @@ -848,7 +848,10 @@ main (int argc, char **argv) if (nfiles != 2) { - error (0, 0, _("too few non-option arguments")); + if (nfiles == 0) + error (0, 0, _("missing operand")); + else + error (0, 0, _("missing operand after %s"), quote (argv[argc - 1])); usage (EXIT_FAILURE); } |