Module Name:    src
Committed By:   rillig
Date:           Sun Dec 12 15:44:41 UTC 2021

Modified Files:
        src/usr.bin/make: for.c nonints.h parse.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.149 -r1.150 src/usr.bin/make/for.c
cvs rdiff -u -r1.215 -r1.216 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.573 -r1.574 src/usr.bin/make/parse.c

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/for.c
diff -u src/usr.bin/make/for.c:1.149 src/usr.bin/make/for.c:1.150
--- src/usr.bin/make/for.c:1.149	Sun Dec 12 14:27:48 2021
+++ src/usr.bin/make/for.c	Sun Dec 12 15:44:41 2021
@@ -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);
 }

Index: src/usr.bin/make/nonints.h
diff -u src/usr.bin/make/nonints.h:1.215 src/usr.bin/make/nonints.h:1.216
--- src/usr.bin/make/nonints.h:1.215	Sun Sep 12 08:03:48 2021
+++ src/usr.bin/make/nonints.h	Sun Dec 12 15:44:41 2021
@@ -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
 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);
 

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.573 src/usr.bin/make/parse.c:1.574
--- src/usr.bin/make/parse.c:1.573	Sun Dec 12 15:36:52 2021
+++ src/usr.bin/make/parse.c	Sun Dec 12 15:44:41 2021
@@ -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 isSys
 	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 lin
 	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 {

Reply via email to