Module Name: src
Committed By: gutteridge
Date: Sun Mar 9 05:04:55 UTC 2025
Modified Files:
src/usr.bin/cut: cut.c
Log Message:
cut.c: simplify a comment
>From a commit by Tim J. Robbins to FreeBSD back in 2004:
"Update a comment that compared the parser with an obsolete draft of
IEEE Std 1003.2-1992. Most of the "extensions" here were actually
required by the final version of the standard."
To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 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.31 src/usr.bin/cut/cut.c:1.32
--- src/usr.bin/cut/cut.c:1.31 Tue Mar 4 03:54:19 2025
+++ src/usr.bin/cut/cut.c Sun Mar 9 05:04:54 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: cut.c,v 1.31 2025/03/04 03:54:19 gutteridge Exp $ */
+/* $NetBSD: cut.c,v 1.32 2025/03/09 05:04:54 gutteridge 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.31 2025/03/04 03:54:19 gutteridge Exp $");
+__RCSID("$NetBSD: cut.c,v 1.32 2025/03/09 05:04:54 gutteridge Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -166,12 +166,10 @@ get_list(char *list)
}
/*
- * set a byte in the positions array to indicate if a field or
+ * Set a byte in the positions array to indicate if a field or
* column is to be selected; use +1, it's 1-based, not 0-based.
- * 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 to.
+ * Numbers and number ranges may be overlapping, repeated, and in
+ * any order. We handle "-3-5" although there's no real reason to.
*/
for (; (p = strtok(list, ", \t")) != NULL; list = NULL) {
setautostart = start = stop = 0;