[insert project logo here (125x200px max)]

Navigator

Mailinglists

Please report any errors or ommissions you find to our `Help' mailinglist, or post a message in the Forums.

Copyright and Licensing Information

Snap is (c) Jonathan T. Moore, 1999-2002 and licensed under the GNU General Public License (GPL).

All other parts of Splash are (c) Willem de Bruijn, 2002-2003 and licensed under the BSD Open Source License.

All sourcecode is made publicly available.

Acknowledgement

Splash and the Splash website are hosted by SourceForge.net

SourceForge.net Logo

osi-open source certified logo

Splash - Documentation

SNMP Plus a Lightweight API for SNAP Handling

Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

snap_svc/snap_svc_memmap_hash.c File Reference

#include <string.h>
#include <assert.h>
#include "snap_svc_memmap_hash_list.h"
#include "snap_svc_memmap_hash.h"
#include "d_printf.h"

Include dependency graph for snap_svc_memmap_hash.c:

Include dependency graph

Go to the source code of this file.


Functions

int hash_string (char *s)
hash_table_tht_create (int sz, int(*cmp)(const void *, const void *), int(*hash)(void *))
void ht_insert (hash_table_t *t, void *key, void *val)
void * ht_lookup (hash_table_t *t, void *key)
void ht_remove (hash_table_t *t, void *key)

Variables

int ht_errno = 0

Function Documentation

int hash_string char *    s
 

Definition at line 17 of file snap_svc_memmap_hash.c.

hash_table_t* ht_create int    sz,
int(*    cmp)(const void *, const void *),
int(*    hash)(void *)
 

Definition at line 37 of file snap_svc_memmap_hash.c.

References hash_table_t::cmp, hash_table_t::hash, hash_table_t::max_len, memalloc, hash_table_t::tab, and hash_table_t::tab_sz.

Referenced by snap_external_svclib_init(), and snap_svc_table_init().

void ht_insert hash_table_t   t,
void *    key,
void *    val
 

Definition at line 69 of file snap_svc_memmap_hash.c.

References cons(), d_printf(), hash_table_t::hash, pair_t::key, length_list(), hash_table_t::max_len, memalloc, hash_table_t::tab, hash_table_t::tab_sz, and pair_t::value.

Referenced by snap_svc_memmap_add_string(), snap_svc_memmap_add_value(), and snap_svc_table_add().

void* ht_lookup hash_table_t   t,
void *    key
 

Definition at line 112 of file snap_svc_memmap_hash.c.

References hash_table_t::cmp, d_printf(), hash_table_t::hash, hash_table_t::tab, and hash_table_t::tab_sz.

Referenced by snap_svc_memmap_lookup_int(), snap_svc_memmap_lookup_string(), and snap_svc_table_find().

void ht_remove hash_table_t   t,
void *    key
 

Definition at line 125 of file snap_svc_memmap_hash.c.

References hash_table_t::cmp, hash_table_t::hash, pair_t::key, l::next, hash_table_t::tab, hash_table_t::tab_sz, and l::v.

Referenced by snap_svc_memmap_del().


Variable Documentation

int ht_errno = 0
 

Definition at line 34 of file snap_svc_memmap_hash.c.