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: use consistent variable names in parser



details:   https://anonhg.NetBSD.org/src/rev/047327a79d29
branches:  trunk
changeset: 371240:047327a79d29
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 01 09:25:06 2022 +0000

description:
make: use consistent variable names in parser

No functional change.

diffstat:

 usr.bin/make/parse.c |  36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diffs (89 lines):

diff -r 7076fc4a04a3 -r 047327a79d29 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sat Oct 01 09:23:04 2022 +0000
+++ b/usr.bin/make/parse.c      Sat Oct 01 09:25:06 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.688 2022/09/27 17:46:58 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.689 2022/10/01 09:25:06 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -105,7 +105,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.688 2022/09/27 17:46:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.689 2022/10/01 09:25:06 rillig Exp $");
 
 /*
  * A file being read.
@@ -1335,26 +1335,26 @@
 }
 
 static bool
-ParseDependencyTargets(char **inout_cp,
+ParseDependencyTargets(char **pp,
                       const char *lstart,
                       ParseSpecial *inout_special,
                       GNodeType *inout_targetAttr,
                       SearchPathList **inout_paths)
 {
-       char *cp = *inout_cp;
+       char *p = *pp;
 
        for (;;) {
-               char *tgt = cp;
-
-               ParseDependencyTargetWord(&cp, lstart);
+               char *tgt = p;
+
+               ParseDependencyTargetWord(&p, lstart);
 
                /*
                 * If the word is followed by a left parenthesis, it's the
                 * name of one or more files inside an archive.
                 */
-               if (!IsEscaped(lstart, cp) && *cp == '(') {
-                       cp = tgt;
-                       if (!Arch_ParseArchive(&cp, targets, SCOPE_CMDLINE)) {
+               if (!IsEscaped(lstart, p) && *p == '(') {
+                       p = tgt;
+                       if (!Arch_ParseArchive(&p, targets, SCOPE_CMDLINE)) {
                                Parse_Error(PARSE_FATAL,
                                    "Error in archive specification: \"%s\"",
                                    tgt);
@@ -1363,27 +1363,27 @@
                        continue;
                }
 
-               if (*cp == '\0') {
+               if (*p == '\0') {
                        InvalidLineType(lstart);
                        return false;
                }
 
-               if (!ApplyDependencyTarget(tgt, cp, inout_special,
+               if (!ApplyDependencyTarget(tgt, p, inout_special,
                    inout_targetAttr, inout_paths))
                        return false;
 
                if (*inout_special != SP_NOT && *inout_special != SP_PATH)
-                       SkipExtraTargets(&cp, lstart);
+                       SkipExtraTargets(&p, lstart);
                else
-                       pp_skip_whitespace(&cp);
-
-               if (*cp == '\0')
+                       pp_skip_whitespace(&p);
+
+               if (*p == '\0')
                        break;
-               if ((*cp == '!' || *cp == ':') && !IsEscaped(lstart, cp))
+               if ((*p == '!' || *p == ':') && !IsEscaped(lstart, p))
                        break;
        }
 
-       *inout_cp = cp;
+       *pp = p;
        return true;
 }
 



Home | Main Index | Thread Index | Old Index