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 LstNode functions to match thei...



details:   https://anonhg.NetBSD.org/src/rev/10fe3d242b4b
branches:  trunk
changeset: 975465:10fe3d242b4b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Aug 29 10:41:12 2020 +0000

description:
make(1): rename LstNode functions to match their type

diffstat:

 usr.bin/make/dir.c  |   8 ++++----
 usr.bin/make/job.c  |   8 ++++----
 usr.bin/make/lst.c  |  12 ++++++------
 usr.bin/make/lst.h  |   6 +++---
 usr.bin/make/main.c |  10 +++++-----
 usr.bin/make/meta.c |   9 +++++----
 usr.bin/make/suff.c |  20 ++++++++++----------
 7 files changed, 37 insertions(+), 36 deletions(-)

diffs (298 lines):

diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/dir.c        Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.122 2020/08/29 10:12:06 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.123 2020/08/29 10:41:12 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: dir.c,v 1.122 2020/08/29 10:12:06 rillig Exp $";
+static char rcsid[] = "$NetBSD: dir.c,v 1.123 2020/08/29 10:41:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)dir.c      8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: dir.c,v 1.122 2020/08/29 10:12:06 rillig Exp $");
+__RCSID("$NetBSD: dir.c,v 1.123 2020/08/29 10:41:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1747,7 +1747,7 @@
     LstNode ln;
     Path *p;
 
-    for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) {
+    for (ln = Lst_First(path2); ln != NULL; ln = LstNode_Next(ln)) {
        p = Lst_Datum(ln);
        if (Lst_Member(path1, p) == NULL) {
            p->refCount += 1;
diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/job.c        Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.222 2020/08/29 10:35:03 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.223 2020/08/29 10:41:12 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: job.c,v 1.222 2020/08/29 10:35:03 rillig Exp $";
+static char rcsid[] = "$NetBSD: job.c,v 1.223 2020/08/29 10:41:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)job.c      8.2 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: job.c,v 1.222 2020/08/29 10:35:03 rillig Exp $");
+__RCSID("$NetBSD: job.c,v 1.223 2020/08/29 10:41:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -709,7 +709,7 @@
        job->node->type |= OP_SAVE_CMDS;
        if ((job->flags & JOB_IGNDOTS) == 0) {
            LstNode dotsNode = Lst_Member(job->node->commands, cmd);
-           job->tailCmds = dotsNode != NULL ? Lst_Succ(dotsNode) : NULL;
+           job->tailCmds = dotsNode != NULL ? LstNode_Next(dotsNode) : NULL;
            return 1;
        }
        return 0;
diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/lst.c
--- a/usr.bin/make/lst.c        Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/lst.c        Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.55 2020/08/29 10:12:06 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.56 2020/08/29 10:41:12 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -37,11 +37,11 @@
 #include "make.h"
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: lst.c,v 1.55 2020/08/29 10:12:06 rillig Exp $";
+static char rcsid[] = "$NetBSD: lst.c,v 1.56 2020/08/29 10:41:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: lst.c,v 1.55 2020/08/29 10:12:06 rillig Exp $");
+__RCSID("$NetBSD: lst.c,v 1.56 2020/08/29 10:41:12 rillig Exp $");
 #endif /* not lint */
 #endif
 
@@ -338,7 +338,7 @@
 
 /* Return the successor to the given node on its list, or NULL. */
 LstNode
-Lst_Succ(LstNode node)
+LstNode_Next(LstNode node)
 {
     assert(node != NULL);
 
@@ -347,7 +347,7 @@
 
 /* Return the predecessor to the given node on its list, or NULL. */
 LstNode
-Lst_Prev(LstNode node)
+LstNode_Prev(LstNode node)
 {
     assert(node != NULL);
     return node->prev;
@@ -387,7 +387,7 @@
  * the match function returns TRUE, or NULL if none of the nodes matches.
  *
  * The start node may be NULL, in which case nothing is found. This allows
- * for passing Lst_First or Lst_Succ as the start node. */
+ * for passing Lst_First or LstNode_Next as the start node. */
 LstNode
 Lst_FindFrom(Lst list, LstNode node, LstFindProc match, const void *matchArgs)
 {
diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/lst.h
--- a/usr.bin/make/lst.h        Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/lst.h        Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lst.h,v 1.56 2020/08/29 10:12:06 rillig Exp $  */
+/*     $NetBSD: lst.h,v 1.57 2020/08/29 10:41:12 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -135,9 +135,9 @@
 /* Return last element in list */
 LstNode                Lst_Last(Lst);
 /* Return successor to given element */
-LstNode                Lst_Succ(LstNode);
+LstNode                LstNode_Next(LstNode);
 /* Return predecessor to given element */
-LstNode                Lst_Prev(LstNode);
+LstNode                LstNode_Prev(LstNode);
 /* Get datum from LstNode */
 void           *Lst_Datum(LstNode);
 
diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/main.c       Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.326 2020/08/29 10:12:06 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.327 2020/08/29 10:41:12 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.326 2020/08/29 10:12:06 rillig Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.327 2020/08/29 10:41:12 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.326 2020/08/29 10:12:06 rillig Exp $");
+__RCSID("$NetBSD: main.c,v 1.327 2020/08/29 10:41:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -873,7 +873,7 @@
        else
                expandVars = getBoolean(".MAKE.EXPAND_VARIABLES", FALSE);
 
-       for (ln = Lst_First(variables); ln != NULL; ln = Lst_Succ(ln)) {
+       for (ln = Lst_First(variables); ln != NULL; ln = LstNode_Next(ln)) {
                char *var = Lst_Datum(ln);
                const char *value;
                char *p1;
@@ -1282,7 +1282,7 @@
        if (!Lst_IsEmpty(create)) {
                LstNode ln;
 
-               for (ln = Lst_First(create); ln != NULL; ln = Lst_Succ(ln)) {
+               for (ln = Lst_First(create); ln != NULL; ln = LstNode_Next(ln)) {
                        char *name = Lst_Datum(ln);
                        Var_Append(".TARGETS", name, VAR_GLOBAL);
                }
diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/meta.c       Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.109 2020/08/29 10:12:06 rillig Exp $ */
+/*      $NetBSD: meta.c,v 1.110 2020/08/29 10:41:12 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1324,8 +1324,9 @@
                            char *tp;
 
                            do {
-                               nln = Lst_FindFrom(missingFiles, Lst_Succ(ln),
-                                                   path_match, p);
+                               nln = Lst_FindFrom(missingFiles,
+                                                  LstNode_Next(ln),
+                                                  path_match, p);
                                tp = Lst_Datum(ln);
                                Lst_Remove(missingFiles, ln);
                                free(tp);
@@ -1557,7 +1558,7 @@
                            oodate = TRUE;
                    }
                    free(cmd);
-                   ln = Lst_Succ(ln);
+                   ln = LstNode_Next(ln);
                }
            } else if (strcmp(buf, "CWD") == 0) {
                /*
diff -r 487b60f93f00 -r 10fe3d242b4b usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sat Aug 29 10:35:03 2020 +0000
+++ b/usr.bin/make/suff.c       Sat Aug 29 10:41:12 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.130 2020/08/29 10:12:06 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.131 2020/08/29 10:41:12 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: suff.c,v 1.130 2020/08/29 10:12:06 rillig Exp $";
+static char rcsid[] = "$NetBSD: suff.c,v 1.131 2020/08/29 10:41: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.130 2020/08/29 10:12:06 rillig Exp $");
+__RCSID("$NetBSD: suff.c,v 1.131 2020/08/29 10:41:12 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -548,7 +548,7 @@
        if (srcLn == NULL) {
            srcLn = Lst_Find(sufflist, SuffSuffIsPrefix, str);
        } else {
-           srcLn = Lst_FindFrom(sufflist, Lst_Succ(srcLn),
+           srcLn = Lst_FindFrom(sufflist, LstNode_Next(srcLn),
                                  SuffSuffIsPrefix, str);
        }
        if (srcLn == NULL) {
@@ -1576,7 +1576,7 @@
            Lst_Append(gn->parents, pgn);
            pgn->unmade++;
            /* Expand wildcards on new node */
-           SuffExpandWildcards(Lst_Prev(cln), pgn);
+           SuffExpandWildcards(LstNode_Prev(cln), pgn);
        }
        Lst_Free(members);
 
@@ -1773,8 +1773,8 @@
     /*
      * Deal with wildcards and variables in any acquired sources
      */
-    for (ln = ln != NULL ? Lst_Succ(ln) : NULL; ln != NULL; ln = nln) {
-       nln = Lst_Succ(ln);
+    for (ln = ln != NULL ? LstNode_Next(ln) : NULL; ln != NULL; ln = nln) {
+       nln = LstNode_Next(ln);
        SuffExpandChildren(ln, tGn);
     }
 
@@ -1889,7 +1889,7 @@
      * that still contain variables or wildcards in their names.
      */
     for (ln = Lst_First(gn->children); ln != NULL; ln = nln) {
-       nln = Lst_Succ(ln);
+       nln = LstNode_Next(ln);
        SuffExpandChildren(ln, gn);
     }
 
@@ -2059,7 +2059,7 @@
                /*
                 * Search from this suffix's successor...
                 */
-               ln = Lst_Succ(ln);
+               ln = LstNode_Next(ln);
            }
        }
 
@@ -2138,7 +2138,7 @@
      * that still contain variables or wildcards in their names.
      */
     for (ln = Lst_First(gn->children); ln != NULL; ln = nln) {
-       nln = Lst_Succ(ln);
+       nln = LstNode_Next(ln);
        SuffExpandChildren(ln, gn);
     }
 



Home | Main Index | Thread Index | Old Index