Module Name: src
Committed By: rillig
Date: Sun Apr 4 09:58:51 UTC 2021
Modified Files:
src/usr.bin/make: job.c parse.c
src/usr.bin/make/unit-tests: directive-for-errors.mk
opt-jobs-no-action.mk shell-csh.mk
Log Message:
make: rename ambiguous functions
These two functions have counterparts that include the word 'Do' in
their name, which is confusing.
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.422 -r1.423 src/usr.bin/make/job.c
cvs rdiff -u -r1.554 -r1.555 src/usr.bin/make/parse.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/directive-for-errors.mk
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/shell-csh.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.422 src/usr.bin/make/job.c:1.423
--- src/usr.bin/make/job.c:1.422 Sat Apr 3 14:39:02 2021
+++ src/usr.bin/make/job.c Sun Apr 4 09:58:51 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: job.c,v 1.422 2021/04/03 14:39:02 rillig Exp $ */
+/* $NetBSD: job.c,v 1.423 2021/04/04 09:58:51 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.422 2021/04/03 14:39:02 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.423 2021/04/04 09:58:51 rillig Exp $");
/*
* A shell defines how the commands are run. All commands for a target are
@@ -1729,7 +1729,7 @@ JobStart(GNode *gn, bool special)
* that in all practical cases, handling the output is left to the caller.
*/
static char *
-JobOutput(char *cp, char *endp) /* XXX: should all be const */
+PrintOutput(char *cp, char *endp) /* XXX: should all be const */
{
char *ecp; /* XXX: should be const */
@@ -1866,7 +1866,7 @@ again:
if (i >= job->curPos) {
char *cp;
- cp = JobOutput(job->outBuf, &job->outBuf[i]);
+ cp = PrintOutput(job->outBuf, &job->outBuf[i]);
/*
* There's still more in that thar buffer. This time,
Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.554 src/usr.bin/make/parse.c:1.555
--- src/usr.bin/make/parse.c:1.554 Sat Apr 3 14:31:44 2021
+++ src/usr.bin/make/parse.c Sun Apr 4 09:58:51 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.554 2021/04/03 14:31:44 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.555 2021/04/04 09:58:51 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.554 2021/04/03 14:31:44 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.555 2021/04/04 09:58:51 rillig Exp $");
/* types and constants */
@@ -2837,7 +2837,7 @@ ParseSkippedBranches(void)
* This check will probably duplicate some of
* the code in ParseLine. Most of the code
* there cannot apply, only ParseVarassign and
- * ParseDependency can, and to prevent code
+ * ParseDependencyLine can, and to prevent code
* duplication, these would need to be called
* with a flag called onlyCheckSyntax.
*
@@ -3079,7 +3079,7 @@ FindSemicolon(char *p)
* op -> ':' | '::' | '!'
*/
static void
-ParseDependency(char *line)
+ParseDependencyLine(char *line)
{
VarEvalFlags eflags;
char *expanded_line;
@@ -3190,7 +3190,7 @@ ParseLine(char *line)
FinishDependencyGroup();
- ParseDependency(line);
+ ParseDependencyLine(line);
}
/*
Index: src/usr.bin/make/unit-tests/directive-for-errors.mk
diff -u src/usr.bin/make/unit-tests/directive-for-errors.mk:1.1 src/usr.bin/make/unit-tests/directive-for-errors.mk:1.2
--- src/usr.bin/make/unit-tests/directive-for-errors.mk:1.1 Thu Dec 31 03:05:12 2020
+++ src/usr.bin/make/unit-tests/directive-for-errors.mk Sun Apr 4 09:58:51 2021
@@ -1,4 +1,4 @@
-# $NetBSD: directive-for-errors.mk,v 1.1 2020/12/31 03:05:12 rillig Exp $
+# $NetBSD: directive-for-errors.mk,v 1.2 2021/04/04 09:58:51 rillig Exp $
#
# Tests for error handling in .for loops.
@@ -13,7 +13,7 @@
# XXX: The error message is misleading though. As of 2020-12-31, it says
# "Unknown directive "for"", but that directive is actually known. This is
# because ForEval does not detect the .for loop as such, so parsing
-# continues in ParseLine > ParseDependency > ParseDoDependency >
+# continues in ParseLine > ParseDependencyLine > ParseDoDependency >
# ParseDoDependencyTargets > ParseErrorNoDependency, and there the directive
# name is parsed a bit differently.
.for/i in 1 2 3
Index: src/usr.bin/make/unit-tests/opt-jobs-no-action.mk
diff -u src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.8 src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.9
--- src/usr.bin/make/unit-tests/opt-jobs-no-action.mk:1.8 Thu Dec 10 23:54:41 2020
+++ src/usr.bin/make/unit-tests/opt-jobs-no-action.mk Sun Apr 4 09:58:51 2021
@@ -1,4 +1,4 @@
-# $NetBSD: opt-jobs-no-action.mk,v 1.8 2020/12/10 23:54:41 rillig Exp $
+# $NetBSD: opt-jobs-no-action.mk,v 1.9 2021/04/04 09:58:51 rillig Exp $
#
# Tests for the combination of the options -j and -n, which prints the
# commands instead of actually running them.
@@ -23,7 +23,7 @@
# this is handled by the [0] != '\0' checks in Job_ParseShell.
# The '\#' is handled by ParseGetLine.
# The '\n' is handled by Str_Words in Job_ParseShell.
-# The '$$' is handled by Var_Subst in ParseDependency.
+# The '$$' is handled by Var_Subst in ParseDependencyLine.
.SHELL: \
name=sh \
path=${.SHELL} \
Index: src/usr.bin/make/unit-tests/shell-csh.mk
diff -u src/usr.bin/make/unit-tests/shell-csh.mk:1.7 src/usr.bin/make/unit-tests/shell-csh.mk:1.8
--- src/usr.bin/make/unit-tests/shell-csh.mk:1.7 Sun Dec 13 02:09:55 2020
+++ src/usr.bin/make/unit-tests/shell-csh.mk Sun Apr 4 09:58:51 2021
@@ -1,4 +1,4 @@
-# $NetBSD: shell-csh.mk,v 1.7 2020/12/13 02:09:55 sjg Exp $
+# $NetBSD: shell-csh.mk,v 1.8 2021/04/04 09:58:51 rillig Exp $
#
# Tests for using a C shell for running the commands.
@@ -12,7 +12,7 @@ CSH!= which csh 2> /dev/null || true
.endif
# In parallel mode, the shell->noPrint command is filtered from
-# the output, rather naively (in JobOutput).
+# the output, rather naively (in PrintOutput).
#
# Until 2020-10-03, the output in parallel mode was garbled because
# the definition of the csh had been wrong since 1993 at least.