make(1): rename Lst_Datum to LstNode_Datum

This commit is contained in:
rillig 2020-08-30 11:15:05 +00:00
parent 2d4a05ee59
commit eb0c83b502
10 changed files with 83 additions and 83 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: arch.c,v 1.106 2020/08/29 13:38:48 rillig Exp $ */
/* $NetBSD: arch.c,v 1.107 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: arch.c,v 1.106 2020/08/29 13:38:48 rillig Exp $";
static char rcsid[] = "$NetBSD: arch.c,v 1.107 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)arch.c 8.2 (Berkeley) 1/2/94";
#else
__RCSID("$NetBSD: arch.c,v 1.106 2020/08/29 13:38:48 rillig Exp $");
__RCSID("$NetBSD: arch.c,v 1.107 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -508,7 +508,7 @@ ArchStatMember(const char *archive, const char *member, Boolean hash)
ln = Lst_Find(archives, ArchFindArchive, archive);
if (ln != NULL) {
ar = Lst_Datum(ln);
ar = LstNode_Datum(ln);
he = Hash_FindEntry(&ar->members, member);
@ -1046,7 +1046,7 @@ Arch_MemMTime(GNode *gn)
Lst_Open(gn->parents);
while ((ln = Lst_Next(gn->parents)) != NULL) {
pgn = Lst_Datum(ln);
pgn = LstNode_Datum(ln);
if (pgn->type & OP_ARCHV) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: dir.c,v 1.125 2020/08/30 11:12:05 rillig Exp $ */
/* $NetBSD: dir.c,v 1.126 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -70,14 +70,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: dir.c,v 1.125 2020/08/30 11:12:05 rillig Exp $";
static char rcsid[] = "$NetBSD: dir.c,v 1.126 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94";
#else
__RCSID("$NetBSD: dir.c,v 1.125 2020/08/30 11:12:05 rillig Exp $");
__RCSID("$NetBSD: dir.c,v 1.126 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -462,7 +462,7 @@ Dir_SetPATH(void)
Lst_Open(dirSearchPath);
if ((ln = Lst_First(dirSearchPath)) != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (p == dotLast) {
hasLastDot = TRUE;
Var_Append(".PATH", dotLast->name, VAR_GLOBAL);
@ -477,7 +477,7 @@ Dir_SetPATH(void)
}
while ((ln = Lst_Next(dirSearchPath)) != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (p == dotLast)
continue;
if (p == dot && hasLastDot)
@ -753,7 +753,7 @@ DirExpandInt(const char *word, Lst path, Lst expansions)
Lst_Open(path);
while ((ln = Lst_Next(path)) != NULL) {
Path *p = Lst_Datum(ln);
Path *p = LstNode_Datum(ln);
DirMatchFiles(word, p, expansions);
}
Lst_Close(path);
@ -1094,7 +1094,7 @@ Dir_FindFile(const char *name, Lst path)
Lst_Open(path);
if ((ln = Lst_First(path)) != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (p == dotLast) {
hasLastDot = TRUE;
DIR_DEBUG0("[dot last]...");
@ -1128,7 +1128,7 @@ Dir_FindFile(const char *name, Lst path)
}
while ((ln = Lst_Next(path)) != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (p == dotLast)
continue;
if ((file = DirLookup(p, name, cp, hasSlash)) != NULL) {
@ -1186,7 +1186,7 @@ Dir_FindFile(const char *name, Lst path)
Lst_Open(path);
while ((ln = Lst_Next(path)) != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (p == dotLast)
continue;
if (p == dot) {
@ -1244,7 +1244,7 @@ Dir_FindFile(const char *name, Lst path)
Lst_Open(path);
while ((ln = Lst_Next(path)) != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (p == dotLast)
continue;
if ((file = DirLookupAbs(p, name, cp)) != NULL) {
@ -1299,7 +1299,7 @@ Dir_FindFile(const char *name, Lst path)
if (ln == NULL) {
return NULL;
} else {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
}
if (Hash_FindEntry(&p->files, cp) != NULL) {
@ -1523,7 +1523,7 @@ Dir_AddDir(Lst path, const char *name)
if (path != NULL && strcmp(name, ".DOTLAST") == 0) {
ln = Lst_Find(path, DirFindName, name);
if (ln != NULL)
return Lst_Datum(ln);
return LstNode_Datum(ln);
dotLast->refCount++;
Lst_Prepend(path, dotLast);
@ -1532,7 +1532,7 @@ Dir_AddDir(Lst path, const char *name)
if (path != NULL)
ln = Lst_Find(openDirectories, DirFindName, name);
if (ln != NULL) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (Lst_FindDatum(path, p) == NULL) {
p->refCount += 1;
Lst_Append(path, p);
@ -1621,7 +1621,7 @@ Dir_MakeFlags(const char *flag, Lst path)
if (path != NULL) {
Lst_Open(path);
while ((ln = Lst_Next(path)) != NULL) {
Path *p = Lst_Datum(ln);
Path *p = LstNode_Datum(ln);
Buf_AddStr(&buf, " ");
Buf_AddStr(&buf, flag);
Buf_AddStr(&buf, p->name);
@ -1720,7 +1720,7 @@ Dir_Concat(Lst path1, Lst path2)
Path *p;
for (ln = Lst_First(path2); ln != NULL; ln = LstNode_Next(ln)) {
p = Lst_Datum(ln);
p = LstNode_Datum(ln);
if (Lst_FindDatum(path1, p) == NULL) {
p->refCount += 1;
Lst_Append(path1, p);
@ -1749,7 +1749,7 @@ Dir_PrintDirectories(void)
Lst_Open(openDirectories);
while ((ln = Lst_Next(openDirectories)) != NULL) {
Path *p = Lst_Datum(ln);
Path *p = LstNode_Datum(ln);
fprintf(debug_file, "# %-20s %10d\t%4d\n", p->name, p->refCount,
p->hits);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: lst.c,v 1.57 2020/08/30 11:12:05 rillig Exp $ */
/* $NetBSD: lst.c,v 1.58 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -37,11 +37,11 @@
#include "make.h"
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: lst.c,v 1.57 2020/08/30 11:12:05 rillig Exp $";
static char rcsid[] = "$NetBSD: lst.c,v 1.58 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: lst.c,v 1.57 2020/08/30 11:12:05 rillig Exp $");
__RCSID("$NetBSD: lst.c,v 1.58 2020/08/30 11:15:05 rillig Exp $");
#endif /* not lint */
#endif
@ -355,7 +355,7 @@ LstNode_Prev(LstNode node)
/* Return the datum stored in the given node. */
void *
Lst_Datum(LstNode node)
LstNode_Datum(LstNode node)
{
assert(node != NULL);
return node->datum;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lst.h,v 1.58 2020/08/30 11:12:06 rillig Exp $ */
/* $NetBSD: lst.h,v 1.59 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@ -139,7 +139,7 @@ LstNode LstNode_Next(LstNode);
/* Return predecessor to given element */
LstNode LstNode_Prev(LstNode);
/* Get datum from LstNode */
void *Lst_Datum(LstNode);
void *LstNode_Datum(LstNode);
/*
* Functions for entire lists

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.329 2020/08/29 13:16:54 rillig Exp $ */
/* $NetBSD: main.c,v 1.330 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,7 +69,7 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: main.c,v 1.329 2020/08/29 13:16:54 rillig Exp $";
static char rcsid[] = "$NetBSD: main.c,v 1.330 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\
#if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: main.c,v 1.329 2020/08/29 13:16:54 rillig Exp $");
__RCSID("$NetBSD: main.c,v 1.330 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -874,7 +874,7 @@ doPrintVars(void)
expandVars = getBoolean(".MAKE.EXPAND_VARIABLES", FALSE);
for (ln = Lst_First(variables); ln != NULL; ln = LstNode_Next(ln)) {
char *var = Lst_Datum(ln);
char *var = LstNode_Datum(ln);
const char *value;
char *p1;
@ -1283,7 +1283,7 @@ main(int argc, char **argv)
LstNode ln;
for (ln = Lst_First(create); ln != NULL; ln = LstNode_Next(ln)) {
char *name = Lst_Datum(ln);
char *name = LstNode_Datum(ln);
Var_Append(".TARGETS", name, VAR_GLOBAL);
}
} else
@ -1338,7 +1338,7 @@ main(int argc, char **argv)
ln = Lst_Find(sysMkPath, ReadMakefileSucceeded, NULL);
if (ln == NULL)
Fatal("%s: cannot open %s.", progname,
(char *)Lst_Datum(Lst_First(sysMkPath)));
(char *)LstNode_Datum(Lst_First(sysMkPath)));
}
if (!Lst_IsEmpty(makefiles)) {
@ -1347,7 +1347,7 @@ main(int argc, char **argv)
ln = Lst_Find(makefiles, ReadMakefileFailed, NULL);
if (ln != NULL)
Fatal("%s: cannot open %s.", progname,
(char *)Lst_Datum(ln));
(char *)LstNode_Datum(ln));
} else {
p1 = Var_Subst("${" MAKEFILE_PREFERENCE "}",
VAR_CMD, VARE_WANTRES);

View File

@ -1,4 +1,4 @@
/* $NetBSD: make.c,v 1.131 2020/08/30 11:12:06 rillig Exp $ */
/* $NetBSD: make.c,v 1.132 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: make.c,v 1.131 2020/08/30 11:12:06 rillig Exp $";
static char rcsid[] = "$NetBSD: make.c,v 1.132 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: make.c,v 1.131 2020/08/30 11:12:06 rillig Exp $");
__RCSID("$NetBSD: make.c,v 1.132 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -486,7 +486,7 @@ Make_HandleUse(GNode *cgn, GNode *pgn)
Lst_Open(cgn->children);
while ((ln = Lst_Next(cgn->children)) != NULL) {
GNode *gn = Lst_Datum(ln);
GNode *gn = LstNode_Datum(ln);
/*
* Expand variables in the .USE node's name
@ -740,7 +740,7 @@ Make_Update(GNode *cgn)
/* Now mark all the parents as having one less unmade child */
Lst_Open(parents);
while ((ln = Lst_Next(parents)) != NULL) {
pgn = Lst_Datum(ln);
pgn = LstNode_Datum(ln);
if (DEBUG(MAKE))
fprintf(debug_file, "inspect parent %s%s: flags %x, "
"type %x, made %d, unmade %d ",
@ -843,7 +843,7 @@ Make_Update(GNode *cgn)
const char *cpref = Var_Value(PREFIX, cgn, &p1);
while ((ln = Lst_Next(cgn->iParents)) != NULL) {
pgn = Lst_Datum(ln);
pgn = LstNode_Datum(ln);
if (pgn->flags & REMAKE) {
Var_Set(IMPSRC, cname, pgn);
if (cpref != NULL)
@ -1454,7 +1454,7 @@ Make_ProcessWait(Lst targs)
owln = Lst_First(pgn->children);
Lst_Open(pgn->children);
for (; (ln = Lst_Next(pgn->children)) != NULL; ) {
cgn = Lst_Datum(ln);
cgn = LstNode_Datum(ln);
if (cgn->type & OP_WAIT) {
/* Make the .WAIT node depend on the previous children */
Lst_ForEachFrom(pgn->children, owln, add_wait_dep, cgn);

View File

@ -1,4 +1,4 @@
/* $NetBSD: meta.c,v 1.111 2020/08/29 13:16:54 rillig Exp $ */
/* $NetBSD: meta.c,v 1.112 2020/08/30 11:15:05 rillig Exp $ */
/*
* Implement 'meta' mode.
@ -1323,7 +1323,7 @@ meta_oodate(GNode *gn, Boolean oodate)
nln = Lst_FindFrom(missingFiles,
LstNode_Next(ln),
path_match, p);
tp = Lst_Datum(ln);
tp = LstNode_Datum(ln);
Lst_Remove(missingFiles, ln);
free(tp);
} while ((ln = nln) != NULL);
@ -1502,7 +1502,7 @@ meta_oodate(GNode *gn, Boolean oodate)
fprintf(debug_file, "%s: %d: there were more build commands in the meta data file than there are now...\n", fname, lineno);
oodate = TRUE;
} else {
char *cmd = Lst_Datum(ln);
char *cmd = LstNode_Datum(ln);
Boolean hasOODATE = FALSE;
if (strstr(cmd, "$?"))
@ -1579,7 +1579,7 @@ meta_oodate(GNode *gn, Boolean oodate)
if (!Lst_IsEmpty(missingFiles)) {
if (DEBUG(META))
fprintf(debug_file, "%s: missing files: %s...\n",
fname, (char *)Lst_Datum(Lst_First(missingFiles)));
fname, (char *)LstNode_Datum(Lst_First(missingFiles)));
oodate = TRUE;
}
if (!oodate && !have_filemon && filemonMissing) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: parse.c,v 1.273 2020/08/29 13:38:48 rillig Exp $ */
/* $NetBSD: parse.c,v 1.274 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: parse.c,v 1.273 2020/08/29 13:38:48 rillig Exp $";
static char rcsid[] = "$NetBSD: parse.c,v 1.274 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: parse.c,v 1.273 2020/08/29 13:38:48 rillig Exp $");
__RCSID("$NetBSD: parse.c,v 1.274 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -853,7 +853,7 @@ ParseLinkSrc(void *pgnp, void *cgnp)
GNode *cgn = (GNode *)cgnp;
if ((pgn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(pgn->cohorts))
pgn = Lst_Datum(Lst_Last(pgn->cohorts));
pgn = LstNode_Datum(Lst_Last(pgn->cohorts));
Lst_Append(pgn->children, cgn);
if (specType == Not)
Lst_Append(cgn->parents, pgn);
@ -2088,7 +2088,7 @@ ParseAddCmd(void *gnp, void *cmd)
/* Add to last (ie current) cohort for :: targets */
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts))
gn = Lst_Datum(Lst_Last(gn->cohorts));
gn = LstNode_Datum(Lst_Last(gn->cohorts));
/* if target already supplied, ignore commands */
if (!(gn->type & OP_HAS_COMMANDS)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: suff.c,v 1.137 2020/08/30 11:12:06 rillig Exp $ */
/* $NetBSD: suff.c,v 1.138 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: suff.c,v 1.137 2020/08/30 11:12:06 rillig Exp $";
static char rcsid[] = "$NetBSD: suff.c,v 1.138 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)suff.c 8.4 (Berkeley) 3/21/94";
#else
__RCSID("$NetBSD: suff.c,v 1.137 2020/08/30 11:12:06 rillig Exp $");
__RCSID("$NetBSD: suff.c,v 1.138 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -390,7 +390,7 @@ SuffInsert(Lst l, Suff *s)
Lst_Open(l);
while ((ln = Lst_Next(l)) != NULL) {
s2 = Lst_Datum(ln);
s2 = LstNode_Datum(ln);
if (s2->sNum >= s->sNum) {
break;
}
@ -516,7 +516,7 @@ SuffParseTransform(char *str, Suff **out_src, Suff **out_targ)
}
return FALSE;
}
src = Lst_Datum(srcLn);
src = LstNode_Datum(srcLn);
str2 = str + src->nameLen;
if (*str2 == '\0') {
single = src;
@ -525,7 +525,7 @@ SuffParseTransform(char *str, Suff **out_src, Suff **out_targ)
targLn = Lst_Find(sufflist, SuffSuffHasName, str2);
if (targLn != NULL) {
*out_src = src;
*out_targ = Lst_Datum(targLn);
*out_targ = LstNode_Datum(targLn);
return TRUE;
}
}
@ -577,7 +577,7 @@ Suff_AddTransform(char *line)
* free the commands themselves, because a given command can be
* attached to several different transformations.
*/
gn = Lst_Datum(ln);
gn = LstNode_Datum(ln);
Lst_Free(gn->commands);
Lst_Free(gn->children);
gn->commands = Lst_Init();
@ -620,7 +620,7 @@ Suff_EndTransform(void *gnp, void *dummy MAKE_ATTR_UNUSED)
GNode *gn = (GNode *)gnp;
if ((gn->type & OP_DOUBLEDEP) && !Lst_IsEmpty(gn->cohorts))
gn = Lst_Datum(Lst_Last(gn->cohorts));
gn = LstNode_Datum(Lst_Last(gn->cohorts));
if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
Lst_IsEmpty(gn->children))
{
@ -702,7 +702,7 @@ SuffRebuildGraph(void *transformp, void *sp)
* Found target. Link in and return, since it can't be anything
* else.
*/
s2 = Lst_Datum(ln);
s2 = LstNode_Datum(ln);
SuffInsert(s2->children, s);
SuffInsert(s->parents, s2);
return 0;
@ -729,7 +729,7 @@ SuffRebuildGraph(void *transformp, void *sp)
/*
* Found it -- establish the proper relationship
*/
s2 = Lst_Datum(ln);
s2 = LstNode_Datum(ln);
SuffInsert(s->children, s2);
SuffInsert(s2->parents, s);
}
@ -843,7 +843,7 @@ Suff_GetPath(char *sname)
if (ln == NULL) {
return NULL;
} else {
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
return s->searchPath;
}
}
@ -872,7 +872,7 @@ Suff_DoPaths(void)
Lst_Open(sufflist);
while ((ln = Lst_Next(sufflist)) != NULL) {
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
if (!Lst_IsEmpty(s->searchPath)) {
#ifdef INCLUDES
if (s->flags & SUFF_INCLUDE) {
@ -917,7 +917,7 @@ Suff_AddInclude(char *sname)
ln = Lst_Find(sufflist, SuffSuffHasName, sname);
if (ln != NULL) {
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
s->flags |= SUFF_INCLUDE;
}
}
@ -938,7 +938,7 @@ Suff_AddLib(const char *sname)
ln = Lst_Find(sufflist, SuffSuffHasName, sname);
if (ln != NULL) {
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
s->flags |= SUFF_LIBRARY;
}
}
@ -1045,7 +1045,7 @@ SuffRemoveSrc(Lst l)
#endif
while ((ln = Lst_Next(l)) != NULL) {
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
if (s->children == 0) {
free(s->file);
if (!s->parent)
@ -1171,7 +1171,7 @@ SuffFindCmds(Src *targ, Lst slst)
Lst_Close(t->children);
return NULL;
}
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
if (s->type & OP_OPTIONAL && Lst_IsEmpty(t->commands)) {
/*
@ -1205,7 +1205,7 @@ SuffFindCmds(Src *targ, Lst slst)
*
* XXX: Handle multi-stage transformations here, too.
*/
suff = Lst_Datum(ln);
suff = LstNode_Datum(ln);
/* XXX: Can targ->suff be NULL here? */
if (targ->suff != NULL &&
@ -1253,7 +1253,7 @@ SuffFindCmds(Src *targ, Lst slst)
static void
SuffExpandChildren(LstNode cln, GNode *pgn)
{
GNode *cgn = Lst_Datum(cln);
GNode *cgn = LstNode_Datum(cln);
GNode *gn; /* New source 8) */
char *cp; /* Expanded value */
@ -1401,7 +1401,7 @@ SuffExpandChildren(LstNode cln, GNode *pgn)
static void
SuffExpandWildcards(LstNode cln, GNode *pgn)
{
GNode *cgn = Lst_Datum(cln);
GNode *cgn = LstNode_Datum(cln);
GNode *gn; /* New source 8) */
char *cp; /* Expanded value */
Lst explist; /* List of expansions */
@ -1474,7 +1474,7 @@ Suff_FindPath(GNode* gn)
fprintf(debug_file, "Wildcard expanding \"%s\"...", gn->name);
}
if (ln != NULL)
suff = Lst_Datum(ln);
suff = LstNode_Datum(ln);
/* XXX: Here we can save the suffix so we don't have to do this again */
}
@ -1540,7 +1540,7 @@ SuffApplyTransform(GNode *tGn, GNode *sGn, Suff *t, Suff *s)
return FALSE;
}
gn = Lst_Datum(ln);
gn = LstNode_Datum(ln);
if (DEBUG(SUFF)) {
fprintf(debug_file, "\tapplying %s -> %s to \"%s\"\n", s->name, t->name, tGn->name);
@ -1691,11 +1691,11 @@ SuffFindArchiveDeps(GNode *gn, Lst slst)
/*
* Got one -- apply it
*/
if (!SuffApplyTransform(gn, mem, (Suff *)Lst_Datum(ln), ms) &&
if (!SuffApplyTransform(gn, mem, (Suff *)LstNode_Datum(ln), ms) &&
DEBUG(SUFF))
{
fprintf(debug_file, "\tNo transformation from %s -> %s\n",
ms->name, ((Suff *)Lst_Datum(ln))->name);
ms->name, ((Suff *)LstNode_Datum(ln))->name);
}
}
}
@ -1797,7 +1797,7 @@ SuffFindNormalDeps(GNode *gn, Lst slst)
*/
targ = bmake_malloc(sizeof(Src));
targ->file = bmake_strdup(gn->name);
targ->suff = Lst_Datum(ln);
targ->suff = LstNode_Datum(ln);
targ->suff->refCount++;
targ->node = gn;
targ->parent = NULL;
@ -1877,7 +1877,7 @@ SuffFindNormalDeps(GNode *gn, Lst slst)
* for setting the local variables.
*/
if (!Lst_IsEmpty(targs)) {
targ = Lst_Datum(Lst_First(targs));
targ = LstNode_Datum(Lst_First(targs));
} else {
targ = NULL;
}
@ -2137,7 +2137,7 @@ SuffFindDeps(GNode *gn, Lst slst)
if (gn->suffix)
gn->suffix->refCount--;
if (ln != NULL) {
gn->suffix = s = Lst_Datum(ln);
gn->suffix = s = LstNode_Datum(ln);
gn->suffix->refCount++;
Arch_FindLib(gn, s->searchPath);
} else {
@ -2171,7 +2171,7 @@ Suff_SetNull(char *name)
ln = Lst_Find(sufflist, SuffSuffHasName, name);
if (ln != NULL) {
s = Lst_Datum(ln);
s = LstNode_Datum(ln);
if (suffNull != NULL) {
suffNull->flags &= ~SUFF_NULL;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: targ.c,v 1.78 2020/08/29 20:20:44 rillig Exp $ */
/* $NetBSD: targ.c,v 1.79 2020/08/30 11:15:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@ -69,14 +69,14 @@
*/
#ifndef MAKE_NATIVE
static char rcsid[] = "$NetBSD: targ.c,v 1.78 2020/08/29 20:20:44 rillig Exp $";
static char rcsid[] = "$NetBSD: targ.c,v 1.79 2020/08/30 11:15:05 rillig Exp $";
#else
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94";
#else
__RCSID("$NetBSD: targ.c,v 1.78 2020/08/29 20:20:44 rillig Exp $");
__RCSID("$NetBSD: targ.c,v 1.79 2020/08/30 11:15:05 rillig Exp $");
#endif
#endif /* not lint */
#endif
@ -321,7 +321,7 @@ Targ_FindList(Lst names, int flags)
Lst_Open(names);
while ((ln = Lst_Next(names)) != NULL) {
name = Lst_Datum(ln);
name = LstNode_Datum(ln);
gn = Targ_FindNode(name, flags);
if (gn != NULL) {
/*
@ -586,13 +586,13 @@ Targ_Propagate(void)
LstNode pn, cn;
for (pn = Lst_First(allTargets); pn != NULL; pn = LstNode_Next(pn)) {
GNode *pgn = Lst_Datum(pn);
GNode *pgn = LstNode_Datum(pn);
if (!(pgn->type & OP_DOUBLEDEP))
continue;
for (cn = Lst_First(pgn->cohorts); cn != NULL; cn = LstNode_Next(cn)) {
GNode *cgn = Lst_Datum(cn);
GNode *cgn = LstNode_Datum(cn);
cgn->type |= pgn->type & ~OP_OPMASK;
}