version 1.10 | | version 1.11 |
---|
| | |
* (e.g. sage & c_sage) or if only one of the monsters generates the | | * (e.g. sage & c_sage) or if only one of the monsters generates the |
* body parts that we are looking for (e.g. big_dragon and | | * body parts that we are looking for (e.g. big_dragon and |
* big_dragon_worthless). */ | | * big_dragon_worthless). */ |
long find_ingred_cost (char *name) | | long find_ingred_cost (const char *name) |
{ | | { |
archetype *at; | | archetype *at; |
archetype *at2; | | archetype *at2; |
| | |
num_errors); | | num_errors); |
} | | } |
| | |
char * ingred_name (char *name) { | | const char * ingred_name (const char *name) { |
char *cp=name; | | const char *cp=name; |
| | |
if(atoi(cp)) cp = strchr(cp,' ') + 1; | | if(atoi(cp)) cp = strchr(cp,' ') + 1; |
return cp; | | return cp; |
| | |
* ASCII values in buf (times prepended integers). | | * ASCII values in buf (times prepended integers). |
*/ | | */ |
| | |
int strtoint (char *buf) { | | int strtoint (const char *buf) { |
char *cp = ingred_name(buf); | | const char *cp = ingred_name(buf); |
int val=0, len=strlen(cp), mult=numb_ingred(buf); | | int val=0, len=strlen(cp), mult=numb_ingred(buf); |
| | |
while (len) { | | while (len) { |
| | |
return art; | | return art; |
} | | } |
| | |
int numb_ingred (char *buf) { | | int numb_ingred (const char *buf) { |
int numb; | | int numb; |
| | |
if((numb=atoi(buf))) return numb; | | if((numb=atoi(buf))) return numb; |