Module Name:    src
Committed By:   rillig
Date:           Sat Apr  3 23:19:09 UTC 2021

Modified Files:
        src/usr.bin/make: var.c

Log Message:
make: condense definition of VarPatternFlags

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.902 -r1.903 src/usr.bin/make/var.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/make/var.c
diff -u src/usr.bin/make/var.c:1.902 src/usr.bin/make/var.c:1.903
--- src/usr.bin/make/var.c:1.902	Sat Apr  3 23:15:52 2021
+++ src/usr.bin/make/var.c	Sat Apr  3 23:19:08 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.902 2021/04/03 23:15:52 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.903 2021/04/03 23:19:08 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.902 2021/04/03 23:15:52 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.903 2021/04/03 23:19:08 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -242,15 +242,10 @@ typedef enum UnexportWhat {
 
 /* Flags for pattern matching in the :S and :C modifiers */
 typedef struct VarPatternFlags {
-
-	/* Replace as often as possible ('g') */
-	bool subGlobal: 1;
-	/* Replace only once ('1') */
-	bool subOnce: 1;
-	/* Match at start of word ('^') */
-	bool anchorStart: 1;
-	/* Match at end of word ('$') */
-	bool anchorEnd: 1;
+	bool subGlobal: 1;	/* 'g': replace as often as possible */
+	bool subOnce: 1;	/* '1': replace only once */
+	bool anchorStart: 1;	/* '^': match only at start of word */
+	bool anchorEnd: 1;	/* '$': match only at end of word */
 } VarPatternFlags;
 
 /* SepBuf builds a string from words interleaved with separators. */

Reply via email to