diff options
Diffstat (limited to 'devel/bmake/files/targ.c')
-rw-r--r-- | devel/bmake/files/targ.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/devel/bmake/files/targ.c b/devel/bmake/files/targ.c index 09888e72e29..1a264b069ec 100644 --- a/devel/bmake/files/targ.c +++ b/devel/bmake/files/targ.c @@ -1,4 +1,4 @@ -/* $NetBSD: targ.c,v 1.3 2008/11/11 14:37:05 joerg Exp $ */ +/* $NetBSD: targ.c,v 1.4 2009/09/18 21:27:25 joerg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: targ.c,v 1.3 2008/11/11 14:37:05 joerg Exp $"; +static char rcsid[] = "$NetBSD: targ.c,v 1.4 2009/09/18 21:27:25 joerg 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.3 2008/11/11 14:37:05 joerg Exp $"); +__RCSID("$NetBSD: targ.c,v 1.4 2009/09/18 21:27:25 joerg Exp $"); #endif #endif /* not lint */ #endif @@ -144,13 +144,13 @@ static Hash_Table targets; /* a hash table of same */ #define HTSIZE 191 /* initial size of hash table */ -static int TargPrintOnlySrc(ClientData, ClientData); -static int TargPrintName(ClientData, ClientData); +static int TargPrintOnlySrc(void *, void *); +static int TargPrintName(void *, void *); #ifdef CLEANUP -static void TargFreeGN(ClientData); +static void TargFreeGN(void *); #endif -static int TargPropagateCohort(ClientData, ClientData); -static int TargPropagateNode(ClientData, ClientData); +static int TargPropagateCohort(void *, void *); +static int TargPropagateNode(void *, void *); /*- *----------------------------------------------------------------------- @@ -187,7 +187,7 @@ void Targ_End(void) { #ifdef CLEANUP - Lst_Destroy(allTargets, NOFREE); + Lst_Destroy(allTargets, NULL); if (allGNs) Lst_Destroy(allGNs, TargFreeGN); Hash_DeleteTable(&targets); @@ -285,7 +285,7 @@ Targ_NewGN(const char *name) *----------------------------------------------------------------------- */ static void -TargFreeGN(ClientData gnp) +TargFreeGN(void *gnp) { GNode *gn = (GNode *)gnp; @@ -297,14 +297,14 @@ TargFreeGN(ClientData gnp) free(gn->path); /* gn->fname points to name allocated when file was opened, don't free */ - Lst_Destroy(gn->iParents, NOFREE); - Lst_Destroy(gn->cohorts, NOFREE); - Lst_Destroy(gn->parents, NOFREE); - Lst_Destroy(gn->children, NOFREE); - Lst_Destroy(gn->order_succ, NOFREE); - Lst_Destroy(gn->order_pred, NOFREE); + Lst_Destroy(gn->iParents, NULL); + Lst_Destroy(gn->cohorts, NULL); + Lst_Destroy(gn->parents, NULL); + Lst_Destroy(gn->children, NULL); + Lst_Destroy(gn->order_succ, NULL); + Lst_Destroy(gn->order_pred, NULL); Hash_DeleteTable(&gn->context); - Lst_Destroy(gn->commands, NOFREE); + Lst_Destroy(gn->commands, NULL); free(gn); } #endif @@ -321,7 +321,7 @@ TargFreeGN(ClientData gnp) * found * * Results: - * The node in the list if it was. If it wasn't, return NILGNODE of + * The node in the list if it was. If it wasn't, return NULL of * flags was TARG_NOCREATE or the newly created and initialized node * if it was TARG_CREATE * @@ -340,7 +340,7 @@ Targ_FindNode(const char *name, int flags) if (!(flags & (TARG_CREATE | TARG_NOHASH))) { he = Hash_FindEntry(&targets, name); if (he == NULL) - return (NILGNODE); + return NULL; return (GNode *)Hash_GetValue(he); } @@ -392,10 +392,10 @@ Targ_FindList(Lst names, int flags) if (Lst_Open(names) == FAILURE) { return (nodes); } - while ((ln = Lst_Next(names)) != NILLNODE) { + while ((ln = Lst_Next(names)) != NULL) { name = (char *)Lst_Datum(ln); gn = Targ_FindNode(name, flags); - if (gn != NILGNODE) { + if (gn != NULL) { /* * Note: Lst_AtEnd must come before the Lst_Concat so the nodes * are added to the list in the order in which they were @@ -511,7 +511,7 @@ Targ_SetMain(GNode *gn) } static int -TargPrintName(ClientData gnp, ClientData pflags __unused) +TargPrintName(void *gnp, void *pflags __unused) { GNode *gn = (GNode *)gnp; @@ -522,7 +522,7 @@ TargPrintName(ClientData gnp, ClientData pflags __unused) int -Targ_PrintCmd(ClientData cmd, ClientData dummy) +Targ_PrintCmd(void *cmd, void *dummy) { fprintf(debug_file, "\t%s\n", (char *)cmd); return (dummy ? 0 : 0); @@ -623,7 +623,7 @@ made_name(enum enum_made made) *----------------------------------------------------------------------- */ int -Targ_PrintNode(ClientData gnp, ClientData passp) +Targ_PrintNode(void *gnp, void *passp) { GNode *gn = (GNode *)gnp; int pass = passp ? *(int *)passp : 0; @@ -716,7 +716,7 @@ Targ_PrintNode(ClientData gnp, ClientData passp) *----------------------------------------------------------------------- */ static int -TargPrintOnlySrc(ClientData gnp, ClientData dummy __unused) +TargPrintOnlySrc(void *gnp, void *dummy __unused) { GNode *gn = (GNode *)gnp; if (!OP_NOP(gn->type)) @@ -789,7 +789,7 @@ Targ_PrintGraph(int pass) *----------------------------------------------------------------------- */ static int -TargPropagateNode(ClientData gnp, ClientData junk __unused) +TargPropagateNode(void *gnp, void *junk __unused) { GNode *gn = (GNode *)gnp; @@ -817,7 +817,7 @@ TargPropagateNode(ClientData gnp, ClientData junk __unused) *----------------------------------------------------------------------- */ static int -TargPropagateCohort(ClientData cgnp, ClientData pgnp) +TargPropagateCohort(void *cgnp, void *pgnp) { GNode *cgn = (GNode *)cgnp; GNode *pgn = (GNode *)pgnp; |