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 types CondResult and CondEvalResult



details:   https://anonhg.NetBSD.org/src/rev/7e1019d7e74b
branches:  trunk
changeset: 1029270:7e1019d7e74b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Dec 29 04:41:38 2021 +0000

description:
make: merge types CondResult and CondEvalResult

No functional change.

diffstat:

 usr.bin/make/cond.c |  8 ++------
 usr.bin/make/make.h |  9 ++++++---
 2 files changed, 8 insertions(+), 9 deletions(-)

diffs (52 lines):

diff -r da708c9c2e75 -r 7e1019d7e74b usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Tue Dec 28 22:59:56 2021 +0000
+++ b/usr.bin/make/cond.c       Wed Dec 29 04:41:38 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.308 2021/12/27 21:21:17 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.309 2021/12/29 04:41:38 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.308 2021/12/27 21:21:17 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.309 2021/12/29 04:41:38 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -131,10 +131,6 @@
        TOK_LPAREN, TOK_RPAREN, TOK_EOF, TOK_NONE, TOK_ERROR
 } Token;
 
-typedef enum CondResult {
-       CR_FALSE, CR_TRUE, CR_ERROR
-} CondResult;
-
 typedef enum ComparisonOp {
        LT, LE, GT, GE, EQ, NE
 } ComparisonOp;
diff -r da708c9c2e75 -r 7e1019d7e74b usr.bin/make/make.h
--- a/usr.bin/make/make.h       Tue Dec 28 22:59:56 2021 +0000
+++ b/usr.bin/make/make.h       Wed Dec 29 04:41:38 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: make.h,v 1.281 2021/12/28 14:22:51 rillig Exp $        */
+/*     $NetBSD: make.h,v 1.282 2021/12/29 04:41:38 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -521,8 +521,11 @@
 typedef enum CondEvalResult {
        COND_PARSE,             /* Parse the next lines */
        COND_SKIP,              /* Skip the next lines */
-       COND_INVALID            /* Not a conditional statement */
-} CondEvalResult;
+       COND_INVALID,           /* Not a conditional statement */
+       CR_TRUE = COND_PARSE,
+       CR_FALSE = COND_SKIP,
+       CR_ERROR = COND_INVALID
+} CondEvalResult, CondResult;
 
 /* Names of the variables that are "local" to a specific target. */
 #define TARGET "@"             /* Target of dependency */



Home | Main Index | Thread Index | Old Index