make(1): migrate Lst_Last to Lst_LastS
This commit is contained in:
parent
b855b10134
commit
8dde8e9642
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $ */
|
||||
/* $NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 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.45 2020/08/27 07:00:29 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: lst.c,v 1.45 2020/08/27 07:00:29 rillig Exp $");
|
||||
__RCSID("$NetBSD: lst.c,v 1.46 2020/08/27 07:03:48 rillig Exp $");
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
|
||||
@ -351,18 +351,6 @@ Lst_FirstS(Lst list)
|
||||
return list->first;
|
||||
}
|
||||
|
||||
/* Return the last node from the given list, or NULL if the list is empty or
|
||||
* invalid. */
|
||||
LstNode
|
||||
Lst_Last(Lst list)
|
||||
{
|
||||
if (!LstIsValid(list) || LstIsEmpty(list)) {
|
||||
return NULL;
|
||||
} else {
|
||||
return list->last;
|
||||
}
|
||||
}
|
||||
|
||||
/* Return the last node from the given list, or NULL if the list is empty. */
|
||||
LstNode
|
||||
Lst_LastS(Lst list)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: parse.c,v 1.265 2020/08/27 06:53:57 rillig Exp $ */
|
||||
/* $NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.265 2020/08/27 06:53:57 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 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.265 2020/08/27 06:53:57 rillig Exp $");
|
||||
__RCSID("$NetBSD: parse.c,v 1.266 2020/08/27 07:03:48 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -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_DatumS(Lst_Last(gn->cohorts));
|
||||
gn = Lst_DatumS(Lst_LastS(gn->cohorts));
|
||||
|
||||
/* if target already supplied, ignore commands */
|
||||
if (!(gn->type & OP_HAS_COMMANDS)) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: suff.c,v 1.119 2020/08/27 07:00:29 rillig Exp $ */
|
||||
/* $NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1990, 1993
|
||||
@ -69,14 +69,14 @@
|
||||
*/
|
||||
|
||||
#ifndef MAKE_NATIVE
|
||||
static char rcsid[] = "$NetBSD: suff.c,v 1.119 2020/08/27 07:00:29 rillig Exp $";
|
||||
static char rcsid[] = "$NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 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.119 2020/08/27 07:00:29 rillig Exp $");
|
||||
__RCSID("$NetBSD: suff.c,v 1.120 2020/08/27 07:03:48 rillig Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
#endif
|
||||
@ -776,7 +776,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_DatumS(Lst_Last(gn->cohorts));
|
||||
gn = Lst_DatumS(Lst_LastS(gn->cohorts));
|
||||
if ((gn->type & OP_TRANSFORM) && Lst_IsEmpty(gn->commands) &&
|
||||
Lst_IsEmpty(gn->children))
|
||||
{
|
||||
@ -1836,7 +1836,7 @@ SuffApplyTransform(GNode *tGn, GNode *sGn, Suff *t, Suff *s)
|
||||
/*
|
||||
* Record last child for expansion purposes
|
||||
*/
|
||||
ln = Lst_Last(tGn->children);
|
||||
ln = Lst_LastS(tGn->children);
|
||||
|
||||
/*
|
||||
* Pass the buck to Make_HandleUse to apply the rule
|
||||
|
Loading…
Reference in New Issue
Block a user