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 ParseEmptyArg



details:   https://anonhg.NetBSD.org/src/rev/c2c5d5edf5d2
branches:  trunk
changeset: 945930:c2c5d5edf5d2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Nov 10 08:02:35 2020 +0000

description:
make(1): document ParseEmptyArg

diffstat:

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

diffs (35 lines):

diff -r a1226ae6058b -r c2c5d5edf5d2 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Tue Nov 10 07:51:19 2020 +0000
+++ b/usr.bin/make/cond.c       Tue Nov 10 08:02:35 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.199 2020/11/10 07:40:30 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.200 2020/11/10 08:02:35 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -93,7 +93,7 @@
 #include "dir.h"
 
 /*     "@(#)cond.c     8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: cond.c,v 1.199 2020/11/10 07:40:30 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.200 2020/11/10 08:02:35 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -677,6 +677,8 @@
     return t;
 }
 
+/* The argument to empty() is a variable name, optionally followed by
+ * variable modifiers. */
 static size_t
 ParseEmptyArg(const char **pp, Boolean doEval,
              const char *func MAKE_ATTR_UNUSED, char **out_arg)
@@ -755,6 +757,7 @@
            *out_token = arglen == 0 ? TOK_FALSE : TOK_ERROR;
            return TRUE;
        }
+
        /* Evaluate the argument using the required function. */
        *out_token = ToToken(!doEval || fn->fn_eval(arglen, arg));
        free(arg);



Home | Main Index | Thread Index | Old Index