summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-12-12 15:44:41 +0000
committerrillig <rillig@NetBSD.org>2021-12-12 15:44:41 +0000
commit2391bf2aa5284b65e38f48682d28a01bfcd7cdb6 (patch)
treebc043a0eb7e94f7e1de315d4c2d5d07d4ffb95fe /usr.bin/make
parentdc79545fd5cc5ba18ac269ed2f23999463bdd8ca (diff)
make: rename Parse_SetInput to Parse_PushInput
The word 'set' sounded too much like it would replace the current file, but instead the file is pushed to the stack, and the previous file is continued later. No functional change.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/for.c6
-rw-r--r--usr.bin/make/nonints.h4
-rw-r--r--usr.bin/make/parse.c14
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index f3580e4a61c..013b0f21d84 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -1,4 +1,4 @@
-/* $NetBSD: for.c,v 1.149 2021/12/12 14:27:48 rillig Exp $ */
+/* $NetBSD: for.c,v 1.150 2021/12/12 15:44:41 rillig Exp $ */
/*
* Copyright (c) 1992, The Regents of the University of California.
@@ -58,7 +58,7 @@
#include "make.h"
/* "@(#)for.c 8.1 (Berkeley) 6/6/93" */
-MAKE_RCSID("$NetBSD: for.c,v 1.149 2021/12/12 14:27:48 rillig Exp $");
+MAKE_RCSID("$NetBSD: for.c,v 1.150 2021/12/12 15:44:41 rillig Exp $");
/* One of the variables to the left of the "in" in a .for loop. */
@@ -517,5 +517,5 @@ For_Run(int lineno)
return;
}
- Parse_SetInput(NULL, lineno, -1, ForReadMore, f);
+ Parse_PushInput(NULL, lineno, -1, ForReadMore, f);
}
diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h
index 8cc04986668..03542692f74 100644
--- a/usr.bin/make/nonints.h
+++ b/usr.bin/make/nonints.h
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.215 2021/09/12 08:03:48 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.216 2021/12/12 15:44:41 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -162,7 +162,7 @@ bool Parse_IsVar(const char *, VarAssign *out_var);
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 *);
+void Parse_PushInput(const char *, int, int, ReadMoreProc, void *);
void Parse_MainName(GNodeList *);
int Parse_NumErrors(void);
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index 86852397ae0..87bd99fa54e 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.573 2021/12/12 15:36:52 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.574 2021/12/12 15:44:41 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.573 2021/12/12 15:36:52 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.574 2021/12/12 15:44:41 rillig Exp $");
/* types and constants */
@@ -2115,7 +2115,7 @@ Parse_AddIncludeDir(const char *dir)
/*
* Handle one of the .[-ds]include directives by remembering the current file
* and pushing the included file on the stack. After the included file has
- * finished, parsing continues with the including file; see Parse_SetInput
+ * finished, parsing continues with the including file; see Parse_PushInput
* and ParseEOF.
*
* System includes are looked up in sysIncPath, any other includes are looked
@@ -2222,7 +2222,7 @@ IncludeFile(const char *file, bool isSystem, bool depinc, bool silent)
lf = loadfile(fullname, fd);
/* Start reading from this file next */
- Parse_SetInput(fullname, 0, -1, loadedfile_readMore, lf);
+ Parse_PushInput(fullname, 0, -1, loadedfile_readMore, lf);
CurFile()->lf = lf;
if (depinc)
doing_depend = depinc; /* only turn it on */
@@ -2404,7 +2404,7 @@ ParseTrackInput(const char *name)
* The given file is added to the includes stack.
*/
void
-Parse_SetInput(const char *name, int lineno, int fd,
+Parse_PushInput(const char *name, int lineno, int fd,
ReadMoreProc readMore, void *readMoreArg)
{
IFile *curFile;
@@ -2417,7 +2417,7 @@ Parse_SetInput(const char *name, int lineno, int fd,
else
ParseTrackInput(name);
- DEBUG3(PARSE, "Parse_SetInput: %s %s, line %d\n",
+ DEBUG3(PARSE, "Parse_PushInput: %s %s, line %d\n",
readMore == loadedfile_readMore ? "file" : ".for loop in",
name, lineno);
@@ -3233,7 +3233,7 @@ Parse_File(const char *name, int fd)
if (name == NULL)
name = "(stdin)";
- Parse_SetInput(name, 0, -1, loadedfile_readMore, lf);
+ Parse_PushInput(name, 0, -1, loadedfile_readMore, lf);
CurFile()->lf = lf;
do {