version 1.11 | | version 1.12 |
---|
| | |
num_ingred, num_ingred>1?"s.":".",fl->number,fl->total_chance); | | num_ingred, num_ingred>1?"s.":".",fl->number,fl->total_chance); |
for (formula=fl->items; formula!=NULL; formula=formula->next) { | | for (formula=fl->items; formula!=NULL; formula=formula->next) { |
artifact *art=NULL; | | artifact *art=NULL; |
char buf[MAX_BUF], *string; | | char buf[MAX_BUF], *string, *dup; |
| | |
string=strtok(formula->arch_name,","); | | dup = strdup_local(formula->arch_name); |
| | string=strtok(dup,","); |
while(string) { | | while(string) { |
if(find_archetype(string)!=NULL) { | | if(find_archetype(string)!=NULL) { |
art = locate_recipe_artifact(formula); | | art = locate_recipe_artifact(formula); |
| | |
formula->title); | | formula->title); |
string = strtok(NULL,","); | | string = strtok(NULL,","); |
} | | } |
| | free(dup); |
} | | } |
fprintf(logfile,"\n"); | | fprintf(logfile,"\n"); |
fl = fl->next; | | fl = fl->next; |
| | |
for (formula = fl->items; formula != NULL; formula = formula->next) { | | for (formula = fl->items; formula != NULL; formula = formula->next) { |
artifact *art=NULL; | | artifact *art=NULL; |
archetype *at=NULL; | | archetype *at=NULL; |
char buf[MAX_BUF], *string; | | char buf[MAX_BUF], *string, *dup; |
| | |
string = strtok (formula->arch_name, ","); | | dup = strdup_local(formula->arch_name); |
| | string = strtok (dup, ","); |
while (string) { | | while (string) { |
if ((at = find_archetype (string)) != NULL) { | | if ((at = find_archetype (string)) != NULL) { |
art = locate_recipe_artifact (formula); | | art = locate_recipe_artifact (formula); |
| | |
formula->title); | | formula->title); |
string = strtok (NULL, ","); | | string = strtok (NULL, ","); |
} | | } |
| | free(dup); |
} | | } |
fprintf (logfile,"\n"); | | fprintf (logfile,"\n"); |
fl = fl->next; | | fl = fl->next; |