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: rename function parameters to match boole...



details:   https://anonhg.NetBSD.org/src/rev/7058bde9b68d
branches:  trunk
changeset: 1020206:7058bde9b68d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Apr 03 14:31:44 2021 +0000

description:
make: rename function parameters to match boolean constants

No functional change.

diffstat:

 usr.bin/make/parse.c |  10 +++---
 usr.bin/make/var.c   |  70 ++++++++++++++++++++++++++--------------------------
 2 files changed, 40 insertions(+), 40 deletions(-)

diffs (198 lines):

diff -r fce27cf17f11 -r 7058bde9b68d usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Apr 03 14:10:56 2021 +0000
+++ b/usr.bin/make/parse.c      Sat Apr 03 14:31:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.553 2021/04/03 11:08:40 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.554 2021/04/03 14:31:44 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.553 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.554 2021/04/03 14:31:44 rillig Exp $");
 
 /* types and constants */
 
@@ -1936,7 +1936,7 @@
 /*
  * Perform a variable assignment.
  *
- * The actual value of the variable is returned in *out_TRUE_avalue.
+ * The actual value of the variable is returned in *out_true_avalue.
  * Especially for VAR_SUBST and VAR_SHELL this can differ from the literal
  * value.
  *
@@ -1946,7 +1946,7 @@
  */
 static bool
 VarAssign_Eval(const char *name, VarAssignOp op, const char *uvalue,
-              GNode *scope, FStr *out_TRUE_avalue)
+              GNode *scope, FStr *out_true_avalue)
 {
        FStr avalue = FStr_InitRefer(uvalue);
 
@@ -1964,7 +1964,7 @@
                Var_SetExpand(scope, name, uvalue);
        }
 
-       *out_TRUE_avalue = avalue;
+       *out_true_avalue = avalue;
        return true;
 }
 
diff -r fce27cf17f11 -r 7058bde9b68d usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sat Apr 03 14:10:56 2021 +0000
+++ b/usr.bin/make/var.c        Sat Apr 03 14:31:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.895 2021/04/03 11:08:40 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.896 2021/04/03 14:31:44 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.895 2021/04/03 11:08:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.896 2021/04/03 14:31:44 rillig Exp $");
 
 typedef enum VarFlags {
        VFL_NONE        = 0,
@@ -4051,8 +4051,8 @@
 static bool
 ParseVarnameShort(char varname, const char **pp, GNode *scope,
                  VarEvalFlags eflags,
-                 VarParseResult *out_FALSE_res, const char **out_FALSE_val,
-                 Var **out_TRUE_var)
+                 VarParseResult *out_false_res, const char **out_false_val,
+                 Var **out_true_var)
 {
        char name[2];
        Var *v;
@@ -4061,8 +4061,8 @@
        vpr = ValidShortVarname(varname, *pp);
        if (vpr != VPR_OK) {
                (*pp)++;
-               *out_FALSE_res = vpr;
-               *out_FALSE_val = var_Error;
+               *out_false_res = vpr;
+               *out_false_val = var_Error;
                return false;
        }
 
@@ -4080,8 +4080,8 @@
                if (opts.strict && val == var_Error) {
                        Parse_Error(PARSE_FATAL,
                            "Variable \"%s\" is undefined", name);
-                       *out_FALSE_res = VPR_ERR;
-                       *out_FALSE_val = val;
+                       *out_false_res = VPR_ERR;
+                       *out_false_val = val;
                        return false;
                }
 
@@ -4095,12 +4095,12 @@
                 * If undefined expressions are allowed, this should rather
                 * be VPR_UNDEF instead of VPR_OK.
                 */
-               *out_FALSE_res = eflags.undefErr ? VPR_UNDEF : VPR_OK;
-               *out_FALSE_val = val;
+               *out_false_res = eflags.undefErr ? VPR_UNDEF : VPR_OK;
+               *out_false_val = val;
                return false;
        }
 
-       *out_TRUE_var = v;
+       *out_true_var = v;
        return true;
 }
 
@@ -4178,17 +4178,17 @@
        GNode *scope,
        VarEvalFlags eflags,
 
-       const char **out_FALSE_pp,
-       VarParseResult *out_FALSE_res,
-       FStr *out_FALSE_val,
-
-       char *out_TRUE_endc,
-       const char **out_TRUE_p,
-       Var **out_TRUE_v,
-       bool *out_TRUE_haveModifier,
-       const char **out_TRUE_extraModifiers,
-       bool *out_TRUE_dynamic,
-       ExprDefined *out_TRUE_exprDefined
+       const char **out_false_pp,
+       VarParseResult *out_false_res,
+       FStr *out_false_val,
+
+       char *out_true_endc,
+       const char **out_true_p,
+       Var **out_true_v,
+       bool *out_true_haveModifier,
+       const char **out_true_extraModifiers,
+       bool *out_true_dynamic,
+       ExprDefined *out_true_exprDefined
 )
 {
        size_t namelen;
@@ -4210,9 +4210,9 @@
        } else {
                Parse_Error(PARSE_FATAL, "Unclosed variable \"%s\"", varname);
                free(varname);
-               *out_FALSE_pp = p;
-               *out_FALSE_val = FStr_InitRefer(var_Error);
-               *out_FALSE_res = VPR_ERR;
+               *out_false_pp = p;
+               *out_false_val = FStr_InitRefer(var_Error);
+               *out_false_res = VPR_ERR;
                return false;
        }
 
@@ -4223,7 +4223,7 @@
 
        if (v == NULL) {
                v = FindLocalLegacyVar(varname, namelen, scope,
-                   out_TRUE_extraModifiers);
+                   out_true_extraModifiers);
        }
 
        if (v == NULL) {
@@ -4236,9 +4236,9 @@
 
                if (!haveModifier) {
                        p++;    /* skip endc */
-                       *out_FALSE_pp = p;
-                       *out_FALSE_res = EvalUndefined(dynamic, start, p,
-                           varname, eflags, out_FALSE_val);
+                       *out_false_pp = p;
+                       *out_false_res = EvalUndefined(dynamic, start, p,
+                           varname, eflags, out_false_val);
                        return false;
                }
 
@@ -4257,15 +4257,15 @@
                 * instead of the actually computed value.
                 */
                v = VarNew(FStr_InitOwn(varname), "", VFL_NONE);
-               *out_TRUE_exprDefined = DEF_UNDEF;
+               *out_true_exprDefined = DEF_UNDEF;
        } else
                free(varname);
 
-       *out_TRUE_endc = endc;
-       *out_TRUE_p = p;
-       *out_TRUE_v = v;
-       *out_TRUE_haveModifier = haveModifier;
-       *out_TRUE_dynamic = dynamic;
+       *out_true_endc = endc;
+       *out_true_p = p;
+       *out_true_v = v;
+       *out_true_haveModifier = haveModifier;
+       *out_true_dynamic = dynamic;
        return true;
 }
 



Home | Main Index | Thread Index | Old Index