summaryrefslogtreecommitdiff
path: root/src/fmt.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-02 19:52:48 +0000
committerJim Meyering <jim@meyering.net>2003-05-02 19:52:48 +0000
commitc4ff976e207c47c4a9fc855ca75e38b0cd1ac439 (patch)
tree65c2ebf0c04e8cb74699e61d5e9da53aca19ca7d /src/fmt.c
parent1e97469e5ab69bc4f83274d8c5277eca7141becd (diff)
downloadcoreutils-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'.
Diffstat (limited to 'src/fmt.c')
-rw-r--r--src/fmt.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fmt.c b/src/fmt.c
index 79f881f5a..099cb9402 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -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;