version 1.30, 2000/06/17 14:43:36 |
version 1.31, 2000/06/23 16:15:50 |
|
|
LstNode ln; /* current element in l we're examining */ |
LstNode ln; /* current element in l we're examining */ |
Suff *s2 = NULL; /* the suffix descriptor in this element */ |
Suff *s2 = NULL; /* the suffix descriptor in this element */ |
|
|
if (Lst_Open (l) == FAILURE) { |
Lst_Open(l); |
return; |
while ((ln = Lst_Next(l)) != NULL) { |
} |
s2 = (Suff *)Lst_Datum(ln); |
while ((ln = Lst_Next (l)) != NULL) { |
|
s2 = (Suff *) Lst_Datum (ln); |
|
if (s2->sNum >= s->sNum) { |
if (s2->sNum >= s->sNum) { |
break; |
break; |
} |
} |
|
|
} |
} |
return (FALSE); |
return (FALSE); |
} |
} |
src = (Suff *) Lst_Datum (srcLn); |
src = (Suff *)Lst_Datum(srcLn); |
str2 = str + src->nameLen; |
str2 = str + src->nameLen; |
if (*str2 == '\0') { |
if (*str2 == '\0') { |
single = src; |
single = src; |
|
|
* free the commands themselves, because a given command can be |
* free the commands themselves, because a given command can be |
* attached to several different transformations. |
* attached to several different transformations. |
*/ |
*/ |
gn = (GNode *) Lst_Datum (ln); |
gn = (GNode *)Lst_Datum(ln); |
Lst_Destroy(&gn->commands, NOFREE); |
Lst_Destroy(&gn->commands, NOFREE); |
Lst_Destroy(&gn->children, NOFREE); |
Lst_Destroy(&gn->children, NOFREE); |
Lst_Init(&gn->commands); |
Lst_Init(&gn->commands); |
|
|
LIST inIncludes; /* Cumulative .INCLUDES path */ |
LIST inIncludes; /* Cumulative .INCLUDES path */ |
LIST inLibs; /* Cumulative .LIBS path */ |
LIST inLibs; /* Cumulative .LIBS path */ |
|
|
if (Lst_Open(&sufflist) == FAILURE) |
Lst_Open(&sufflist); |
return; |
|
|
|
Lst_Init(&inIncludes); |
Lst_Init(&inIncludes); |
Lst_Init(&inLibs); |
Lst_Init(&inLibs); |
|
|
while ((ln = Lst_Next(&sufflist)) != NULL) { |
while ((ln = Lst_Next(&sufflist)) != NULL) { |
s = (Suff *) Lst_Datum (ln); |
s = (Suff *)Lst_Datum(ln); |
if (!Lst_IsEmpty(&s->searchPath)) { |
if (!Lst_IsEmpty(&s->searchPath)) { |
#ifdef INCLUDES |
#ifdef INCLUDES |
if (s->flags & SUFF_INCLUDE) { |
if (s->flags & SUFF_INCLUDE) { |
|
|
|
|
ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); |
ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); |
if (ln != NULL) { |
if (ln != NULL) { |
s = (Suff *) Lst_Datum (ln); |
s = (Suff *)Lst_Datum(ln); |
s->flags |= SUFF_INCLUDE; |
s->flags |= SUFF_INCLUDE; |
} |
} |
} |
} |
|
|
|
|
ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); |
ln = Lst_Find(&sufflist, SuffSuffHasNameP, sname); |
if (ln != NULL) { |
if (ln != NULL) { |
s = (Suff *) Lst_Datum (ln); |
s = (Suff *)Lst_Datum(ln); |
s->flags |= SUFF_LIBRARY; |
s->flags |= SUFF_LIBRARY; |
} |
} |
} |
} |
|
|
Src *s; |
Src *s; |
int t = 0; |
int t = 0; |
|
|
if (Lst_Open (l) == FAILURE) { |
Lst_Open(l); |
return 0; |
|
} |
|
#ifdef DEBUG_SRC |
#ifdef DEBUG_SRC |
printf("cleaning %lx: ", (unsigned long) l); |
printf("cleaning %lx: ", (unsigned long) l); |
Lst_Every(l, PrintAddr); |
Lst_Every(l, PrintAddr); |
|
|
|
|
|
|
while ((ln = Lst_Next (l)) != NULL) { |
while ((ln = Lst_Next (l)) != NULL) { |
s = (Src *) Lst_Datum (ln); |
s = (Src *)Lst_Datum(ln); |
if (s->children == 0) { |
if (s->children == 0) { |
free(s->file); |
free(s->file); |
if (!s->parent) |
if (!s->parent) |
|
|
char *cp; |
char *cp; |
|
|
t = targ->node; |
t = targ->node; |
(void) Lst_Open(&t->children); |
Lst_Open(&t->children); |
prefLen = strlen (targ->pref); |
prefLen = strlen (targ->pref); |
|
|
while ((ln = Lst_Next(&t->children)) != NULL) { |
while ((ln = Lst_Next(&t->children)) != NULL) { |
s = (GNode *)Lst_Datum (ln); |
s = (GNode *)Lst_Datum(ln); |
|
|
cp = strrchr (s->name, '/'); |
cp = strrchr (s->name, '/'); |
if (cp == (char *)NULL) { |
if (cp == (char *)NULL) { |
|
|
* |
* |
* XXX: Handle multi-stage transformations here, too. |
* XXX: Handle multi-stage transformations here, too. |
*/ |
*/ |
suff = (Suff *)Lst_Datum (ln); |
suff = (Suff *)Lst_Datum(ln); |
|
|
if (Lst_Member(&suff->parents, targ->suff) != NULL) |
if (Lst_Member(&suff->parents, targ->suff) != NULL) |
{ |
{ |
|
|
* sGn gets the target in its iParents list, however, as that |
* sGn gets the target in its iParents list, however, as that |
* will be sufficient to get the .IMPSRC variable set for tGn |
* will be sufficient to get the .IMPSRC variable set for tGn |
*/ |
*/ |
for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Succ(ln)) { |
for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) { |
gn = (GNode *)Lst_Datum(ln); |
gn = (GNode *)Lst_Datum(ln); |
|
|
if (Lst_Member(&tGn->children, gn) == NULL) { |
if (Lst_Member(&tGn->children, gn) == NULL) { |
|
|
|
|
ln = Lst_Find(&sufflist, SuffSuffHasNameP, LIBSUFF); |
ln = Lst_Find(&sufflist, SuffSuffHasNameP, LIBSUFF); |
if (ln != NULL) { |
if (ln != NULL) { |
gn->suffix = s = (Suff *) Lst_Datum (ln); |
gn->suffix = s = (Suff *)Lst_Datum(ln); |
Arch_FindLib(gn, &s->searchPath); |
Arch_FindLib(gn, &s->searchPath); |
} else { |
} else { |
gn->suffix = NULL; |
gn->suffix = NULL; |