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 Parse_SetInput to Parse_PushInput



details:   https://anonhg.NetBSD.org/src/rev/d8892803a107
branches:  trunk
changeset: 1027585:d8892803a107
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Dec 12 15:44:41 2021 +0000

description:
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:

 usr.bin/make/for.c     |   6 +++---
 usr.bin/make/nonints.h |   4 ++--
 usr.bin/make/parse.c   |  14 +++++++-------
 3 files changed, 12 insertions(+), 12 deletions(-)

diffs (106 lines):

diff -r 808349530624 -r d8892803a107 usr.bin/make/for.c
--- a/usr.bin/make/for.c        Sun Dec 12 15:36:52 2021 +0000
+++ b/usr.bin/make/for.c        Sun Dec 12 15:44:41 2021 +0000
@@ -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 @@
                return;
        }
 
-       Parse_SetInput(NULL, lineno, -1, ForReadMore, f);
+       Parse_PushInput(NULL, lineno, -1, ForReadMore, f);
 }
diff -r 808349530624 -r d8892803a107 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Sun Dec 12 15:36:52 2021 +0000
+++ b/usr.bin/make/nonints.h    Sun Dec 12 15:44:41 2021 +0000
@@ -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 @@
 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 -r 808349530624 -r d8892803a107 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Dec 12 15:36:52 2021 +0000
+++ b/usr.bin/make/parse.c      Sun Dec 12 15:44:41 2021 +0000
@@ -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 @@
 /*
  * 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 @@
        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 @@
  * 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 @@
        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 @@
        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 {



Home | Main Index | Thread Index | Old Index