Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): rename predecessor to order_pred



details:   https://anonhg.NetBSD.org/src/rev/14f87ccd1bb0
branches:  trunk
changeset: 941720:14f87ccd1bb0
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Oct 28 01:58:37 2020 +0000

description:
make(1): rename predecessor to order_pred

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

diffstat:

 usr.bin/make/parse.c |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (63 lines):

diff -r 0526df1f1906 -r 14f87ccd1bb0 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Wed Oct 28 01:51:45 2020 +0000
+++ b/usr.bin/make/parse.c      Wed Oct 28 01:58:37 2020 +0000
@@ -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 @@
  * 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 @@
     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 @@
        opts.compatMake = TRUE;
        break;
     case SP_ORDER:
-       predecessor = NULL;
+       order_pred = NULL;
        break;
     default:
        break;



Home | Main Index | Thread Index | Old Index