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 GNodeSuff.gn to gnp



details:   https://anonhg.NetBSD.org/src/rev/5f366a1e3492
branches:  trunk
changeset: 943801:5f366a1e3492
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Sep 11 04:36:12 2020 +0000

description:
make(1): rename GNodeSuff.gn to gnp

It was confusing to have a field called "gn" that was not a pointer to a
GNode, but a double-pointer to GNode instead.

diffstat:

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

diffs (76 lines):

diff -r da45b7280557 -r 5f366a1e3492 usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Fri Sep 11 04:32:39 2020 +0000
+++ b/usr.bin/make/suff.c       Fri Sep 11 04:36:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.146 2020/09/11 04:32:39 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.147 2020/09/11 04:36:12 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.146 2020/09/11 04:32:39 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.147 2020/09/11 04:36:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)suff.c     8.4 (Berkeley) 3/21/94";
 #else
-__RCSID("$NetBSD: suff.c,v 1.146 2020/09/11 04:32:39 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.147 2020/09/11 04:36:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -211,7 +211,7 @@
 } LstSrc;
 
 typedef struct {
-    GNode        **gn;
+    GNode        **gnp;
     Suff          *s;
     Boolean        r;
 } GNodeSuff;
@@ -761,8 +761,8 @@
     Suff       *s, *t;
     char       *ptr;
 
-    if (*gs->gn == NULL && gs->r && (target->type & OP_NOTARGET) == 0) {
-       *gs->gn = target;
+    if (*gs->gnp == NULL && gs->r && (target->type & OP_NOTARGET) == 0) {
+       *gs->gnp = target;
        Targ_SetMain(target);
        return 1;
     }
@@ -775,9 +775,9 @@
        return 0;
 
     if (SuffParseTransform(target->name, &s, &t)) {
-       if (*gs->gn == target) {
+       if (*gs->gnp == target) {
            gs->r = TRUE;
-           *gs->gn = NULL;
+           *gs->gnp = NULL;
            Targ_SetMain(NULL);
        }
        Lst_Free(target->children);
@@ -806,7 +806,7 @@
  *     name            the name of the suffix to add
  */
 void
-Suff_AddSuffix(const char *name, GNode **gn)
+Suff_AddSuffix(const char *name, GNode **gnp)
 {
     Suff          *s;      /* new suffix descriptor */
     LstNode      ln;
@@ -823,7 +823,7 @@
         * a suffix rule. This is ugly, but other makes treat all targets
         * that start with a . as suffix rules.
         */
-       gs.gn = gn;
+       gs.gnp = gnp;
        gs.s  = s;
        gs.r  = FALSE;
        Lst_ForEach(Targ_List(), SuffScanTargets, &gs);



Home | Main Index | Thread Index | Old Index