Index: libadt/generic/hash_table.c
===================================================================
--- libadt/generic/hash_table.c	(revision ee7736e64ecd4cd5308f4da73ff749ed08389b37)
+++ libadt/generic/hash_table.c	(revision d73942cecc6f4f79f742d7a243cb57cffc219ceb)
@@ -36,4 +36,6 @@
 #include <malloc.h>
 #include <assert.h>
+#include <stdio.h>
+#include <string.h>
 
 /** Create chained hash table.
@@ -43,18 +45,20 @@
  * @param max_keys Maximal number of keys needed to identify an item.
  * @param op Hash table operations structure.
+ * @return true on success
  */
-void hash_table_create(hash_table_t *h, hash_count_t m, hash_count_t max_keys, hash_table_operations_t *op)
+int hash_table_create(hash_table_t *h, hash_count_t m, hash_count_t max_keys, hash_table_operations_t *op)
 {
-	int i;
+	hash_count_t i;
 
-	ASSERT(h);
-	ASSERT(op && op->hash && op->compare);
-	ASSERT(max_keys > 0);
+	assert(h);
+	assert(op && op->hash && op->compare);
+	assert(max_keys > 0);
 	
-	h->entry = malloc(m * sizeof(link_t *), 0);
+	h->entry = malloc(m * sizeof(link_t *));
 	if (!h->entry) {
-		panic("cannot allocate memory for hash table\n");
+		printf("cannot allocate memory for hash table\n");
+		return false;
 	}
-	memsetb((__address) h->entry, m * sizeof(link_t *), 0);
+	memset((void *) h->entry, 0,  m * sizeof(link_t *));
 	
 	for (i = 0; i < m; i++)
@@ -64,4 +68,5 @@
 	h->max_keys = max_keys;
 	h->op = op;
+	return true;
 }
 
@@ -72,13 +77,13 @@
  * @param item Item to be inserted into the hash table.
  */
-void hash_table_insert(hash_table_t *h, __native key[], link_t *item)
+void hash_table_insert(hash_table_t *h, unsigned long key[], link_t *item)
 {
 	hash_index_t chain;
 
-	ASSERT(item);
-	ASSERT(h && h->op && h->op->hash && h->op->compare);
+	assert(item);
+	assert(h && h->op && h->op->hash && h->op->compare);
 
 	chain = h->op->hash(key);
-	ASSERT(chain < h->entries);
+	assert(chain < h->entries);
 	
 	list_append(item, &h->entry[chain]);
@@ -92,13 +97,13 @@
  * @return Matching item on success, NULL if there is no such item.
  */
-link_t *hash_table_find(hash_table_t *h, __native key[])
+link_t *hash_table_find(hash_table_t *h, unsigned long key[])
 {
 	link_t *cur;
 	hash_index_t chain;
 
-	ASSERT(h && h->op && h->op->hash && h->op->compare);
+	assert(h && h->op && h->op->hash && h->op->compare);
 
 	chain = h->op->hash(key);
-	ASSERT(chain < h->entries);
+	assert(chain < h->entries);
 	
 	/*
@@ -126,11 +131,11 @@
  * @param keys Number of keys in the 'key' array.
  */
-void hash_table_remove(hash_table_t *h, __native key[], hash_count_t keys)
+void hash_table_remove(hash_table_t *h, unsigned long key[], hash_count_t keys)
 {
 	hash_index_t chain;
 	link_t *cur;
 
-	ASSERT(h && h->op && h->op->hash && h->op->compare && h->op->remove_callback);
-	ASSERT(keys <= h->max_keys);
+	assert(h && h->op && h->op->hash && h->op->compare && h->op->remove_callback);
+	assert(keys <= h->max_keys);
 	
 	if (keys == h->max_keys) {
