version 1.90, 2015/01/23 22:35:58 |
version 1.91, 2016/10/21 16:12:38 |
|
|
Suff *s2 = NULL; /* the suffix descriptor in this element */ |
Suff *s2 = NULL; /* the suffix descriptor in this element */ |
|
|
for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) { |
for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) { |
s2 = (Suff *)Lst_Datum(ln); |
s2 = Lst_Datum(ln); |
if (s2->order >= s->order) |
if (s2->order >= s->order) |
break; |
break; |
} |
} |
|
|
|
|
|
|
for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) { |
for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) { |
s = (Src *)Lst_Datum(ln); |
s = Lst_Datum(ln); |
if (s->children == 0) { |
if (s->children == 0) { |
free(s->file); |
free(s->file); |
if (!s->parent) |
if (!s->parent) |
|
|
|
|
rs = NULL; |
rs = NULL; |
|
|
while ((s = (Src *)Lst_DeQueue(srcs)) != NULL) { |
while ((s = Lst_DeQueue(srcs)) != NULL) { |
if (DEBUG(SUFF)) |
if (DEBUG(SUFF)) |
printf("\ttrying %s...", s->file); |
printf("\ttrying %s...", s->file); |
|
|
|
|
prefixLen = strlen(targ->prefix); |
prefixLen = strlen(targ->prefix); |
|
|
for (ln = Lst_First(&t->children); ln != NULL; ln = Lst_Adv(ln)) { |
for (ln = Lst_First(&t->children); ln != NULL; ln = Lst_Adv(ln)) { |
s = (GNode *)Lst_Datum(ln); |
s = Lst_Datum(ln); |
|
|
cp = strrchr(s->name, '/'); |
cp = strrchr(s->name, '/'); |
if (cp == NULL) |
if (cp == NULL) |
|
|
} |
} |
} |
} |
/* Add all elements of the members list to the parent node. */ |
/* Add all elements of the members list to the parent node. */ |
while ((gn = (GNode *)Lst_DeQueue(&members)) != NULL) { |
while ((gn = Lst_DeQueue(&members)) != NULL) { |
if (DEBUG(SUFF)) |
if (DEBUG(SUFF)) |
printf("%s...", gn->name); |
printf("%s...", gn->name); |
if (Lst_Member(&pgn->children, gn) == NULL) { |
if (Lst_Member(&pgn->children, gn) == NULL) { |
|
|
Dir_Expand(cgn->name, path, &exp); |
Dir_Expand(cgn->name, path, &exp); |
|
|
/* Fetch next expansion off the list and find its GNode. */ |
/* Fetch next expansion off the list and find its GNode. */ |
while ((cp = (char *)Lst_DeQueue(&exp)) != NULL) { |
while ((cp = Lst_DeQueue(&exp)) != NULL) { |
GNode *gn; /* New source 8) */ |
GNode *gn; /* New source 8) */ |
if (DEBUG(SUFF)) |
if (DEBUG(SUFF)) |
printf("%s...", cp); |
printf("%s...", cp); |
|
|
SuffExpandChildren(LstNode ln, /* LstNode of child, so we can replace it */ |
SuffExpandChildren(LstNode ln, /* LstNode of child, so we can replace it */ |
GNode *pgn) |
GNode *pgn) |
{ |
{ |
GNode *cgn = (GNode *)Lst_Datum(ln); |
GNode *cgn = Lst_Datum(ln); |
|
|
/* First do variable expansion -- this takes precedence over wildcard |
/* First do variable expansion -- this takes precedence over wildcard |
* expansion. If the result contains wildcards, they'll be gotten to |
* expansion. If the result contains wildcards, they'll be gotten to |
|
|
* only one implied src, as that will be sufficient to get |
* only one implied src, as that will be sufficient to get |
* the .IMPSRC variable set for tGn. */ |
* the .IMPSRC variable set for tGn. */ |
for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) { |
for (ln=Lst_First(&sGn->cohorts); ln != NULL; ln=Lst_Adv(ln)) { |
gn = (GNode *)Lst_Datum(ln); |
gn = Lst_Datum(ln); |
|
|
if (Lst_AddNew(&tGn->children, gn)) { |
if (Lst_AddNew(&tGn->children, gn)) { |
/* Not already linked, so form the proper links |
/* Not already linked, so form the proper links |
|
|
Suff *s; |
Suff *s; |
|
|
for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) { |
for (ln = Lst_First(l); ln != NULL; ln = Lst_Adv(ln)) { |
s = (Suff *)Lst_Datum(ln); |
s = Lst_Datum(ln); |
if (suffix_is_suffix(s, b, e)) |
if (suffix_is_suffix(s, b, e)) |
return s; |
return s; |
} |
} |
|
|
/* No known transformations -- use the first suffix found for |
/* No known transformations -- use the first suffix found for |
* setting the local variables. */ |
* setting the local variables. */ |
if (!Lst_IsEmpty(&targs)) |
if (!Lst_IsEmpty(&targs)) |
targ = (Src *)Lst_Datum(Lst_First(&targs)); |
targ = Lst_Datum(Lst_First(&targs)); |
else |
else |
targ = NULL; |
targ = NULL; |
} else { |
} else { |