diff --git a/src/backend/config.c b/src/backend/config.c index 731567596..ce6da174f 100644 --- a/src/backend/config.c +++ b/src/backend/config.c @@ -194,7 +194,7 @@ lumiera_config_get_default (const char* key, const char** value) int ret = -1; TODO ("follow '<' delegates?"); - TODO ("refactor _get and get_default to iterator access"); + TODO ("refactor _get and get_default to iterator access (return LList or Lookupentry)"); LumieraConfigitem item = lumiera_config_lookup_item_tail_find (&lumiera_global_config->keys, key); if (item && item->parent == &lumiera_global_config->defaults) @@ -220,7 +220,7 @@ lumiera_config_set (const char* key, const char* delim_value) TODO (" find matching suffix"); TODO (" find proper prefix indentation, else use config.indent"); TODO (" create configitem with prefix/suffix removed"); - + // * set a value by key diff --git a/src/backend/config.h b/src/backend/config.h index f0df796db..fea04b3b6 100644 --- a/src/backend/config.h +++ b/src/backend/config.h @@ -80,7 +80,7 @@ struct lumiera_config_struct We use rwlocks here since concurrent reads are likely common. So far this is a global config lock, if this is a problem we might granularize it by locking on a file level. - config access is not planned to be transaction al yet, if this is a problem we need to expose the rwlock to a config_acquire/config_release function pair + config access is not planned to be transactional yet, if this is a problem we need to expose the rwlock to a config_acquire/config_release function pair */ lumiera_rwlock lock; }; diff --git a/src/backend/configitem.c b/src/backend/configitem.c index 0d7830b87..917676251 100644 --- a/src/backend/configitem.c +++ b/src/backend/configitem.c @@ -146,6 +146,7 @@ lumiera_configitem_move (LumieraConfigitem self, LumieraConfigitem source) self->key_size = source->key_size; self->delim = source->delim; self->vtable = source->vtable; + return self; } @@ -296,20 +297,20 @@ lumiera_configitem_parse (LumieraConfigitem self, const char* line) /* skip blanks */ itr += self->key_size; - while (*itr && isspace(*itr)) + while (*itr && isspace (*itr)) itr++; if (self->key_size && *itr == '=') { /*this configentry assigns a value to a key*/ self->delim = itr; - self->vtable = &lumiera_configentry_funcs; + self->vtable = &lumiera_configentry_funcs; } else if (self->key_size && *itr == '<') { /*this configentry is a redirect*/ self->delim = itr; - self->vtable = &lumiera_configentry_funcs; + self->vtable = &lumiera_configentry_funcs; } else {