From 91d3b24870d0fd23ca7ec200fd08f1ce87b6954a Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 14 Oct 2015 13:52:11 +0000 Subject: [PATCH] gc lst_ForEachNodeWhile, which isn't actually in use anywhere --- usr.bin/make/lst.h | 5 +---- usr.bin/make/lst.lib/lst.h | 5 +---- usr.bin/make/lst.lib/lstForEachFrom.c | 12 +----------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h index 103569c1c7c..5ac1fdb35c8 100644 --- a/usr.bin/make/lst.h +++ b/usr.bin/make/lst.h @@ -1,7 +1,7 @@ #ifndef _LST_H_ #define _LST_H_ -/* $OpenBSD: lst.h,v 1.30 2015/10/14 13:50:22 espie Exp $ */ +/* $OpenBSD: lst.h,v 1.31 2015/10/14 13:52:11 espie Exp $ */ /* $NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $ */ /* @@ -60,7 +60,6 @@ struct ListNode_ { typedef void (*SimpleProc)(void *); typedef bool (*FindProc)(void *, void *); -typedef int (*ForEachNodeWhileProc)(LstNode, void *); typedef int (*FindProcConst)(void *, const void *); typedef void (*ForEachProc)(void *, void *); typedef void *(*DuplicateProc)(void *); @@ -130,8 +129,6 @@ extern LstNode Lst_Member(Lst, void *); extern void Lst_ForEachFrom(LstNode, ForEachProc, void *); extern void Lst_Every(Lst, SimpleProc); -extern void Lst_ForEachNodeWhile(Lst, ForEachNodeWhileProc, void *); - extern bool Lst_AddNew(Lst, void *); /* * for using the list as a queue diff --git a/usr.bin/make/lst.lib/lst.h b/usr.bin/make/lst.lib/lst.h index fecbb438691..a05dc78781d 100644 --- a/usr.bin/make/lst.lib/lst.h +++ b/usr.bin/make/lst.lib/lst.h @@ -1,7 +1,7 @@ #ifndef _LST_H_ #define _LST_H_ -/* $OpenBSD: lst.h,v 1.1 2014/05/12 19:11:20 espie Exp $ */ +/* $OpenBSD: lst.h,v 1.2 2015/10/14 13:52:11 espie Exp $ */ /* $NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $ */ /* @@ -60,7 +60,6 @@ struct ListNode_ { typedef void (*SimpleProc)(void *); typedef int (*FindProc)(void *, void *); -typedef int (*ForEachNodeWhileProc)(LstNode, void *); typedef int (*FindProcConst)(void *, const void *); typedef void (*ForEachProc)(void *, void *); typedef void *(*DuplicateProc)(void *); @@ -130,8 +129,6 @@ extern LstNode Lst_Member(Lst, void *); extern void Lst_ForEachFrom(LstNode, ForEachProc, void *); extern void Lst_Every(Lst, SimpleProc); -extern void Lst_ForEachNodeWhile(Lst, ForEachNodeWhileProc, void *); - extern bool Lst_AddNew(Lst, void *); /* * for using the list as a queue diff --git a/usr.bin/make/lst.lib/lstForEachFrom.c b/usr.bin/make/lst.lib/lstForEachFrom.c index ac2f2e89527..911174ba4de 100644 --- a/usr.bin/make/lst.lib/lstForEachFrom.c +++ b/usr.bin/make/lst.lib/lstForEachFrom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lstForEachFrom.c,v 1.19 2010/07/19 19:46:44 espie Exp $ */ +/* $OpenBSD: lstForEachFrom.c,v 1.20 2015/10/14 13:52:11 espie Exp $ */ /* $NetBSD: lstForEachFrom.c,v 1.5 1996/11/06 17:59:42 christos Exp $ */ /* @@ -70,13 +70,3 @@ Lst_Every(Lst l, SimpleProc proc) for (tln = l->firstPtr; tln != NULL; tln = tln->nextPtr) (*proc)(tln->datum); } - -void -Lst_ForEachNodeWhile(Lst l, ForEachNodeWhileProc proc, void *d) -{ - LstNode it; - - for (it = l->firstPtr; it != NULL; it = it->nextPtr) - if ((*proc)(it, d) == 0) - return; -} -- 2.20.1