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: remove filler word 'Do' from function nam...



details:   https://anonhg.NetBSD.org/src/rev/0486868a4fa7
branches:  trunk
changeset: 982197:0486868a4fa7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Apr 04 10:13:09 2021 +0000

description:
make: remove filler word 'Do' from function names for parsing

No functional change, except for debug logging.

diffstat:

 usr.bin/make/dir.c                                |   6 +-
 usr.bin/make/main.c                               |   6 +-
 usr.bin/make/nonints.h                            |   4 +-
 usr.bin/make/parse.c                              |  98 +++++++++++-----------
 usr.bin/make/unit-tests/cond-func-make-main.mk    |   6 +-
 usr.bin/make/unit-tests/counter-append.mk         |   4 +-
 usr.bin/make/unit-tests/counter.mk                |   4 +-
 usr.bin/make/unit-tests/dep-var.mk                |   4 +-
 usr.bin/make/unit-tests/deptgt.exp                |   6 +-
 usr.bin/make/unit-tests/deptgt.mk                 |   4 +-
 usr.bin/make/unit-tests/directive-export-impl.exp |   8 +-
 usr.bin/make/unit-tests/directive-for-errors.mk   |   6 +-
 usr.bin/make/unit-tests/include-main.exp          |   2 +-
 usr.bin/make/unit-tests/opt-file.mk               |   6 +-
 usr.bin/make/unit-tests/suff-incomplete.exp       |  10 +-
 usr.bin/make/unit-tests/suff-main-several.exp     |  24 ++--
 usr.bin/make/unit-tests/suff-rebuild.exp          |  14 +-
 usr.bin/make/unit-tests/var-eval-short.exp        |   2 +-
 usr.bin/make/unit-tests/var-op-append.mk          |   4 +-
 usr.bin/make/unit-tests/var-op-sunsh.mk           |  10 +-
 usr.bin/make/unit-tests/varmod-indirect.exp       |   2 +-
 usr.bin/make/unit-tests/varmod-loop.exp           |   2 +-
 usr.bin/make/unit-tests/varname-dot-shell.exp     |   4 +-
 usr.bin/make/unit-tests/varname-empty.mk          |   4 +-
 24 files changed, 120 insertions(+), 120 deletions(-)

diffs (truncated from 904 to 300 lines):

diff -r ad4fa5657f2d -r 0486868a4fa7 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sun Apr 04 10:05:08 2021 +0000
+++ b/usr.bin/make/dir.c        Sun Apr 04 10:13:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.271 2021/04/03 11:08:40 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.272 2021/04/04 10:13:09 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -138,7 +138,7 @@
 #include "job.h"
 
 /*     "@(#)dir.c      8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: dir.c,v 1.271 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.272 2021/04/04 10:13:09 rillig Exp $");
 
 /*
  * A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -217,7 +217,7 @@
         * and "./." are different.
         *
         * Not sure what happens when .CURDIR is assigned a new value; see
-        * Parse_DoVar.
+        * Parse_Var.
         */
        char *name;
 
diff -r ad4fa5657f2d -r 0486868a4fa7 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Sun Apr 04 10:05:08 2021 +0000
+++ b/usr.bin/make/main.c       Sun Apr 04 10:13:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.535 2021/04/04 10:05:08 rillig Exp $        */
+/*     $NetBSD: main.c,v 1.536 2021/04/04 10:13:09 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.535 2021/04/04 10:05:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.536 2021/04/04 10:13:09 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
            "The Regents of the University of California.  "
@@ -655,7 +655,7 @@
        for (; argc > 1; argv++, argc--) {
                VarAssign var;
                if (Parse_IsVar(argv[1], &var)) {
-                       Parse_DoVar(&var, SCOPE_CMDLINE);
+                       Parse_Var(&var, SCOPE_CMDLINE);
                } else {
                        if (argv[1][0] == '\0')
                                Punt("illegal (null) argument.");
diff -r ad4fa5657f2d -r 0486868a4fa7 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Apr 04 10:05:08 2021 +0000
+++ b/usr.bin/make/nonints.h    Sun Apr 04 10:13:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.209 2021/04/04 10:05:08 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.210 2021/04/04 10:13:09 rillig Exp $     */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -159,7 +159,7 @@
 
 void Parse_Error(ParseErrorLevel, const char *, ...) MAKE_ATTR_PRINTFLIKE(2, 3);
 bool Parse_IsVar(const char *, VarAssign *out_var);
-void Parse_DoVar(VarAssign *, GNode *);
+void Parse_Var(VarAssign *, GNode *);
 void Parse_AddIncludeDir(const char *);
 void Parse_File(const char *, int);
 void Parse_SetInput(const char *, int, int, ReadMoreProc, void *);
diff -r ad4fa5657f2d -r 0486868a4fa7 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Apr 04 10:05:08 2021 +0000
+++ b/usr.bin/make/parse.c      Sun Apr 04 10:13:09 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.555 2021/04/04 09:58:51 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.556 2021/04/04 10:13:09 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.555 2021/04/04 09:58:51 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.556 2021/04/04 10:13:09 rillig Exp $");
 
 /* types and constants */
 
@@ -876,7 +876,7 @@
         * list of things to create, but only if the user didn't specify a
         * target on the command line and .MAIN occurs for the first time.
         *
-        * See ParseDoDependencyTargetSpecial, branch SP_MAIN.
+        * See ParseDependencyTargetSpecial, branch SP_MAIN.
         * See unit-tests/cond-func-make-main.mk.
         */
        Lst_Append(&opts.create, bmake_strdup(src));
@@ -1056,9 +1056,9 @@
 
 /* Handle special targets like .PATH, .DEFAULT, .BEGIN, .ORDER. */
 static void
-ParseDoDependencyTargetSpecial(ParseSpecial *inout_specType,
-                              const char *targetName,
-                              SearchPathList **inout_paths)
+ParseDependencyTargetSpecial(ParseSpecial *inout_specType,
+                            const char *targetName,
+                            SearchPathList **inout_paths)
 {
        switch (*inout_specType) {
        case SP_PATH:
@@ -1122,8 +1122,8 @@
  * Call on the suffix module to give us a path to modify.
  */
 static bool
-ParseDoDependencyTargetPath(const char *suffixName,
-                           SearchPathList **inout_paths)
+ParseDependencyTargetPath(const char *suffixName,
+                         SearchPathList **inout_paths)
 {
        SearchPath *path;
 
@@ -1145,9 +1145,9 @@
  * See if it's a special target and if so set specType to match it.
  */
 static bool
-ParseDoDependencyTarget(const char *targetName,
-                       ParseSpecial *inout_specType,
-                       GNodeType *out_tOp, SearchPathList **inout_paths)
+ParseDependencyTarget(const char *targetName,
+                     ParseSpecial *inout_specType,
+                     GNodeType *out_tOp, SearchPathList **inout_paths)
 {
        int keywd;
 
@@ -1169,19 +1169,19 @@
                *inout_specType = parseKeywords[keywd].spec;
                *out_tOp = parseKeywords[keywd].op;
 
-               ParseDoDependencyTargetSpecial(inout_specType, targetName,
+               ParseDependencyTargetSpecial(inout_specType, targetName,
                    inout_paths);
 
        } else if (strncmp(targetName, ".PATH", 5) == 0) {
                *inout_specType = SP_PATH;
-               if (!ParseDoDependencyTargetPath(targetName + 5, inout_paths))
+               if (!ParseDependencyTargetPath(targetName + 5, inout_paths))
                        return false;
        }
        return true;
 }
 
 static void
-ParseDoDependencyTargetMundane(char *targetName, StringList *curTargs)
+ParseDependencyTargetMundane(char *targetName, StringList *curTargs)
 {
        if (Dir_HasWildcards(targetName)) {
                /*
@@ -1218,7 +1218,7 @@
 }
 
 static void
-ParseDoDependencyTargetExtraWarn(char **pp, const char *lstart)
+ParseDependencyTargetExtraWarn(char **pp, const char *lstart)
 {
        bool warning = false;
        char *cp = *pp;
@@ -1237,7 +1237,7 @@
 }
 
 static void
-ParseDoDependencyCheckSpec(ParseSpecial specType)
+ParseDependencyCheckSpec(ParseSpecial specType)
 {
        switch (specType) {
        default:
@@ -1262,7 +1262,7 @@
 }
 
 static bool
-ParseDoDependencyParseOp(char **pp, const char *lstart, GNodeType *out_op)
+ParseDependencyParseOp(char **pp, const char *lstart, GNodeType *out_op)
 {
        const char *cp = *pp;
 
@@ -1304,7 +1304,7 @@
 }
 
 static void
-ParseDoDependencySourcesEmpty(ParseSpecial specType, SearchPathList *paths)
+ParseDependencySourcesEmpty(ParseSpecial specType, SearchPathList *paths)
 {
        switch (specType) {
        case SP_SUFFIXES:
@@ -1370,8 +1370,8 @@
  * and will cause make to do a new chdir to that path.
  */
 static void
-ParseDoDependencySourceSpecial(ParseSpecial specType, char *word,
-                              SearchPathList *paths)
+ParseDependencySourceSpecial(ParseSpecial specType, char *word,
+                            SearchPathList *paths)
 {
        switch (specType) {
        case SP_SUFFIXES:
@@ -1398,13 +1398,13 @@
 }
 
 static bool
-ParseDoDependencyTargets(char **inout_cp,
-                        char **inout_line,
-                        const char *lstart,
-                        ParseSpecial *inout_specType,
-                        GNodeType *inout_tOp,
-                        SearchPathList **inout_paths,
-                        StringList *curTargs)
+ParseDependencyTargets(char **inout_cp,
+                      char **inout_line,
+                      const char *lstart,
+                      ParseSpecial *inout_specType,
+                      GNodeType *inout_tOp,
+                      SearchPathList **inout_paths,
+                      StringList *curTargs)
 {
        char *cp;
        char *tgt = *inout_line;
@@ -1461,7 +1461,7 @@
                savec = *cp;
                *cp = '\0';
 
-               if (!ParseDoDependencyTarget(tgt, inout_specType, inout_tOp,
+               if (!ParseDependencyTarget(tgt, inout_specType, inout_tOp,
                    inout_paths))
                        return false;
 
@@ -1470,7 +1470,7 @@
                 * the end of the targets list
                 */
                if (*inout_specType == SP_NOT && *tgt != '\0')
-                       ParseDoDependencyTargetMundane(tgt, curTargs);
+                       ParseDependencyTargetMundane(tgt, curTargs);
                else if (*inout_specType == SP_PATH && *tgt != '.' &&
                         *tgt != '\0')
                        Parse_Error(PARSE_WARNING, "Extra target (%s) ignored",
@@ -1484,7 +1484,7 @@
                 * we allow on this line.
                 */
                if (*inout_specType != SP_NOT && *inout_specType != SP_PATH)
-                       ParseDoDependencyTargetExtraWarn(&cp, lstart);
+                       ParseDependencyTargetExtraWarn(&cp, lstart);
                else
                        pp_skip_whitespace(&cp);
 
@@ -1502,8 +1502,8 @@
 }
 
 static void
-ParseDoDependencySourcesSpecial(char *start, char *end,
-                               ParseSpecial specType, SearchPathList *paths)
+ParseDependencySourcesSpecial(char *start, char *end,
+                             ParseSpecial specType, SearchPathList *paths)
 {
        char savec;
 
@@ -1512,7 +1512,7 @@
                        end++;
                savec = *end;
                *end = '\0';
-               ParseDoDependencySourceSpecial(specType, start, paths);
+               ParseDependencySourceSpecial(specType, start, paths);
                *end = savec;
                if (savec != '\0')
                        end++;
@@ -1522,8 +1522,8 @@
 }
 
 static bool
-ParseDoDependencySourcesMundane(char *start, char *end,
-                               ParseSpecial specType, GNodeType tOp)
+ParseDependencySourcesMundane(char *start, char *end,
+                             ParseSpecial specType, GNodeType tOp)
 {
        while (*start != '\0') {
                /*
@@ -1583,7 +1583,7 @@
  *
  * The operator is applied to each node in the global 'targets' list,
  * which is where the nodes found for the targets are kept, by means of
- * the ParseDoOp function.
+ * the ParseOp function.
  *
  * The sources are parsed in much the same way as the targets, except
  * that they are expanded using the wildcarding scheme of the C-Shell,
@@ -1602,7 +1602,7 @@
  * Upon return, the value of the line is unspecified.
  */
 static void
-ParseDoDependency(char *line)
+ParseDependency(char *line)



Home | Main Index | Thread Index | Old Index