From bddcb0eab2b264292a55c2c9bea6515df70b51d8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 21 Jun 2004 15:02:14 +0000 Subject: 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. --- src/join.c | 7 +++++-- 1 file 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); } -- cgit v1.2.3-70-g09d2