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 and constify SkipExtraTargets



details:   https://anonhg.NetBSD.org/src/rev/43145e2ff74e
branches:  trunk
changeset: 1029265:43145e2ff74e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Dec 28 19:43:42 2021 +0000

description:
make: rename and constify SkipExtraTargets

No binary change.

diffstat:

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

diffs (49 lines):

diff -r 0d78b5795cc8 -r 43145e2ff74e usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Tue Dec 28 19:41:01 2021 +0000
+++ b/usr.bin/make/parse.c      Tue Dec 28 19:43:42 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.602 2021/12/28 19:41:01 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.603 2021/12/28 19:43:42 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.602 2021/12/28 19:41:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.603 2021/12/28 19:43:42 rillig Exp $");
 
 /* types and constants */
 
@@ -1190,10 +1190,10 @@
 }
 
 static void
-ParseDependencyTargetExtraWarn(char **pp, const char *lstart)
+SkipExtraTargets(char **pp, const char *lstart)
 {
        bool warning = false;
-       char *cp = *pp;
+       const char *cp = *pp;
 
        while (*cp != '\0') {
                if (!IsEscaped(lstart, cp) && (*cp == '!' || *cp == ':'))
@@ -1205,7 +1205,7 @@
        if (warning)
                Parse_Error(PARSE_WARNING, "Extra target ignored");
 
-       *pp = cp;
+       *pp += cp - *pp;
 }
 
 static void
@@ -1427,7 +1427,7 @@
                        return false;
 
                if (*inout_special != SP_NOT && *inout_special != SP_PATH)
-                       ParseDependencyTargetExtraWarn(&cp, lstart);
+                       SkipExtraTargets(&cp, lstart);
                else
                        pp_skip_whitespace(&cp);
 



Home | Main Index | Thread Index | Old Index