Lines 472-479
Link Here
|
472 |
} |
472 |
} |
473 |
|
473 |
|
474 |
/* Dynamic expansion results in a NULL cell only when the the new |
474 |
/* Dynamic expansion results in a NULL cell only when the the new |
475 |
* prerequisite is already in the prerequisite list. In this case |
475 |
* prerequisite is already in the prerequisite list or empty. In this |
476 |
* delete the cell and continue. */ |
476 |
* case delete the cell and continue. */ |
477 |
if ( tcp == NIL(CELL) ) { |
477 |
if ( tcp == NIL(CELL) ) { |
478 |
FREE(dp); |
478 |
FREE(dp); |
479 |
if ( prev == NIL(LINK) ) { |
479 |
if ( prev == NIL(LINK) ) { |
Lines 846-864
Link Here
|
846 |
{ |
846 |
{ |
847 |
CELLPTR cur = lp->cl_prq; |
847 |
CELLPTR cur = lp->cl_prq; |
848 |
|
848 |
|
849 |
/* If condition is true, no space is found. */ |
849 |
if( !(*name) ) { |
850 |
if ( strchr(name, ' ') == NIL(char) ) { |
850 |
/* If name is empty this leaves lp->cl_prq unchanged -> No prerequisite added. */ |
851 |
CELLPTR prq = Def_cell(name); /* FIXME: name could be empty. */ |
851 |
; |
|
|
852 |
} |
853 |
else if ( strchr(name, ' ') == NIL(char) ) { |
854 |
/* If condition above is true, no space is found. */ |
855 |
CELLPTR prq = Def_cell(name); |
852 |
LINKPTR tmp; |
856 |
LINKPTR tmp; |
853 |
|
857 |
|
854 |
/* Check if prq already exists. */ |
858 |
/* Check if prq already exists. */ |
855 |
for(tmp=head;tmp != NIL(LINK) && tmp->cl_prq != prq;tmp=tmp->cl_next); |
859 |
for(tmp=head;tmp != NIL(LINK) && tmp->cl_prq != prq;tmp=tmp->cl_next); |
856 |
|
860 |
|
857 |
/* If tmp is NULL then the prerequisite is new and is added to the list. */ |
861 |
/* If tmp is NULL then the prerequisite is new and is added to the list. */ |
858 |
if ( !tmp ) |
862 |
if ( !tmp ) { |
859 |
/* replace the prerequisite with the expanded version. */ |
863 |
/* replace the prerequisite with the expanded version. */ |
860 |
lp->cl_prq = prq; |
864 |
lp->cl_prq = prq; |
861 |
lp->cl_prq->ce_flag |= F_MARK; |
865 |
lp->cl_prq->ce_flag |= F_MARK; |
|
|
866 |
} |
862 |
} |
867 |
} |
863 |
else { |
868 |
else { |
864 |
LINKPTR tlp = lp; |
869 |
LINKPTR tlp = lp; |