From 10b81bea2d58d01ef461058945652e25622b03e7 Mon Sep 17 00:00:00 2001 From: Ian C Date: Thu, 5 May 2011 06:38:22 +0000 Subject: Chaned hash_t to be map_t, as we're purposefully hashing on the maps now. --- dbox.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'dbox.c') 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; -- cgit v1.2.3