Module Name: src
Committed By: rillig
Date: Sun Mar 27 18:39:01 UTC 2022
Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-match.mk
Log Message:
make: fix spacing, and a typo in a test
To generate a diff of this commit:
cvs rdiff -u -r1.1018 -r1.1019 src/usr.bin/make/var.c
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varmod-match.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/var.c
diff -u src/usr.bin/make/var.c:1.1018 src/usr.bin/make/var.c:1.1019
--- src/usr.bin/make/var.c:1.1018 Sat Mar 26 14:34:07 2022
+++ src/usr.bin/make/var.c Sun Mar 27 18:39:01 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.1018 2022/03/26 14:34:07 rillig Exp $ */
+/* $NetBSD: var.c,v 1.1019 2022/03/27 18:39:01 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
#include "metachar.h"
/* "@(#)var.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1018 2022/03/26 14:34:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1019 2022/03/27 18:39:01 rillig Exp $");
/*
* Variables are defined using one of the VAR=value assignments. Their
@@ -476,7 +476,7 @@ ValueDescription(const char *value)
{
if (value[0] == '\0')
return "# (empty)";
- if (ch_isspace(value[strlen(value)-1]))
+ if (ch_isspace(value[strlen(value) - 1]))
return "# (ends with space)";
return "";
}
@@ -3221,7 +3221,7 @@ ApplyModifier_Words(const char **pp, Mod
/* Normal case: select the words described by first and last. */
Expr_SetValueOwn(expr,
VarSelectWords(Expr_Str(expr), first, last,
- ch->sep, ch->oneBigWord));
+ ch->sep, ch->oneBigWord));
ok:
FStr_Done(&festr);
Index: src/usr.bin/make/unit-tests/varmod-match.mk
diff -u src/usr.bin/make/unit-tests/varmod-match.mk:1.7 src/usr.bin/make/unit-tests/varmod-match.mk:1.8
--- src/usr.bin/make/unit-tests/varmod-match.mk:1.7 Thu Mar 3 20:20:23 2022
+++ src/usr.bin/make/unit-tests/varmod-match.mk Sun Mar 27 18:39:01 2022
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-match.mk,v 1.7 2022/03/03 20:20:23 rillig Exp $
+# $NetBSD: varmod-match.mk,v 1.8 2022/03/27 18:39:01 rillig Exp $
#
# Tests for the :M variable modifier, which filters words that match the
# given pattern.
@@ -119,8 +119,8 @@ ${:U*}= asterisk
.endif
# [^a-c67]
-# matches a single character, except for 'a', 'b', 'c', '8' or
-# '9'
+# matches a single character, except for 'a', 'b', 'c', '6' or
+# '7'
.if ${ A B C a b c d 5 6 7 8 [a-c] [a] :L:M[^a-c67]} != "A B C d 5 8"
. error
.endif