version 1.9, 1998/12/05 00:06:29 |
version 1.10, 1999/10/05 22:06:24 |
|
|
#include "dir.h" |
#include "dir.h" |
|
|
static Lst allTargets; /* the list of all targets found so far */ |
static Lst allTargets; /* the list of all targets found so far */ |
|
#ifdef CLEANUP |
static Lst allGNs; /* List of all the GNodes */ |
static Lst allGNs; /* List of all the GNodes */ |
|
#endif |
static Hash_Table targets; /* a hash table of same */ |
static Hash_Table targets; /* a hash table of same */ |
|
|
#define HTSIZE 191 /* initial size of hash table */ |
#define HTSIZE 191 /* initial size of hash table */ |
|
|
static int TargPrintOnlySrc __P((ClientData, ClientData)); |
static int TargPrintOnlySrc __P((ClientData, ClientData)); |
static int TargPrintName __P((ClientData, ClientData)); |
static int TargPrintName __P((ClientData, ClientData)); |
static int TargPrintNode __P((ClientData, ClientData)); |
static int TargPrintNode __P((ClientData, ClientData)); |
|
#ifdef CLEANUP |
static void TargFreeGN __P((ClientData)); |
static void TargFreeGN __P((ClientData)); |
|
#endif |
|
|
/*- |
/*- |
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
|
|
void |
void |
Targ_End () |
Targ_End () |
{ |
{ |
|
#ifdef CLEANUP |
Lst_Destroy(allTargets, NOFREE); |
Lst_Destroy(allTargets, NOFREE); |
if (allGNs) |
if (allGNs) |
Lst_Destroy(allGNs, TargFreeGN); |
Lst_Destroy(allGNs, TargFreeGN); |
Hash_DeleteTable(&targets); |
Hash_DeleteTable(&targets); |
|
#endif |
} |
} |
|
|
/*- |
/*- |
|
|
gn->commands = Lst_Init (FALSE); |
gn->commands = Lst_Init (FALSE); |
gn->suffix = NULL; |
gn->suffix = NULL; |
|
|
|
#ifdef CLEANUP |
if (allGNs == NULL) |
if (allGNs == NULL) |
allGNs = Lst_Init(FALSE); |
allGNs = Lst_Init(FALSE); |
Lst_AtEnd(allGNs, (ClientData) gn); |
Lst_AtEnd(allGNs, (ClientData) gn); |
|
#endif |
|
|
return (gn); |
return (gn); |
} |
} |
|
|
|
#ifdef CLEANUP |
/*- |
/*- |
*----------------------------------------------------------------------- |
*----------------------------------------------------------------------- |
* TargFreeGN -- |
* TargFreeGN -- |
|
|
Lst_Destroy(gn->commands, NOFREE); |
Lst_Destroy(gn->commands, NOFREE); |
free((Address)gn); |
free((Address)gn); |
} |
} |
|
#endif |
|
|
|
|
/*- |
/*- |