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 ambiguous functions
details: https://anonhg.NetBSD.org/src/rev/79cbb6f5ab0b
branches: trunk
changeset: 982195:79cbb6f5ab0b
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Apr 04 09:58:51 2021 +0000
description:
make: rename ambiguous functions
These two functions have counterparts that include the word 'Do' in
their name, which is confusing.
No functional change.
diffstat:
usr.bin/make/job.c | 8 ++++----
usr.bin/make/parse.c | 10 +++++-----
usr.bin/make/unit-tests/directive-for-errors.mk | 4 ++--
usr.bin/make/unit-tests/opt-jobs-no-action.mk | 4 ++--
usr.bin/make/unit-tests/shell-csh.mk | 4 ++--
5 files changed, 15 insertions(+), 15 deletions(-)
diffs (135 lines):
diff -r 6e6240261112 -r 79cbb6f5ab0b usr.bin/make/job.c
--- a/usr.bin/make/job.c Sun Apr 04 09:49:13 2021 +0000
+++ b/usr.bin/make/job.c Sun Apr 04 09:58:51 2021 +0000
@@ -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 @@
* 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 @@
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,
diff -r 6e6240261112 -r 79cbb6f5ab0b usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sun Apr 04 09:49:13 2021 +0000
+++ b/usr.bin/make/parse.c Sun Apr 04 09:58:51 2021 +0000
@@ -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 @@
* 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 @@
* op -> ':' | '::' | '!'
*/
static void
-ParseDependency(char *line)
+ParseDependencyLine(char *line)
{
VarEvalFlags eflags;
char *expanded_line;
@@ -3190,7 +3190,7 @@
FinishDependencyGroup();
- ParseDependency(line);
+ ParseDependencyLine(line);
}
/*
diff -r 6e6240261112 -r 79cbb6f5ab0b usr.bin/make/unit-tests/directive-for-errors.mk
--- a/usr.bin/make/unit-tests/directive-for-errors.mk Sun Apr 04 09:49:13 2021 +0000
+++ b/usr.bin/make/unit-tests/directive-for-errors.mk Sun Apr 04 09:58:51 2021 +0000
@@ -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
diff -r 6e6240261112 -r 79cbb6f5ab0b usr.bin/make/unit-tests/opt-jobs-no-action.mk
--- a/usr.bin/make/unit-tests/opt-jobs-no-action.mk Sun Apr 04 09:49:13 2021 +0000
+++ b/usr.bin/make/unit-tests/opt-jobs-no-action.mk Sun Apr 04 09:58:51 2021 +0000
@@ -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} \
diff -r 6e6240261112 -r 79cbb6f5ab0b usr.bin/make/unit-tests/shell-csh.mk
--- a/usr.bin/make/unit-tests/shell-csh.mk Sun Apr 04 09:49:13 2021 +0000
+++ b/usr.bin/make/unit-tests/shell-csh.mk Sun Apr 04 09:58:51 2021 +0000
@@ -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 @@
.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.
Home |
Main Index |
Thread Index |
Old Index