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): use more descriptive variable name in ...
details: https://anonhg.NetBSD.org/src/rev/7567c71e432f
branches: trunk
changeset: 937467:7567c71e432f
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Aug 20 07:09:06 2020 +0000
description:
make(1): use more descriptive variable name in ModifyWords
diffstat:
usr.bin/make/var.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (72 lines):
diff -r a1b90e3362e1 -r 7567c71e432f usr.bin/make/var.c
--- a/usr.bin/make/var.c Thu Aug 20 07:01:39 2020 +0000
+++ b/usr.bin/make/var.c Thu Aug 20 07:09:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.452 2020/08/20 07:01:39 rillig Exp $ */
+/* $NetBSD: var.c,v 1.453 2020/08/20 07:09:06 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: var.c,v 1.452 2020/08/20 07:01:39 rillig Exp $";
+static char rcsid[] = "$NetBSD: var.c,v 1.453 2020/08/20 07:09:06 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94";
#else
-__RCSID("$NetBSD: var.c,v 1.452 2020/08/20 07:01:39 rillig Exp $");
+__RCSID("$NetBSD: var.c,v 1.453 2020/08/20 07:09:06 rillig Exp $");
#endif
#endif /* not lint */
#endif
@@ -1031,7 +1031,7 @@
typedef struct {
Buffer buf;
Boolean needSep;
- char sep;
+ char sep; /* usually ' ', but see the :ts modifier */
} SepBuf;
static void
@@ -1554,15 +1554,15 @@
* Input:
* str String whose words should be modified
* modifyWord Function that modifies a single word
- * data Custom data for modifyWord
+ * modifyWord_args Custom arguments for modifyWord
*
* Results:
* A string of all the words modified appropriately.
*-----------------------------------------------------------------------
*/
static char *
-ModifyWords(GNode *ctx, char sep, Boolean oneBigWord,
- const char *str, ModifyWordsCallback modifyWord, void *data)
+ModifyWords(GNode *ctx, char sep, Boolean oneBigWord, const char *str,
+ ModifyWordsCallback modifyWord, void *modifyWord_args)
{
SepBuf result;
char **av; /* word list */
@@ -1572,7 +1572,7 @@
if (oneBigWord) {
SepBuf_Init(&result, sep);
- modifyWord(str, &result, data);
+ modifyWord(str, &result, modifyWord_args);
return SepBuf_Destroy(&result, FALSE);
}
@@ -1583,7 +1583,7 @@
VAR_DEBUG("ModifyWords: split \"%s\" into %d words\n", str, ac);
for (i = 0; i < ac; i++) {
- modifyWord(av[i], &result, data);
+ modifyWord(av[i], &result, modifyWord_args);
if (result.buf.count > 0)
SepBuf_Sep(&result);
}
Home |
Main Index |
Thread Index |
Old Index