version 1.11, 1999/12/18 02:11:27 |
version 1.12, 1999/12/18 21:53:33 |
|
|
* Find a node in the list using the given name for matching |
* Find a node in the list using the given name for matching |
* |
* |
* Results: |
* 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 |
* flags was TARG_NOCREATE or the newly created and initialized node |
* if it was TARG_CREATE |
* if it was TARG_CREATE |
* |
* |
|
|
he = Hash_FindEntry (&targets, name); |
he = Hash_FindEntry (&targets, name); |
} |
} |
|
|
if (he == (Hash_Entry *) NULL) { |
if (he == NULL) { |
return (NILGNODE); |
return (NULL); |
} else { |
} else { |
return ((GNode *) Hash_GetValue (he)); |
return ((GNode *) Hash_GetValue (he)); |
} |
} |
|
|
if (Lst_Open (names) == FAILURE) { |
if (Lst_Open (names) == FAILURE) { |
return (nodes); |
return (nodes); |
} |
} |
while ((ln = Lst_Next (names)) != NILLNODE) { |
while ((ln = Lst_Next (names)) != NULL) { |
name = (char *)Lst_Datum(ln); |
name = (char *)Lst_Datum(ln); |
gn = Targ_FindNode (name, flags); |
gn = Targ_FindNode (name, flags); |
if (gn != NILGNODE) { |
if (gn != NULL) { |
/* |
/* |
* Note: Lst_AtEnd must come before the Lst_Concat so the nodes |
* Note: Lst_AtEnd must come before the Lst_Concat so the nodes |
* are added to the list in the order in which they were |
* are added to the list in the order in which they were |