]> git.pond.sub.org Git - empserver/blobdiff - src/lib/as/as_hash.c
New path finder
[empserver] / src / lib / as / as_hash.c
index 9311dfc44bbeeb2c92134d18d1ec41f61242c496..c211befca9a311453ccd0b75acd30ab6410cb7c9 100644 (file)
@@ -17,7 +17,9 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-#include <stdio.h>
+
+#include <config.h>
+
 #include <stdlib.h>
 #include "as.h"
 
@@ -31,13 +33,13 @@ as_iscinq(struct as_data *adp, struct as_coord c)
     int hashval;
     struct as_hash *hp;
 
-    hashval = (*adp->hash) (c) % adp->hashsize;
+    hashval = adp->hash(c) % adp->hashsize;
 
     for (hp = adp->hashtab[hashval]; hp; hp = hp->next)
        if (hp->c.x == c.x && hp->c.y == c.y)
-           return (hp->qp);
+           return hp->qp;
 
-    return (NULL);
+    return NULL;
 }
 
 /*
@@ -54,7 +56,7 @@ as_setcinq(struct as_data *adp, struct as_coord c, struct as_queue *qp)
     new->c = c;
     new->qp = qp;
 
-    hashval = (*adp->hash) (c) % adp->hashsize;
+    hashval = adp->hash(c) % adp->hashsize;
     hp = adp->hashtab[hashval];
 
     new->next = (hp) ? hp : NULL;