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: rename a few functions to be more descrip...



details:   https://anonhg.NetBSD.org/src/rev/ad4fa5657f2d
branches:  trunk
changeset: 982196:ad4fa5657f2d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Apr 04 10:05:08 2021 +0000

description:
make: rename a few functions to be more descriptive

No functional change.

diffstat:

 usr.bin/make/compat.c  |   6 +++---
 usr.bin/make/job.c     |  14 +++++++-------
 usr.bin/make/main.c    |   6 +++---
 usr.bin/make/make.c    |  13 +++++++------
 usr.bin/make/make.h    |   4 ++--
 usr.bin/make/meta.c    |   4 ++--
 usr.bin/make/nonints.h |   4 ++--
 usr.bin/make/suff.c    |   9 +++++----
 8 files changed, 31 insertions(+), 29 deletions(-)

diffs (263 lines):

diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/compat.c
--- a/usr.bin/make/compat.c     Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/compat.c     Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat.c,v 1.225 2021/04/03 11:08:40 rillig Exp $      */
+/*     $NetBSD: compat.c,v 1.226 2021/04/04 10:05:08 rillig Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -96,7 +96,7 @@
 #include "pathnames.h"
 
 /*     "@(#)compat.c   8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: compat.c,v 1.225 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: compat.c,v 1.226 2021/04/04 10:05:08 rillig Exp $");
 
 static GNode *curTarg = NULL;
 static pid_t compatChild;
@@ -536,7 +536,7 @@
         * We need to be re-made.
         * Ensure that $? (.OODATE) and $> (.ALLSRC) are both set.
         */
-       Make_DoAllVar(gn);
+       GNode_SetLocalVars(gn);
 
        /*
         * Alter our type to tell if errors should be ignored or things
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/job.c
--- a/usr.bin/make/job.c        Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/job.c        Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.423 2021/04/04 09:58:51 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.424 2021/04/04 10:05:08 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -142,7 +142,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.423 2021/04/04 09:58:51 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.424 2021/04/04 10:05:08 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -441,7 +441,7 @@
 static sigset_t caught_signals;        /* Set of signals we handle */
 static volatile sig_atomic_t caught_sigchld;
 
-static void JobDoOutput(Job *, bool);
+static void CollectOutput(Job *, bool);
 static void JobInterrupt(bool, int) MAKE_ATTR_DEAD;
 static void JobRestartJobs(void);
 static void JobSigReset(void);
@@ -1053,7 +1053,7 @@
        (void)close(job->outPipe);
        job->outPipe = -1;
 
-       JobDoOutput(job, true);
+       CollectOutput(job, true);
        (void)close(job->inPipe);
        job->inPipe = -1;
 }
@@ -1780,7 +1780,7 @@
  *                     for this job
  */
 static void
-JobDoOutput(Job *job, bool finish)
+CollectOutput(Job *job, bool finish)
 {
        bool gotNL;             /* true if got a newline */
        bool fbuf;              /* true if our buffer filled up */
@@ -1800,7 +1800,7 @@
                if (errno == EAGAIN)
                        return;
                if (DEBUG(JOB)) {
-                       perror("JobDoOutput(piperead)");
+                       perror("CollectOutput(piperead)");
                }
                nr = 0;
        } else {
@@ -2078,7 +2078,7 @@
                        continue;
                job = jobByFdIndex[i];
                if (job->status == JOB_ST_RUNNING)
-                       JobDoOutput(job, false);
+                       CollectOutput(job, false);
 #if defined(USE_FILEMON) && !defined(USE_FILEMON_DEV)
                /*
                 * With meta mode, we may have activity on the job's filemon
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/main.c       Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.534 2021/04/03 11:08:40 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.535 2021/04/04 10:05:08 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*     "@(#)main.c     8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.534 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.535 2021/04/04 10:05:08 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
            "The Regents of the University of California.  "
@@ -1588,7 +1588,7 @@
         * Now that all search paths have been read for suffixes et al, it's
         * time to add the default search path to their lists...
         */
-       Suff_DoPaths();
+       Suff_ExtendPaths();
 
        /*
         * Propagate attributes through :: dependency lists.
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/make.c
--- a/usr.bin/make/make.c       Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/make.c       Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.c,v 1.243 2021/04/03 11:08:40 rillig Exp $        */
+/*     $NetBSD: make.c,v 1.244 2021/04/04 10:05:08 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -85,7 +85,8 @@
  *                     Update the node's youngestChild field based on the
  *                     child's modification time.
  *
- *     Make_DoAllVar   Set up the various local variables for a
+ *     GNode_SetLocalVars
+ *                     Set up the various local variables for a
  *                     target, including the .ALLSRC variable, making
  *                     sure that any variable that needs to exist
  *                     at the very least has the empty value.
@@ -103,7 +104,7 @@
 #include "job.h"
 
 /*     "@(#)make.c     8.1 (Berkeley) 6/6/93"  */
-MAKE_RCSID("$NetBSD: make.c,v 1.243 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.244 2021/04/04 10:05:08 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -868,7 +869,7 @@
  * match its ALLSRC variable.
  */
 void
-Make_DoAllVar(GNode *gn)
+GNode_SetLocalVars(GNode *gn)
 {
        GNodeListNode *ln;
 
@@ -1023,7 +1024,7 @@
                        DEBUG0(MAKE, "out-of-date\n");
                        if (opts.queryFlag)
                                return true;
-                       Make_DoAllVar(gn);
+                       GNode_SetLocalVars(gn);
                        Job_Make(gn);
                        have_token = false;
                } else {
@@ -1037,7 +1038,7 @@
                                 * for .TARGET when building up the local
                                 * variables of its parent(s)...
                                 */
-                               Make_DoAllVar(gn);
+                               GNode_SetLocalVars(gn);
                        }
                        Make_Update(gn);
                }
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/make.h
--- a/usr.bin/make/make.h       Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/make.h       Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.259 2021/04/03 15:22:23 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.260 2021/04/04 10:05:08 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -675,7 +675,7 @@
 time_t Make_Recheck(GNode *);
 void Make_HandleUse(GNode *, GNode *);
 void Make_Update(GNode *);
-void Make_DoAllVar(GNode *);
+void GNode_SetLocalVars(GNode *);
 bool Make_Run(GNodeList *);
 bool shouldDieQuietly(GNode *, int);
 void PrintOnError(GNode *, const char *);
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/meta.c
--- a/usr.bin/make/meta.c       Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/meta.c       Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: meta.c,v 1.180 2021/04/03 11:08:40 rillig Exp $ */
+/*      $NetBSD: meta.c,v 1.181 2021/04/04 10:05:08 rillig Exp $ */
 
 /*
  * Implement 'meta' mode.
@@ -1116,7 +1116,7 @@
      * requires that all variables are set in the same way that they
      * would be if the target needs to be re-built.
      */
-    Make_DoAllVar(gn);
+    GNode_SetLocalVars(gn);
 
     meta_name(fname, sizeof fname, dname.str, tname, dname.str);
 
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/nonints.h    Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.208 2021/04/03 14:39:02 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.209 2021/04/04 10:05:08 rillig Exp $     */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -283,7 +283,7 @@
 void Suff_EndTransform(GNode *);
 void Suff_AddSuffix(const char *, GNode **);
 SearchPath *Suff_GetPath(const char *);
-void Suff_DoPaths(void);
+void Suff_ExtendPaths(void);
 void Suff_AddInclude(const char *);
 void Suff_AddLib(const char *);
 void Suff_FindDeps(GNode *);
diff -r 79cbb6f5ab0b -r ad4fa5657f2d usr.bin/make/suff.c
--- a/usr.bin/make/suff.c       Sun Apr 04 09:58:51 2021 +0000
+++ b/usr.bin/make/suff.c       Sun Apr 04 10:05:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: suff.c,v 1.349 2021/04/03 11:08:40 rillig Exp $        */
+/*     $NetBSD: suff.c,v 1.350 2021/04/04 10:05:08 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -77,7 +77,8 @@
  *
  *     Suff_End        Clean up the module.
  *
- *     Suff_DoPaths    Extend the search path of each suffix to include the
+ *     Suff_ExtendPaths
+ *                     Extend the search path of each suffix to include the
  *                     default search path.
  *
  *     Suff_ClearSuffixes
@@ -114,7 +115,7 @@
 #include "dir.h"
 
 /*     "@(#)suff.c     8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.349 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.350 2021/04/04 10:05:08 rillig Exp $");
 
 typedef List SuffixList;
 typedef ListNode SuffixListNode;
@@ -876,7 +877,7 @@
  * ".LIBS" and the flag is '-L'.
  */
 void
-Suff_DoPaths(void)
+Suff_ExtendPaths(void)
 {
        SuffixListNode *ln;
        char *flags;



Home | Main Index | Thread Index | Old Index