some cosmetics
This commit is contained in:
parent
fa54fb9bc2
commit
a95ae05ddb
3 changed files with 7 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue