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): rename rval to mods in ApplyModifiersI...



details:   https://anonhg.NetBSD.org/src/rev/04e702524838
branches:  trunk
changeset: 956605:04e702524838
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Nov 02 16:48:49 2020 +0000

description:
make(1): rename rval to mods in ApplyModifiersIndirect

diffstat:

 usr.bin/make/var.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (79 lines):

diff -r bed26a9ffa2f -r 04e702524838 usr.bin/make/var.c
--- a/usr.bin/make/var.c        Mon Nov 02 16:38:47 2020 +0000
+++ b/usr.bin/make/var.c        Mon Nov 02 16:48:49 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.642 2020/11/02 16:38:47 rillig Exp $ */
+/*     $NetBSD: var.c,v 1.643 2020/11/02 16:48:49 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -130,7 +130,7 @@
 #include "metachar.h"
 
 /*     "@(#)var.c      8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.642 2020/11/02 16:38:47 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.643 2020/11/02 16:48:49 rillig Exp $");
 
 #define VAR_DEBUG1(fmt, arg1) DEBUG1(VAR, fmt, arg1)
 #define VAR_DEBUG2(fmt, arg1, arg2) DEBUG2(VAR, fmt, arg1, arg2)
@@ -3273,10 +3273,10 @@
 ) {
     const char *p = *inout_p;
     const char *nested_p = p;
-    void *rval_freeIt;
-    const char *rval;
-
-    (void)Var_Parse(&nested_p, st->ctxt, st->eflags, &rval, &rval_freeIt);
+    const char *mods;
+    void *mods_freeIt;
+
+    (void)Var_Parse(&nested_p, st->ctxt, st->eflags, &mods, &mods_freeIt);
     /* TODO: handle errors */
 
     /*
@@ -3284,14 +3284,14 @@
      * interested.  This means the expression ${VAR:${M_1}${M_2}}
      * is not accepted, but ${VAR:${M_1}:${M_2}} is.
      */
-    if (rval[0] != '\0' &&
+    if (mods[0] != '\0' &&
        *nested_p != '\0' && *nested_p != ':' && *nested_p != st->endc) {
        if (DEBUG(LINT))
            Parse_Error(PARSE_FATAL,
                        "Missing delimiter ':' after indirect modifier \"%.*s\"",
                        (int)(nested_p - p), p);
 
-       free(rval_freeIt);
+       free(mods_freeIt);
        /* XXX: apply_mods doesn't sound like "not interested". */
        /* XXX: Why is the indirect modifier parsed again by
         * apply_mods?  If any, p should be advanced to nested_p. */
@@ -3299,23 +3299,23 @@
     }
 
     VAR_DEBUG3("Indirect modifier \"%s\" from \"%.*s\"\n",
-              rval, (int)(size_t)(nested_p - p), p);
+              mods, (int)(size_t)(nested_p - p), p);
 
     p = nested_p;
 
-    if (rval[0] != '\0') {
-       const char *rval_pp = rval;
+    if (mods[0] != '\0') {
+       const char *rval_pp = mods;
        st->val = ApplyModifiers(&rval_pp, st->val, '\0', '\0', st->v,
                                &st->exprFlags, st->ctxt, st->eflags, out_freeIt);
        if (st->val == var_Error
            || (st->val == varUndefined && !(st->eflags & VARE_UNDEFERR))
            || *rval_pp != '\0') {
-           free(rval_freeIt);
+           free(mods_freeIt);
            *inout_p = p;
            return AMIR_OUT;    /* error already reported */
        }
     }
-    free(rval_freeIt);
+    free(mods_freeIt);
 
     if (*p == ':')
        p++;



Home | Main Index | Thread Index | Old Index