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: fix documentation for ParseModifierPart



details:   https://anonhg.NetBSD.org/src/rev/46bb4747980c
branches:  trunk
changeset: 379830:46bb4747980c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Jun 21 08:40:44 2021 +0000

description:
make: fix documentation for ParseModifierPart

diffstat:

 usr.bin/make/var.c |  17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diffs (52 lines):

diff -r d0d5b25006b1 -r 46bb4747980c usr.bin/make/var.c
--- a/usr.bin/make/var.c        Mon Jun 21 08:28:37 2021 +0000
+++ b/usr.bin/make/var.c        Mon Jun 21 08:40:44 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: var.c,v 1.933 2021/06/21 04:24:17 sjg Exp $    */
+/*     $NetBSD: var.c,v 1.934 2021/06/21 08:40: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.933 2021/06/21 04:24:17 sjg Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.934 2021/06/21 08:40:44 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -2135,7 +2135,7 @@ IsEscapedModifierPart(const char *p, cha
        return p[1] == '&' && subst != NULL;
 }
 
-/* See ParseModifierPart */
+/* See ParseModifierPart for the documentation. */
 static VarParseResult
 ParseModifierPartSubst(
     const char **pp,
@@ -2143,8 +2143,8 @@ ParseModifierPartSubst(
     VarEvalMode emode,
     ModChain *ch,
     LazyBuf *part,
-    /* For the first part of the :S modifier, sets the VARP_ANCHOR_END flag
-     * if the last character of the pattern is a $. */
+    /* For the first part of the modifier ':S', set anchorEnd if the last
+     * character of the pattern is a $. */
     PatternFlags *out_pflags,
     /* For the second part of the :S modifier, allow ampersands to be
      * escaped and replace unescaped ampersands with subst->lhs. */
@@ -2265,10 +2265,9 @@ ParseModifierPartSubst(
  * including the next unescaped delimiter.  The delimiter, as well as the
  * backslash or the dollar, can be escaped with a backslash.
  *
- * Return the parsed (and possibly expanded) string, or NULL if no delimiter
- * was found.  On successful return, the parsing position pp points right
- * after the delimiter.  The delimiter is not included in the returned
- * value though.
+ * Return VPR_OK if parsing succeeded, together with the parsed (and possibly
+ * expanded) part.  In that case, pp points right after the delimiter.  The
+ * delimiter is not included in the part though.
  */
 static VarParseResult
 ParseModifierPart(



Home | Main Index | Thread Index | Old Index