diff options
-rw-r--r-- | src/head.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/head.c b/src/head.c index 95100250d..4038722b0 100644 --- a/src/head.c +++ b/src/head.c @@ -1,5 +1,5 @@ /* head -- output first part of file(s) - Copyright (C) 89, 90, 91, 1995-2005 Free Software Foundation, Inc. + Copyright (C) 89, 90, 91, 1995-2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -973,7 +973,7 @@ main (int argc, char **argv) break; default: - error (0, 0, _("unrecognized option `-%c'"), *a); + error (0, 0, _("invalid trailing option -- %c"), *a); usage (EXIT_FAILURE); } } @@ -992,7 +992,8 @@ main (int argc, char **argv) argc--; } - while ((c = getopt_long (argc, argv, "c:n:qv", long_options, NULL)) != -1) + while ((c = getopt_long (argc, argv, "c:n:qv0123456789", long_options, NULL)) + != -1) { switch (c) { @@ -1029,6 +1030,8 @@ main (int argc, char **argv) case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS); default: + if (ISDIGIT (c)) + error (0, 0, _("invalid trailing option -- %c"), c); usage (EXIT_FAILURE); } } |