From: Jim Meyering Date: Mon, 21 Jun 2004 15:02:14 +0000 (+0000) Subject: Standardize on the diagnostics given when someone gives X-Git-Tag: v5.3.0~1289 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bddcb0eab2b264292a55c2c9bea6515df70b51d8;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/src/join.c b/src/join.c index a804e5943c..3b2383ebfa 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); }