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: merge duplicate types CondEvalResult and ...



details:   https://anonhg.NetBSD.org/src/rev/6af41190ff6a
branches:  trunk
changeset: 1029273:6af41190ff6a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Dec 29 05:05:21 2021 +0000

description:
make: merge duplicate types CondEvalResult and CondResult

No binary change.

diffstat:

 usr.bin/make/cond.c    |  14 +++++++-------
 usr.bin/make/make.h    |   6 +++---
 usr.bin/make/nonints.h |   6 +++---
 usr.bin/make/var.c     |   6 +++---
 4 files changed, 16 insertions(+), 16 deletions(-)

diffs (131 lines):

diff -r ead8f0dee616 -r 6af41190ff6a usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Wed Dec 29 05:01:35 2021 +0000
+++ b/usr.bin/make/cond.c       Wed Dec 29 05:05:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.311 2021/12/29 05:01:35 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.312 2021/12/29 05:05:21 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.311 2021/12/29 05:01:35 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.312 2021/12/29 05:05:21 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -981,7 +981,7 @@
        return res;
 }
 
-static CondEvalResult
+static CondResult
 CondParser_Eval(CondParser *par)
 {
        CondResult res;
@@ -1009,13 +1009,13 @@
  *
  *     *out_value      is set to the boolean value of the condition
  */
-static CondEvalResult
+static CondResult
 CondEvalExpression(const char *cond, bool plain,
                   bool (*evalBare)(const char *), bool negate,
                   bool eprint, bool leftUnquotedOK)
 {
        CondParser par;
-       CondEvalResult rval;
+       CondResult rval;
 
        cpp_skip_hspace(&cond);
 
@@ -1039,7 +1039,7 @@
  * Evaluate a condition in a :? modifier, such as
  * ${"${VAR}" == value:?yes:no}.
  */
-CondEvalResult
+CondResult
 Cond_EvalCondition(const char *cond)
 {
        return CondEvalExpression(cond, true,
@@ -1120,7 +1120,7 @@
  *                     a syntax error or because some variable was undefined
  *                     or because the condition could not be evaluated
  */
-CondEvalResult
+CondResult
 Cond_EvalLine(const char *line)
 {
        typedef enum IfState {
diff -r ead8f0dee616 -r 6af41190ff6a usr.bin/make/make.h
--- a/usr.bin/make/make.h       Wed Dec 29 05:01:35 2021 +0000
+++ b/usr.bin/make/make.h       Wed Dec 29 05:05:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.283 2021/12/29 05:01:35 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.284 2021/12/29 05:05:21 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -518,11 +518,11 @@
 /*
  * Values returned by Cond_EvalLine and Cond_EvalCondition.
  */
-typedef enum CondEvalResult {
+typedef enum CondResult {
        CR_TRUE,                /* Parse the next lines */
        CR_FALSE,               /* Skip the next lines */
        CR_ERROR                /* Unknown directive or parse error */
-} CondEvalResult, CondResult;
+} CondResult;
 
 /* Names of the variables that are "local" to a specific target. */
 #define TARGET "@"             /* Target of dependency */
diff -r ead8f0dee616 -r 6af41190ff6a usr.bin/make/nonints.h
--- a/usr.bin/make/nonints.h    Wed Dec 29 05:01:35 2021 +0000
+++ b/usr.bin/make/nonints.h    Wed Dec 29 05:05:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nonints.h,v 1.224 2021/12/29 04:50:56 rillig Exp $     */
+/*     $NetBSD: nonints.h,v 1.225 2021/12/29 05:05:21 rillig Exp $     */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -91,8 +91,8 @@
 void Compat_Make(GNode *, GNode *);
 
 /* cond.c */
-CondEvalResult Cond_EvalCondition(const char *) MAKE_ATTR_USE;
-CondEvalResult Cond_EvalLine(const char *) MAKE_ATTR_USE;
+CondResult Cond_EvalCondition(const char *) MAKE_ATTR_USE;
+CondResult Cond_EvalLine(const char *) MAKE_ATTR_USE;
 void Cond_restore_depth(unsigned int);
 unsigned int Cond_save_depth(void) MAKE_ATTR_USE;
 
diff -r ead8f0dee616 -r 6af41190ff6a usr.bin/make/var.c
--- a/usr.bin/make/var.c        Wed Dec 29 05:01:35 2021 +0000
+++ b/usr.bin/make/var.c        Wed Dec 29 05:05:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.990 2021/12/29 04:50:56 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.991 2021/12/29 05:05:21 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -140,7 +140,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.990 2021/12/29 04:50:56 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.991 2021/12/29 05:05:21 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3454,7 +3454,7 @@
        VarEvalMode then_emode = VARE_PARSE_ONLY;
        VarEvalMode else_emode = VARE_PARSE_ONLY;
 
-       CondEvalResult cond_rc = CR_TRUE;       /* just not CR_ERROR */
+       CondResult cond_rc = CR_TRUE;   /* just not CR_ERROR */
        if (Expr_ShouldEval(expr)) {
                cond_rc = Cond_EvalCondition(expr->name);
                if (cond_rc == CR_TRUE)



Home | Main Index | Thread Index | Old Index