Module Name: src Committed By: rillig Date: Mon Jun 21 08:40:44 UTC 2021
Modified Files: src/usr.bin/make: var.c Log Message: make: fix documentation for ParseModifierPart To generate a diff of this commit: cvs rdiff -u -r1.933 -r1.934 src/usr.bin/make/var.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/make/var.c diff -u src/usr.bin/make/var.c:1.933 src/usr.bin/make/var.c:1.934 --- src/usr.bin/make/var.c:1.933 Mon Jun 21 04:24:17 2021 +++ src/usr.bin/make/var.c Mon Jun 21 08:40:44 2021 @@ -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(