38cmp_fn (
const void* a,
const void* b);
52 TRACE (configlookup_dbg);
61 TRACE (configlookup_dbg);
71 TRACE (configlookup_dbg,
"%s", item->line);
75 REQUIRE (item->key_size);
93 TRACE (configlookup_dbg,
"%s", item->line);
97 REQUIRE (item->key_size);
115 TRACE (configlookup_dbg,
"%s", item->line);
116 REQUIRE (!llist_is_empty (&item->lookup),
"item is not in a lookup");
118 if (llist_is_single (&item->lookup))
122 llist_unlink (&item->lookup);
128 llist_unlink (&item->lookup);
138 TRACE (configlookup_dbg,
"%s", key);
146 TRACE (configlookup_dbg,
"%s", key);
151 if (entry && !llist_is_empty (&entry->configitems))
161 TRACE (configlookup_dbg,
"%s", key);
166 if (entry && !llist_is_empty (&entry->configitems))
179 TRACE (configlookup_dbg,
"%s", key);
183 llist_init (&self->configitems);
200 TRACE (configlookup_dbg);
203 REQUIRE (llist_is_empty (&self->configitems),
"lookup node still in use");
219 return strcmp ((
const char*)a, (
const char*)b);
LumieraConfigitem lumiera_config_lookup_item_find(LumieraConfigLookup self, const char *key)
Find a the topmost config item stored to a given key.
LumieraConfigLookup lumiera_config_lookup_destroy(LumieraConfigLookup self)
Destroy a lookup structure.
LumieraConfigLookupentry lumiera_config_lookup_insert(LumieraConfigLookup self, LumieraConfigitem item)
Add a config item to a lookup structure.
LumieraConfigLookupentry lumiera_config_lookupentry_destroy(LumieraConfigLookupentry self)
static const void * key_fn(const PSplaynode node)
LumieraConfigLookup lumiera_config_lookup_init(LumieraConfigLookup self)
Initialise a lookup structure.
LumieraConfigLookupentry lumiera_config_lookupentry_new(const char *key)
LumieraConfigLookupentry lumiera_config_lookup_find(LumieraConfigLookup self, const char *key)
Find a hashtable entry in the lookup structure.
LumieraConfigitem lumiera_config_lookup_remove(LumieraConfigLookup self, LumieraConfigitem item)
Remove a config item from a lookup structure.
void lumiera_config_lookupentry_delete(LumieraConfigLookupentry self)
static int cmp_fn(const void *a, const void *b)
LumieraConfigLookupentry lumiera_config_lookupentry_init(LumieraConfigLookupentry self, const char *key)
LumieraConfigLookupentry lumiera_config_lookup_insert_default(LumieraConfigLookup self, LumieraConfigitem item)
static void delete_fn(PSplaynode node)
LumieraConfigitem lumiera_config_lookup_item_tail_find(LumieraConfigLookup self, const char *key)
Find a the bottom most config item stored to a given key.
Lookup of configuration keys in a low-level configuration system.
lumiera_config_lookup * LumieraConfigLookup
lumiera_config_lookupentry * LumieraConfigLookupentry
Interface for a lumiera configuration system (draft).
lumiera_configitem * LumieraConfigitem
#define LUMIERA_ERROR_DEFINE(err, msg)
Definition and initialisation of an error constant.
#define llist_insert_tail(list, element)
#define LLIST_TO_STRUCTP(llist, type, member)
cast back from a member of a structure to a pointer of the structure
#define llist_insert_head(list, element)
This header is for including and configuring NoBug.
PSplay psplay_init(PSplay self, psplay_cmp_fn cmp, psplay_key_fn key, psplay_delete_fn del)
Initialize a splay tree.
PSplay psplay_destroy(PSplay self)
Destroy a splay tree Frees all elements and associated resources of a splay tree.
PSplaynode psplay_insert(PSplay self, PSplaynode node, int splayfactor)
Insert a element into a splay tree.
PSplaynode psplaynode_init(PSplaynode self)
Initialise a splay tree node The user has to place this nodes within his datastructure and must Initi...
void psplay_delete_node(PSplay self, PSplaynode node)
Delete a node from a splay tree.
PSplaynode psplay_find(PSplay self, const void *key, int splayfactor)
Find a element in a splay tree.
char * lumiera_strndup(const char *str, size_t len)
Duplicate a C string.
void * lumiera_malloc(size_t size)
Allocate memory.
Portable and safe wrappers around some C-Lib functions.
static void lumiera_free(void *mem)
Free previously allocated memory.
char * lumiera_tmpbuf_strcat3(const char *str1, size_t str1_len, const char *str2, size_t str2_len, const char *str3, size_t str3_len)
Concat up to 3 strings in a tmpbuf.
char * lumiera_tmpbuf_snprintf(size_t size, const char *fmt,...)
Construct a string in a tmpbuf.
Round robin temporary buffers.