Module Name: src Committed By: rillig Date: Wed Jun 5 22:06:53 UTC 2024
Modified Files: src/usr.bin/make: hash.c src/usr.bin/make/unit-tests: varmod-match.exp varmod-match.mk varmod.mk Log Message: make: sync comments with reality To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.bin/make/hash.c cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-match.exp cvs rdiff -u -r1.22 -r1.23 src/usr.bin/make/unit-tests/varmod-match.mk cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod.mk 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/make/hash.c diff -u src/usr.bin/make/hash.c:1.77 src/usr.bin/make/hash.c:1.78 --- src/usr.bin/make/hash.c:1.77 Fri May 31 07:11:12 2024 +++ src/usr.bin/make/hash.c Wed Jun 5 22:06:53 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hash.c,v 1.77 2024/05/31 07:11:12 rillig Exp $ */ +/* $NetBSD: hash.c,v 1.78 2024/06/05 22:06:53 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -74,7 +74,7 @@ #include "make.h" /* "@(#)hash.c 8.1 (Berkeley) 6/6/93" */ -MAKE_RCSID("$NetBSD: hash.c,v 1.77 2024/05/31 07:11:12 rillig Exp $"); +MAKE_RCSID("$NetBSD: hash.c,v 1.78 2024/06/05 22:06:53 rillig Exp $"); /* * The ratio of # entries to # buckets at which we rebuild the table to @@ -297,8 +297,8 @@ HashTable_DeleteEntry(HashTable *t, Hash } /* - * Return the next entry in the hash table, or NULL if the end of the table - * is reached. + * Place the next entry from the hash table in hi->entry, or return false if + * the end of the table is reached. */ bool HashIter_Next(HashIter *hi) Index: src/usr.bin/make/unit-tests/varmod-match.exp diff -u src/usr.bin/make/unit-tests/varmod-match.exp:1.16 src/usr.bin/make/unit-tests/varmod-match.exp:1.17 --- src/usr.bin/make/unit-tests/varmod-match.exp:1.16 Tue Apr 23 22:51:28 2024 +++ src/usr.bin/make/unit-tests/varmod-match.exp Wed Jun 5 22:06:53 2024 @@ -1,14 +1,14 @@ -make: "varmod-match.mk" line 290: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M' -make: "varmod-match.mk" line 298: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M' -make: "varmod-match.mk" line 306: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' -make: "varmod-match.mk" line 314: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' -make: "varmod-match.mk" line 323: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' -make: "varmod-match.mk" line 337: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M' -make: "varmod-match.mk" line 345: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M' -make: "varmod-match.mk" line 357: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M' -make: "varmod-match.mk" line 365: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M' -make: "varmod-match.mk" line 365: while evaluating variable " : :: ": Unknown modifier "]" -make: "varmod-match.mk" line 365: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") +make: "varmod-match.mk" line 289: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[' of modifier ':M' +make: "varmod-match.mk" line 297: while evaluating variable "WORDS": warning: Unfinished character list in pattern 'a[^' of modifier ':M' +make: "varmod-match.mk" line 305: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[-x1-3' of modifier ':M' +make: "varmod-match.mk" line 313: while evaluating variable "WORDS": warning: Unfinished character list in pattern '*[-x1-3' of modifier ':M' +make: "varmod-match.mk" line 322: while evaluating variable "WORDS": warning: Unfinished character list in pattern '[^-x1-3' of modifier ':M' +make: "varmod-match.mk" line 336: while evaluating variable "WORDS": warning: Unfinished character list in pattern '?[\' of modifier ':M' +make: "varmod-match.mk" line 344: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[x-' of modifier ':M' +make: "varmod-match.mk" line 356: while evaluating variable "WORDS": warning: Unfinished character range in pattern '[^x-' of modifier ':M' +make: "varmod-match.mk" line 364: while evaluating variable " : :: ": warning: Unfinished character list in pattern '[' of modifier ':M' +make: "varmod-match.mk" line 364: while evaluating variable " : :: ": Unknown modifier "]" +make: "varmod-match.mk" line 364: Malformed conditional (${ ${:U\:} ${:U\:\:} :L:M[:]} != ":") make: Fatal errors encountered -- cannot continue make: stopped in unit-tests exit status 1 Index: src/usr.bin/make/unit-tests/varmod-match.mk diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.22 src/usr.bin/make/unit-tests/varmod-match.mk:1.23 --- src/usr.bin/make/unit-tests/varmod-match.mk:1.22 Tue Apr 23 22:51:28 2024 +++ src/usr.bin/make/unit-tests/varmod-match.mk Wed Jun 5 22:06:53 2024 @@ -1,4 +1,4 @@ -# $NetBSD: varmod-match.mk,v 1.22 2024/04/23 22:51:28 rillig Exp $ +# $NetBSD: varmod-match.mk,v 1.23 2024/06/05 22:06:53 rillig Exp $ # # Tests for the ':M' modifier, which keeps only those words that match the # given pattern. @@ -42,13 +42,12 @@ . error .endif -# A pattern that ends with '*' is anchored at the -# beginning. +# A pattern that does not start with '*' is anchored at the beginning. .if ${a aa aaa b ba baa bab:L:Ma*} != "a aa aaa" . error .endif -# A pattern that starts with '*' is anchored at the end. +# A pattern that does not end with '*' is anchored at the end. .if ${a aa aaa b ba baa bab:L:M*a} != "a aa aaa ba baa" . error .endif @@ -375,7 +374,7 @@ WORDS= [x- x x- y yyyyy # out-of-bounds read beyond the indirect ':M' modifiers. # # The argument to the inner ':U' is unescaped to 'M\'. -# This 'M\' becomes an # indirect modifier ':M' with the pattern '\'. +# This 'M\' becomes an indirect modifier ':M' with the pattern '\'. # The pattern '\' never matches. .if ${:U:${:UM\\}} . error Index: src/usr.bin/make/unit-tests/varmod.mk diff -u src/usr.bin/make/unit-tests/varmod.mk:1.13 src/usr.bin/make/unit-tests/varmod.mk:1.14 --- src/usr.bin/make/unit-tests/varmod.mk:1.13 Sun Jun 2 11:25:03 2024 +++ src/usr.bin/make/unit-tests/varmod.mk Wed Jun 5 22:06:53 2024 @@ -1,11 +1,11 @@ -# $NetBSD: varmod.mk,v 1.13 2024/06/02 11:25:03 rillig Exp $ +# $NetBSD: varmod.mk,v 1.14 2024/06/05 22:06:53 rillig Exp $ # # Tests for variable modifiers, such as :Q, :S,from,to or :Ufallback. # # See also: # varparse-errors.mk -# As of 2022-08-06, the possible behaviors during parsing are: +# As of 2024-06-05, the possible behaviors during parsing are: # # * `strict`: the parsing style used by most modifiers: # * either uses `ParseModifierPart` or parses the modifier literal @@ -46,9 +46,9 @@ # | `U` | individual | custom parser | N/A | # | `[` | strict | | no | # | `_` | individual | strcspn | yes | -# | `gmtime` | strict | only literal value | yes | +# | `gmtime` | strict | | yes | # | `hash` | strict | | N/A | -# | `localtime` | strict | only literal value | yes | +# | `localtime` | strict | | yes | # | `q` | strict | | yes | # | `range` | strict | | N/A | # | `sh` | strict | | N/A |