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(1): document wrong debug output in evaluat...



details:   https://anonhg.NetBSD.org/src/rev/8dd3b580c1a2
branches:  trunk
changeset: 958838:8dd3b580c1a2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Jan 21 23:06:06 2021 +0000

description:
make(1): document wrong debug output in evaluation of conditionals

diffstat:

 usr.bin/make/cond.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r a6dfc4662514 -r 8dd3b580c1a2 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Thu Jan 21 23:03:41 2021 +0000
+++ b/usr.bin/make/cond.c       Thu Jan 21 23:06:06 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.249 2021/01/21 22:54:13 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.250 2021/01/21 23:06:06 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.249 2021/01/21 22:54:13 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.250 2021/01/21 23:06:06 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -578,6 +578,7 @@
 static Token
 EvalCompareNum(double lhs, const char *op, double rhs)
 {
+       /* FIXME: %2.s is cheated and produces wrong output. */
        DEBUG3(COND, "lhs = %f, rhs = %f, op = %.2s\n", lhs, rhs, op);
 
        switch (op[0]) {
@@ -614,6 +615,7 @@
                return TOK_ERROR;
        }
 
+       /* FIXME: %2.s is cheated and produces wrong output. */
        DEBUG3(COND, "lhs = \"%s\", rhs = \"%s\", op = %.2s\n", lhs, rhs, op);
        return ToToken((*op == '=') == (strcmp(lhs, rhs) == 0));
 }



Home | Main Index | Thread Index | Old Index