=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/targ.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- src/usr.bin/make/targ.c 1998/12/05 00:06:29 1.9 +++ src/usr.bin/make/targ.c 1999/10/05 22:06:24 1.10 @@ -1,4 +1,4 @@ -/* $OpenBSD: targ.c,v 1.9 1998/12/05 00:06:29 espie Exp $ */ +/* $OpenBSD: targ.c,v 1.10 1999/10/05 22:06:24 espie Exp $ */ /* $NetBSD: targ.c,v 1.11 1997/02/20 16:51:50 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)targ.c 8.2 (Berkeley) 3/19/94"; #else -static char *rcsid = "$OpenBSD: targ.c,v 1.9 1998/12/05 00:06:29 espie Exp $"; +static char *rcsid = "$OpenBSD: targ.c,v 1.10 1999/10/05 22:06:24 espie Exp $"; #endif #endif /* not lint */ @@ -95,7 +95,9 @@ #include "dir.h" static Lst allTargets; /* the list of all targets found so far */ +#ifdef CLEANUP static Lst allGNs; /* List of all the GNodes */ +#endif static Hash_Table targets; /* a hash table of same */ #define HTSIZE 191 /* initial size of hash table */ @@ -103,7 +105,9 @@ static int TargPrintOnlySrc __P((ClientData, ClientData)); static int TargPrintName __P((ClientData, ClientData)); static int TargPrintNode __P((ClientData, ClientData)); +#ifdef CLEANUP static void TargFreeGN __P((ClientData)); +#endif /*- *----------------------------------------------------------------------- @@ -139,10 +143,12 @@ void Targ_End () { +#ifdef CLEANUP Lst_Destroy(allTargets, NOFREE); if (allGNs) Lst_Destroy(allGNs, TargFreeGN); Hash_DeleteTable(&targets); +#endif } /*- @@ -188,13 +194,16 @@ gn->commands = Lst_Init (FALSE); gn->suffix = NULL; +#ifdef CLEANUP if (allGNs == NULL) allGNs = Lst_Init(FALSE); Lst_AtEnd(allGNs, (ClientData) gn); +#endif return (gn); } +#ifdef CLEANUP /*- *----------------------------------------------------------------------- * TargFreeGN -- @@ -227,6 +236,7 @@ Lst_Destroy(gn->commands, NOFREE); free((Address)gn); } +#endif /*-