diff options
author | Jim Meyering <jim@meyering.net> | 2003-05-02 19:52:48 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-05-02 19:52:48 +0000 |
commit | c4ff976e207c47c4a9fc855ca75e38b0cd1ac439 (patch) | |
tree | 65c2ebf0c04e8cb74699e61d5e9da53aca19ca7d | |
parent | 1e97469e5ab69bc4f83274d8c5277eca7141becd (diff) | |
download | coreutils-c4ff976e207c47c4a9fc855ca75e38b0cd1ac439.tar.xz |
(usage): Don't mention obsolescent -WIDTH option.
Instead explain about `-' and standard input.
(main): Give a proper diagnostic for e.g., `fmt -c -72'.
-rw-r--r-- | src/fmt.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -287,13 +287,13 @@ Mandatory arguments to long options are mandatory for short options too.\n\ fputs (_("\ -t, --tagged-paragraph indentation of first line different from second\n\ -u, --uniform-spacing one space between words, two after sentences\n\ - -w, --width=NUMBER maximum line width (default of 75 columns)\n\ + -w, --width=WIDTH maximum line width (default of 75 columns)\n\ "), stdout); fputs (HELP_OPTION_DESCRIPTION, stdout); fputs (VERSION_OPTION_DESCRIPTION, stdout); fputs (_("\ \n\ -In -wNUMBER, the letter `w' may be omitted.\n"), +With no FILE, or when FILE is -, read standard input.\n"), stdout); printf (_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); } @@ -363,11 +363,12 @@ main (register int argc, register char **argv) switch (optchar) { default: + if (ISDIGIT (optchar)) + error (0, 0, _("invalid option -- %c; -WIDTH is recognized\ + only when it is the first\noption; use -w N instead"), + optchar); usage (EXIT_FAILURE); - case 0: - break; - case 'c': crown = TRUE; break; |