version 1.36 | | version 1.37 |
---|
| | |
/* | | /* |
* static char *rcsid_arch_c = | | * static char *rcsid_arch_c = |
* "$Id: arch.c,v 1.36 2006/02/08 23:53:19 akirschbaum Exp $"; | | * "$Id: arch.c,v 1.37 2006/02/10 23:59:25 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
/* IF set, does a little timing on the archetype load. */ | | /* IF set, does a little timing on the archetype load. */ |
#define TIME_ARCH_LOAD 0 | | #define TIME_ARCH_LOAD 0 |
| | |
| | static void add_arch(archetype *at); |
| | |
static archetype *arch_table[ARCHTABLE]; | | static archetype *arch_table[ARCHTABLE]; |
int arch_cmp=0; /* How many strcmp's */ | | int arch_cmp=0; /* How many strcmp's */ |
int arch_search=0; /* How many searches */ | | int arch_search=0; /* How many searches */ |
| | |
* Adds an archetype to the hashtable. | | * Adds an archetype to the hashtable. |
*/ | | */ |
| | |
void add_arch(archetype *at) { | | static void add_arch(archetype *at) { |
int index=hasharch(at->name, ARCHTABLE),org_index=index; | | int index=hasharch(at->name, ARCHTABLE),org_index=index; |
for(;;) { | | for(;;) { |
if(arch_table[index]==NULL) { | | if(arch_table[index]==NULL) { |