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): use consistent parameter order in varn...



details:   https://anonhg.NetBSD.org/src/rev/9de364dab837
branches:  trunk
changeset: 945505:9de364dab837
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 31 14:47:32 2020 +0000

description:
make(1): use consistent parameter order in varname parsing functions

diffstat:

 usr.bin/make/var.c |  53 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 28 insertions(+), 25 deletions(-)

diffs (88 lines):

diff -r e10f6fc31645 -r 9de364dab837 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Sat Oct 31 14:40:34 2020 +0000
+++ b/usr.bin/make/var.c        Sat Oct 31 14:47:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.623 2020/10/31 14:40:34 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.624 2020/10/31 14:47:32 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -129,7 +129,7 @@
 #include    "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.623 2020/10/31 14:40:34 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.624 2020/10/31 14:47:32 rillig Exp $");
 
 #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
 #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -3465,12 +3465,15 @@
 /* Parse a single-character variable name such as $V or $@.
  * Return whether to continue parsing. */
 static Boolean
-ParseVarnameShort(char const startc, const char **const pp, GNode *const ctxt,
-                 VarEvalFlags const eflags,
-                 const char **const out_FALSE_val,
-                 VarParseResult *const out_FALSE_res,
-                 Var **out_TRUE_var)
-{
+ParseVarnameShort(
+       char startc,
+       const char **pp,
+       GNode *ctxt,
+       VarEvalFlags eflags,
+       VarParseResult *out_FALSE_res,
+       const char **out_FALSE_val,
+       Var **out_TRUE_var
+) {
     char name[2];
     Var *v;
 
@@ -3513,22 +3516,22 @@
  * Return whether to continue parsing. */
 static Boolean
 ParseVarnameLong(
-       const char **const pp,
-       char const startc,
-       GNode *const ctxt,
-       VarEvalFlags const eflags,
-
-       VarParseResult *const out_FALSE_res,
-       const char **const out_FALSE_val,
-       void **const out_FALSE_freePtr,
-
-       char *const out_TRUE_endc,
-       const char **const out_TRUE_p,
-       Var **const out_TRUE_v,
-       Boolean *const out_TRUE_haveModifier,
-       const char **const out_TRUE_extraModifiers,
-       Boolean *const out_TRUE_dynamic,
-       VarExprFlags *const out_TRUE_exprFlags
+       const char **pp,
+       char startc,
+       GNode *ctxt,
+       VarEvalFlags eflags,
+
+       VarParseResult *out_FALSE_res,
+       const char **out_FALSE_val,
+       void **out_FALSE_freePtr,
+
+       char *out_TRUE_endc,
+       const char **out_TRUE_p,
+       Var **out_TRUE_v,
+       Boolean *out_TRUE_haveModifier,
+       const char **out_TRUE_extraModifiers,
+       Boolean *out_TRUE_dynamic,
+       VarExprFlags *out_TRUE_exprFlags
 ) {
     size_t namelen;
     char *varname;
@@ -3729,7 +3732,7 @@
     startc = start[1];
     if (startc != '(' && startc != '{') {
        VarParseResult res;
-       if (!ParseVarnameShort(startc, pp, ctxt, eflags, out_val, &res, &v))
+       if (!ParseVarnameShort(startc, pp, ctxt, eflags, &res, out_val, &v))
            return res;
        haveModifier = FALSE;
        p = start + 1;



Home | Main Index | Thread Index | Old Index