X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fstruct%2Fhashtable.c;h=d895fe7559255a6059c3900a816ae4f32edc0a21;hb=4d8a6a97c6c0e15296b51d5f02674079bede1aa0;hp=6f5471dd7fb7680be18e09529033eda7a98d9497;hpb=56bc36208843a05a8879f31a1b1a6bcb0f1de176;p=bertos.git diff --git a/bertos/struct/hashtable.c b/bertos/struct/hashtable.c index 6f5471dd..d895fe75 100644 --- a/bertos/struct/hashtable.c +++ b/bertos/struct/hashtable.c @@ -78,11 +78,12 @@ * the common case (external keys) both can be used. * * - * \version $Id$ * \author Giovanni Bajo */ #include "hashtable.h" + +#include "cfg/cfg_hashtable.h" #include #include #include //ROTL(), ROTR(); @@ -284,92 +285,3 @@ const void* ht_find(struct HashTable* ht, const void* key, uint8_t key_length) return *node; } - - -#if 0 - -#include - -bool ht_test(void); - -static const void* test_get_key(const void* ptr, uint8_t* length) -{ - const char* s = ptr; - *length = strlen(s); - return s; -} - -#define NUM_ELEMENTS 256 -DECLARE_HASHTABLE_STATIC(test1, 256, test_get_key); -DECLARE_HASHTABLE_INTERNALKEY_STATIC(test2, 256); - -static char data[NUM_ELEMENTS][10]; -static char keydomain[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; - -static bool single_test(void) -{ - int i; - - ht_init(&test1); - ht_init(&test2); - - for (i=0;i