version 1.9, 1999/12/18 02:11:27 |
version 1.10, 1999/12/18 21:53:32 |
|
|
} |
} |
|
|
if (Lst_Open (cgn->children) == SUCCESS) { |
if (Lst_Open (cgn->children) == SUCCESS) { |
while ((ln = Lst_Next (cgn->children)) != NILLNODE) { |
while ((ln = Lst_Next (cgn->children)) != NULL) { |
gn = (GNode *)Lst_Datum (ln); |
gn = (GNode *)Lst_Datum (ln); |
|
|
if (Lst_Member (pgn->children, gn) == NILLNODE) { |
if (Lst_Member (pgn->children, gn) == NULL) { |
(void) Lst_AtEnd (pgn->children, gn); |
(void) Lst_AtEnd (pgn->children, gn); |
(void) Lst_AtEnd (gn->parents, pgn); |
(void) Lst_AtEnd (gn->parents, pgn); |
pgn->unmade += 1; |
pgn->unmade += 1; |
|
|
} |
} |
|
|
if (Lst_Open (cgn->parents) == SUCCESS) { |
if (Lst_Open (cgn->parents) == SUCCESS) { |
while ((ln = Lst_Next (cgn->parents)) != NILLNODE) { |
while ((ln = Lst_Next (cgn->parents)) != NULL) { |
pgn = (GNode *)Lst_Datum (ln); |
pgn = (GNode *)Lst_Datum (ln); |
if (pgn->make) { |
if (pgn->make) { |
pgn->unmade -= 1; |
pgn->unmade -= 1; |
|
|
* it means we need to place it in the queue as it restrained itself |
* it means we need to place it in the queue as it restrained itself |
* before. |
* before. |
*/ |
*/ |
for (ln = Lst_First(cgn->successors); ln != NILLNODE; ln = Lst_Succ(ln)) { |
for (ln = Lst_First(cgn->successors); ln != NULL; ln = Lst_Succ(ln)) { |
GNode *succ = (GNode *)Lst_Datum(ln); |
GNode *succ = (GNode *)Lst_Datum(ln); |
|
|
if (succ->make && succ->unmade == 0 && succ->made == UNMADE && |
if (succ->make && succ->unmade == 0 && succ->made == UNMADE && |
Lst_Member(toBeMade, (ClientData)succ) == NILLNODE) |
Lst_Member(toBeMade, (ClientData)succ) == NULL) |
{ |
{ |
(void)Lst_EnQueue(toBeMade, (ClientData)succ); |
(void)Lst_EnQueue(toBeMade, (ClientData)succ); |
} |
} |
|
|
if (Lst_Open (cgn->iParents) == SUCCESS) { |
if (Lst_Open (cgn->iParents) == SUCCESS) { |
char *cpref = Var_Value(PREFIX, cgn); |
char *cpref = Var_Value(PREFIX, cgn); |
|
|
while ((ln = Lst_Next (cgn->iParents)) != NILLNODE) { |
while ((ln = Lst_Next (cgn->iParents)) != NULL) { |
pgn = (GNode *)Lst_Datum (ln); |
pgn = (GNode *)Lst_Datum (ln); |
if (pgn->make) { |
if (pgn->make) { |
Var_Set (IMPSRC, cname, pgn); |
Var_Set (IMPSRC, cname, pgn); |
|
|
if (!Lst_IsEmpty(gn->preds)) { |
if (!Lst_IsEmpty(gn->preds)) { |
LstNode ln; |
LstNode ln; |
|
|
for (ln = Lst_First(gn->preds); ln != NILLNODE; ln = Lst_Succ(ln)){ |
for (ln = Lst_First(gn->preds); ln != NULL; ln = Lst_Succ(ln)){ |
GNode *pgn = (GNode *)Lst_Datum(ln); |
GNode *pgn = (GNode *)Lst_Datum(ln); |
|
|
if (pgn->make && pgn->made == UNMADE) { |
if (pgn->make && pgn->made == UNMADE) { |
|
|
} |
} |
} |
} |
/* |
/* |
* If ln isn't nil, there's a predecessor as yet unmade, so we |
* If ln isn't null, there's a predecessor as yet unmade, so we |
* just drop this node on the floor. When the node in question |
* just drop this node on the floor. When the node in question |
* has been made, it will notice this node as being ready to |
* has been made, it will notice this node as being ready to |
* make but as yet unmade and will place the node on the queue. |
* make but as yet unmade and will place the node on the queue. |
*/ |
*/ |
if (ln != NILLNODE) { |
if (ln != NULL) { |
continue; |
continue; |
} |
} |
} |
} |