diff options
Diffstat (limited to 'kpat/freecell-solver/fcs_hash.c')
-rw-r--r-- | kpat/freecell-solver/fcs_hash.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kpat/freecell-solver/fcs_hash.c b/kpat/freecell-solver/fcs_hash.c index fde7a03f..2ae2d60b 100644 --- a/kpat/freecell-solver/fcs_hash.c +++ b/kpat/freecell-solver/fcs_hash.c @@ -53,7 +53,7 @@ SFO_hash_t * freecell_solver_hash_init( hash = (SFO_hash_t *)malloc(sizeof(SFO_hash_t)); hash->size = size; - hash->size_bitmask = size-1; + hash->size_bittqmask = size-1; hash->num_elems = 0; @@ -87,7 +87,7 @@ void * freecell_solver_hash_insert( SFO_hash_symlink_item_t * item, * last_item; /* Get the index of the appropriate chain in the hash table */ - place = hash_value & (hash->size_bitmask); + place = hash_value & (hash->size_bittqmask); list = &(hash->entries[place]); /* If first_item is non-existent */ @@ -220,7 +220,7 @@ static void SFO_hash_rehash( SFO_hash_t * hash ) { - int old_size, new_size, new_size_bitmask; + int old_size, new_size, new_size_bittqmask; int i; #if 0 SFO_hash_t * new_hash; @@ -242,7 +242,7 @@ static void SFO_hash_rehash( old_size = hash->size; new_size = old_size << 1; - new_size_bitmask = new_size - 1; + new_size_bittqmask = new_size - 1; new_entries = calloc(new_size, sizeof(SFO_hash_symlink_t)); @@ -254,7 +254,7 @@ static void SFO_hash_rehash( while(item != NULL) { /* The place in the new hash table */ - place = item->hash_value & new_size_bitmask; + place = item->hash_value & new_size_bittqmask; /* Store the next item in the linked list in a safe place, so we can retrieve it after the assignment */ @@ -280,7 +280,7 @@ static void SFO_hash_rehash( #endif hash->entries = new_entries; hash->size = new_size; - hash->size_bitmask = new_size_bitmask; + hash->size_bittqmask = new_size_bittqmask; } #else |