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 variable and function for handling...
details: https://anonhg.NetBSD.org/src/rev/6eb4ac383d79
branches: trunk
changeset: 1022911:6eb4ac383d79
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 14 13:32:12 2021 +0000
description:
make: rename variable and function for handling parse errors
The word 'fatals' was an unnecessary abbreviation.
No functional change.
diffstat:
usr.bin/make/main.c | 6 +++---
usr.bin/make/nonints.h | 4 ++--
usr.bin/make/parse.c | 14 +++++++-------
3 files changed, 12 insertions(+), 12 deletions(-)
diffs (100 lines):
diff -r 04ea25c447b1 -r 6eb4ac383d79 usr.bin/make/main.c
--- a/usr.bin/make/main.c Sat Aug 14 13:26:07 2021 +0000
+++ b/usr.bin/make/main.c Sat Aug 14 13:32:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.540 2021/06/18 12:54:17 rillig Exp $ */
+/* $NetBSD: main.c,v 1.541 2021/08/14 13:32:12 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.540 2021/06/18 12:54:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.541 2021/08/14 13:32:12 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1658,7 +1658,7 @@
static int
main_Exit(bool outOfDate)
{
- if (opts.strict && (main_errors > 0 || Parse_GetFatals() > 0))
+ if (opts.strict && (main_errors > 0 || Parse_NumErrors() > 0))
return 2; /* Not 1 so -q can distinguish error */
return outOfDate ? 1 : 0;
}
diff -r 04ea25c447b1 -r 6eb4ac383d79 usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h Sat Aug 14 13:26:07 2021 +0000
+++ b/usr.bin/make/nonints.h Sat Aug 14 13:32:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nonints.h,v 1.213 2021/04/11 13:35:56 rillig Exp $ */
+/* $NetBSD: nonints.h,v 1.214 2021/08/14 13:32:12 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -164,7 +164,7 @@
void Parse_File(const char *, int);
void Parse_SetInput(const char *, int, int, ReadMoreProc, void *);
void Parse_MainName(GNodeList *);
-int Parse_GetFatals(void);
+int Parse_NumErrors(void);
/* suff.c */
diff -r 04ea25c447b1 -r 6eb4ac383d79 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Sat Aug 14 13:26:07 2021 +0000
+++ b/usr.bin/make/parse.c Sat Aug 14 13:32:12 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.560 2021/06/21 10:42:06 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.561 2021/08/14 13:32:12 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.560 2021/06/21 10:42:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.561 2021/08/14 13:32:12 rillig Exp $");
/* types and constants */
@@ -218,7 +218,7 @@
/* parser state */
/* number of fatal errors */
-static int fatals = 0;
+static int parseErrors = 0;
/*
* Variables for doing includes
@@ -613,7 +613,7 @@
goto print_stack_trace;
if (type == PARSE_WARNING && !opts.parseWarnFatal)
goto print_stack_trace;
- fatals++;
+ parseErrors++;
if (type == PARSE_WARNING && !fatal_warning_error_printed) {
Error("parsing warnings being treated as errors");
fatal_warning_error_printed = true;
@@ -3250,7 +3250,7 @@
FinishDependencyGroup();
- if (fatals != 0) {
+ if (parseErrors != 0) {
(void)fflush(stdout);
(void)fprintf(stderr,
"%s: Fatal errors encountered -- cannot continue",
@@ -3305,7 +3305,7 @@
}
int
-Parse_GetFatals(void)
+Parse_NumErrors(void)
{
- return fatals;
+ return parseErrors;
}
Home |
Main Index |
Thread Index |
Old Index