summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2011-05-05 06:38:22 +0000
committerIan C <ianc@noddybox.co.uk>2011-05-05 06:38:22 +0000
commit10b81bea2d58d01ef461058945652e25622b03e7 (patch)
tree1eb2c85b690a080e617e910fecb87e24abd730a9
parent17de52dd5af88940356462defba5d84e4b2eed1e (diff)
Chaned hash_t to be map_t, as we're purposefully hashing on the maps now.
-rw-r--r--dbox.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dbox.c b/dbox.c
index af18ccd..173c9f2 100644
--- a/dbox.c
+++ b/dbox.c
@@ -53,7 +53,6 @@ static const char ident[]="$Id$";
/* ---------------------------------------- TYPES
*/
typedef unsigned long long map_t;
-typedef map_t hash_t;
typedef char route_t[MAX_ROUTE+1];
typedef enum {SPACE_GL=' ',
@@ -84,7 +83,7 @@ typedef struct state_t
int path;
int dir;
int pushed;
- hash_t hash;
+ map_t hash;
struct state_t *left;
struct state_t *right;
struct state_t *up;
@@ -616,7 +615,7 @@ static map_t *CreateMap(const level_t *p_level, const state_t *p_state)
}
-static hash_t ROL(map_t p_val, int p_bits)
+static map_t ROL(map_t p_val, int p_bits)
{
while(p_bits--)
{
@@ -629,10 +628,10 @@ static hash_t ROL(map_t p_val, int p_bits)
/* This is slightly better than the previous hash
*/
-static hash_t CreateHash(const level_t *p_level, const state_t *p_state)
+static map_t CreateHash(const level_t *p_level, const state_t *p_state)
{
map_t *m;
- hash_t hash;
+ map_t hash;
int f;
m = CreateMap(p_level, p_state);
@@ -681,7 +680,7 @@ static int AddNewState(const level_t *p_level, const state_t *p_state)
{
cache_t *p;
map_t *map;
- hash_t hash;
+ map_t hash;
hash = p_state->hash % CACHE_SIZE;