Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

hi_util_kmap.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "hi_util_kmap.h"
#include "hi_util_xmalloc.h"

Go to the source code of this file.

Defines

#define MEMASSERT(p)
#define LOWERCASE   tolower

Functions

static void * s_malloc (int n)
static void s_free (void *p)
KMAPKMapNew (void(*userfree)(void *p))
void KMapSetNoCase (KMAP *km, int flag)
static int KMapFreeNodeList (KMAP *km)
static void KMapFreeNode (KMAP *km, KMAPNODE *r)
void KMapDelete (KMAP *km)
static KEYNODEKMapAddKeyNode (KMAP *km, void *key, int n, void *userdata)
static KMAPNODEKMapCreateNode (KMAP *km)
int KMapAdd (KMAP *km, void *key, int n, void *userdata)
void * KMapFind (KMAP *ks, void *key, int n)
KEYNODEKMapFindFirstKey (KMAP *km)
void * KMapFindFirst (KMAP *km)
KEYNODEKMapFindNextKey (KMAP *km)
void * KMapFindNext (KMAP *km)


Define Documentation

#define LOWERCASE   tolower
 

Definition at line 33 of file hi_util_kmap.c.

Referenced by KMapAdd(), and KMapFind().

#define MEMASSERT  ) 
 

Definition at line 32 of file hi_util_kmap.c.


Function Documentation

int KMapAdd KMAP km,
void *  key,
int  n,
void *  userdata
 

Definition at line 205 of file hi_util_kmap.c.

References _kmapnode::child, KMapAddKeyNode(), KMapCreateNode(), _kmapnode::knode, LOWERCASE, _kmap::nocase, _kmapnode::nodechar, _kmap::root, and _kmapnode::sibling.

Referenced by hi_ui_server_lookup_add().

static KEYNODE* KMapAddKeyNode KMAP km,
void *  key,
int  n,
void *  userdata
[static]
 

Definition at line 147 of file hi_util_kmap.c.

References _keynode::key, _kmap::keylist, memcpy, memset, _keynode::next, _keynode::nkey, s_malloc(), and _keynode::userdata.

Referenced by KMapAdd().

static KMAPNODE* KMapCreateNode KMAP km  )  [static]
 

Definition at line 179 of file hi_util_kmap.c.

References memset, _kmap::nchars, NULL, and s_malloc().

Referenced by KMapAdd().

void KMapDelete KMAP km  ) 
 

Definition at line 123 of file hi_util_kmap.c.

References KMapFreeNode(), KMapFreeNodeList(), _kmap::root, and s_free().

void* KMapFind KMAP ks,
void *  key,
int  n
 

Definition at line 349 of file hi_util_kmap.c.

References _kmapnode::child, _kmapnode::knode, LOWERCASE, _kmap::nocase, _kmapnode::nodechar, NULL, _kmap::root, _kmapnode::sibling, and _keynode::userdata.

Referenced by hi_ui_server_lookup_find().

void* KMapFindFirst KMAP km  ) 
 

Definition at line 429 of file hi_util_kmap.c.

References _kmap::keylist, _kmap::keynext, NULL, and _keynode::userdata.

Referenced by hi_ui_server_lookup_first().

KEYNODE* KMapFindFirstKey KMAP km  ) 
 

Definition at line 415 of file hi_util_kmap.c.

References _kmap::keylist, _kmap::keynext, and NULL.

void* KMapFindNext KMAP km  ) 
 

Definition at line 458 of file hi_util_kmap.c.

References _kmap::keynext, _keynode::next, and _keynode::userdata.

Referenced by hi_ui_server_lookup_next().

KEYNODE* KMapFindNextKey KMAP km  ) 
 

Definition at line 443 of file hi_util_kmap.c.

References _kmap::keynext, and _keynode::next.

static void KMapFreeNode KMAP km,
KMAPNODE r
[static]
 

Definition at line 106 of file hi_util_kmap.c.

References _kmapnode::child, s_free(), and _kmapnode::sibling.

Referenced by KMapDelete().

static int KMapFreeNodeList KMAP km  )  [static]
 

Definition at line 82 of file hi_util_kmap.c.

References _keynode::key, _kmap::keylist, _keynode::next, s_free(), _keynode::userdata, and _kmap::userfree.

Referenced by KMapDelete().

KMAP* KMapNew void(*)(void *p)  userfree  ) 
 

Definition at line 59 of file hi_util_kmap.c.

References memset, s_malloc(), and _kmap::userfree.

Referenced by hi_ui_server_lookup_init().

void KMapSetNoCase KMAP km,
int  flag
 

Definition at line 74 of file hi_util_kmap.c.

References _kmap::nocase.

static void s_free void *  p  )  [static]
 

Definition at line 52 of file hi_util_kmap.c.

References xfree().

Referenced by KMapDelete(), KMapFreeNode(), KMapFreeNodeList(), sfghash_delete(), sfghash_free_node(), sflist_remove_current(), sflist_remove_head(), sflist_remove_tail(), sfxhash_delete(), sfxhash_free(), and sfxhash_free_node().

static void* s_malloc int  n  )  [static]
 

Definition at line 38 of file hi_util_kmap.c.

References MEMASSERT, and xmalloc().

Referenced by KMapAddKeyNode(), KMapCreateNode(), KMapNew(), sfghash_add(), sfghash_new(), sflist_add_before(), sflist_add_head(), sflist_add_tail(), sflist_new(), sfxhash_alloc(), sfxhash_new(), and sfxhash_newnode().


Generated on Sun May 14 14:51:25 2006 by  doxygen 1.4.2