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): clean up parameter names for SuffScanT...
details: https://anonhg.NetBSD.org/src/rev/2ff90310b74d
branches: trunk
changeset: 957160:2ff90310b74d
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Nov 21 08:01:20 2020 +0000
description:
make(1): clean up parameter names for SuffScanTargets
The prefix "gs" came from a time when SuffScanTargets was called via
Lst_ForEach, passing it a struct GNodeSuff. The "gs" had just been the
abbreviation for "GNode + Suff", which was already non-expressive. On
top of that, the struct had a third field "r", also with an unclear name,
which was not even mentioned in the name of the struct.
For now, just remove the needless prefix since it has absolutely no
meaning anymore. Maybe it will become clear what the "r" was supposed to
mean, it could be some kind of "result".
diffstat:
usr.bin/make/suff.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (49 lines):
diff -r b6db8b2be50f -r 2ff90310b74d usr.bin/make/suff.c
--- a/usr.bin/make/suff.c Sat Nov 21 00:27:52 2020 +0000
+++ b/usr.bin/make/suff.c Sat Nov 21 08:01:20 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: suff.c,v 1.250 2020/11/19 21:27:29 rillig Exp $ */
+/* $NetBSD: suff.c,v 1.251 2020/11/21 08:01:20 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -114,7 +114,7 @@
#include "dir.h"
/* "@(#)suff.c 8.4 (Berkeley) 3/21/94" */
-MAKE_RCSID("$NetBSD: suff.c,v 1.250 2020/11/19 21:27:29 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.251 2020/11/21 08:01:20 rillig Exp $");
#define SUFF_DEBUG0(text) DEBUG0(SUFF, text)
#define SUFF_DEBUG1(fmt, arg1) DEBUG1(SUFF, fmt, arg1)
@@ -627,12 +627,12 @@
* TRUE iff a new main target has been selected.
*/
static Boolean
-SuffScanTargets(GNode *target, GNode **inout_main, Suff *gs_s, Boolean *gs_r)
+SuffScanTargets(GNode *target, GNode **inout_main, Suff *suff, Boolean *r)
{
Suff *srcSuff, *targSuff;
char *ptr;
- if (*inout_main == NULL && *gs_r && !(target->type & OP_NOTARGET)) {
+ if (*inout_main == NULL && *r && !(target->type & OP_NOTARGET)) {
*inout_main = target;
Targ_SetMain(target);
return TRUE;
@@ -641,13 +641,13 @@
if (target->type == OP_TRANSFORM)
return FALSE;
- if ((ptr = strstr(target->name, gs_s->name)) == NULL ||
+ if ((ptr = strstr(target->name, suff->name)) == NULL ||
ptr == target->name)
return FALSE;
if (SuffParseTransform(target->name, &srcSuff, &targSuff)) {
if (*inout_main == target) {
- *gs_r = TRUE;
+ *r = TRUE;
*inout_main = NULL;
Targ_SetMain(NULL);
}
Home |
Main Index |
Thread Index |
Old Index