Module Name:    src
Committed By:   rillig
Date:           Wed Oct 28 01:58:37 UTC 2020

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

Log Message:
make(1): rename predecessor to order_pred

The new name aligns nicely with the GNode field of the same name.


To generate a diff of this commit:
cvs rdiff -u -r1.406 -r1.407 src/usr.bin/make/parse.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/parse.c
diff -u src/usr.bin/make/parse.c:1.406 src/usr.bin/make/parse.c:1.407
--- src/usr.bin/make/parse.c:1.406	Wed Oct 28 01:51:36 2020
+++ src/usr.bin/make/parse.c	Wed Oct 28 01:58:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.406 2020/10/28 01:51:36 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.407 2020/10/28 01:58:37 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.406 2020/10/28 01:51:36 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.407 2020/10/28 01:58:37 rillig Exp $");
 
 /* types and constants */
 
@@ -215,7 +215,7 @@ static StringList *targCmds;
  * Predecessor node for handling .ORDER. Initialized to NULL when .ORDER
  * seen, then set to each successive source on the line.
  */
-static GNode *predecessor;
+static GNode *order_pred;
 
 /* parser state */
 
@@ -919,20 +919,20 @@ ParseDoSrcOrder(const char *src)
     gn = Targ_GetNode(src);
     if (doing_depend)
 	ParseMark(gn);
-    if (predecessor != NULL) {
-	Lst_Append(predecessor->order_succ, gn);
-	Lst_Append(gn->order_pred, predecessor);
+    if (order_pred != NULL) {
+	Lst_Append(order_pred->order_succ, gn);
+	Lst_Append(gn->order_pred, order_pred);
 	if (DEBUG(PARSE)) {
 	    debug_printf("# %s: added Order dependency %s - %s\n",
-			 __func__, predecessor->name, gn->name);
-	    Targ_PrintNode(predecessor, 0);
+			 __func__, order_pred->name, gn->name);
+	    Targ_PrintNode(order_pred, 0);
 	    Targ_PrintNode(gn, 0);
 	}
     }
     /*
      * The current source now becomes the predecessor for the next one.
      */
-    predecessor = gn;
+    order_pred = gn;
 }
 
 static void
@@ -1148,7 +1148,7 @@ ParseDoDependencyTargetSpecial(ParseSpec
 	opts.compatMake = TRUE;
 	break;
     case SP_ORDER:
-	predecessor = NULL;
+	order_pred = NULL;
 	break;
     default:
 	break;

Reply via email to