Module Name: src Committed By: rillig Date: Wed Dec 29 04:41:38 UTC 2021
Modified Files: src/usr.bin/make: cond.c make.h Log Message: make: merge types CondResult and CondEvalResult No functional change. To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309 src/usr.bin/make/cond.c cvs rdiff -u -r1.281 -r1.282 src/usr.bin/make/make.h 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/cond.c diff -u src/usr.bin/make/cond.c:1.308 src/usr.bin/make/cond.c:1.309 --- src/usr.bin/make/cond.c:1.308 Mon Dec 27 21:21:17 2021 +++ src/usr.bin/make/cond.c Wed Dec 29 04:41:38 2021 @@ -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 @@ typedef enum Token { 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; Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.281 src/usr.bin/make/make.h:1.282 --- src/usr.bin/make/make.h:1.281 Tue Dec 28 14:22:51 2021 +++ src/usr.bin/make/make.h Wed Dec 29 04:41:38 2021 @@ -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 ParseErrorLevel { 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 */