File nut/gorp/hashtable/shash.c


Included Files


Typedef SHNODE

typedef struct node_struct* SHNODE
struct node_struct  
   {  
      char flag;  
      struct node_struct* next;  
      char* key;  
      void* val;  
   }  

Type struct string_hash_table_struct

struct string_hash_table_struct
struct string_hash_table_struct  
   {  
      int prime;  
      SHNODE zen;  
   }  

Global Function SHashForEach()

void SHashForEach ( SHASH hash, SHASH_CB cb, void* arg )
Prototyped in: nut/include/gorp/shash.h

Global Function SHashFree()

void SHashFree ( SHASH hash )
Prototyped in: nut/include/gorp/shash.h
Calls: free() nut/crt/malloc.c

Global Function SHashGet()

void* SHashGet ( SHASH hash, const char* key )
Prototyped in: nut/include/gorp/shash.h
Calls: SHashFindNode() nut/gorp/hashtable/shash.c
  StrToHash() nut/gorp/hashtable/shash.c

Global Function SHashInit()

SHASH SHashInit ( int prime )
Prototyped in: nut/include/gorp/shash.h
Calls: malloc() nut/crt/malloc.c
  memset() nut/c/string/memset.c

Global Function SHashSet()

void SHashSet ( SHASH hash, char* key, void* val )
Prototyped in: nut/include/gorp/shash.h
Calls: SHashDoSet() nut/gorp/hashtable/shash.c

Global Function SHashStore()

void SHashStore ( SHASH hash, const char* key, int key_len, void* val, int value_len )
Prototyped in: nut/include/gorp/shash.h
Calls: SHashDoSet() nut/gorp/hashtable/shash.c
  malloc() nut/crt/malloc.c
  memcpy() nut/c/string/memcpy.c

Local Function SHashDoSet()

static void SHashDoSet ( SHASH hash, char* key, void* val, char flag )
Calls: SHashFindNode() nut/gorp/hashtable/shash.c
  StrToHash() nut/gorp/hashtable/shash.c
  free() nut/crt/malloc.c
  malloc() nut/crt/malloc.c
Called by: SHashSet() nut/gorp/hashtable/shash.c
  SHashStore() nut/gorp/hashtable/shash.c

Local Function SHashFindNode()

static SHNODE SHashFindNode ( SHNODE node, const char* key )
Calls: strcmp() nut/c/string/strcmp.c
Called by: SHashDoSet() nut/gorp/hashtable/shash.c
  SHashGet() nut/gorp/hashtable/shash.c

Local Function StrToHash()

static int32_t StrToHash ( const char* str )
Called by: SHashDoSet() nut/gorp/hashtable/shash.c
  SHashGet() nut/gorp/hashtable/shash.c