Module Name: src
Committed By: wiz
Date: Sat Jun 9 19:22:47 UTC 2012
Modified Files:
src/usr.bin/cut: cut.c
Log Message:
Add -b to short error messages. Fix typo. From Bug Hunting in PR 44747.
To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.bin/cut/cut.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/cut/cut.c
diff -u src/usr.bin/cut/cut.c:1.26 src/usr.bin/cut/cut.c:1.27
--- src/usr.bin/cut/cut.c:1.26 Fri Apr 6 11:34:58 2012
+++ src/usr.bin/cut/cut.c Sat Jun 9 19:22:47 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: cut.c,v 1.26 2012/04/06 11:34:58 wiz Exp $ */
+/* $NetBSD: cut.c,v 1.27 2012/06/09 19:22:47 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
#if 0
static char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95";
#endif
-__RCSID("$NetBSD: cut.c,v 1.26 2012/04/06 11:34:58 wiz Exp $");
+__RCSID("$NetBSD: cut.c,v 1.27 2012/06/09 19:22:47 wiz Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -166,7 +166,7 @@ get_list(char *list)
* This parser is less restrictive than the Draft 9 POSIX spec.
* POSIX doesn't allow lists that aren't in increasing order or
* overlapping lists. We also handle "-3-5" although there's no
- * real reason too.
+ * real reason to.
*/
for (; (p = strtok(list, ", \t")) != NULL; list = NULL) {
setautostart = start = stop = 0;
@@ -189,9 +189,9 @@ get_list(char *list)
}
}
if (*p)
- errx(1, "[-cf] list: illegal list value");
+ errx(1, "[-bcf] list: illegal list value");
if (!stop || !start)
- errx(1, "[-cf] list: values may not include zero");
+ errx(1, "[-bcf] list: values may not include zero");
if (stop + 1 > numpositions) {
size_t newsize;
newsize = roundup(stop + 1, ALLOC_CHUNK);