Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Implementation of a draft for application configuration from 2008.
Definition in file config.c.
#include "include/logging.h"
#include "lib/safeclib.h"
#include "lib/tmpbuf.h"
#include "common/config.h"
#include <stdint.h>
#include <stdlib.h>
#include <ctype.h>
Functions | |
void | lumiera_config_destroy () |
Destroys the configuration subsystem. More... | |
void | lumiera_config_dump (FILE *out) |
Does a diagnostic dump of the whole config database. | |
const char * | lumiera_config_get (const char *key, const char **value) |
const char * | lumiera_config_get_default (const char *key, const char **value) |
int | lumiera_config_info (const char *key, const char **filename, unsigned *line) |
int | lumiera_config_init (const char *path) |
Initialise the configuration subsystem. More... | |
int | lumiera_config_load (const char *file) |
int | lumiera_config_purge (const char *filename) |
int | lumiera_config_reset (const char *key) |
int | lumiera_config_save () |
LumieraConfigitem | lumiera_config_set (const char *key, const char *delim_value) |
LumieraConfigitem | lumiera_config_setdefault (const char *line) |
Installs a default value for a config key. More... | |
LUMIERA_ERROR_DEFINE (CONFIG_SYNTAX, "syntax error in configfile") | |
LUMIERA_ERROR_DEFINE (CONFIG_SYNTAX_KEY, "syntax error in key") | |
LUMIERA_ERROR_DEFINE (CONFIG_SYNTAX_VALUE, "syntax error in value") | |
LUMIERA_ERROR_DEFINE (CONFIG_NO_ENTRY, "no configuration entry") | |
Variables | |
const char * | lumiera_config_defaults [] |
defaults for the configuration system itself More... | |
LumieraConfig | lumiera_global_config = NULL |
int lumiera_config_init | ( | const char * | path | ) |
void lumiera_config_destroy | ( | ) |
LumieraConfigitem lumiera_config_set | ( | const char * | key, |
const char * | delim_value | ||
) |
key | |
delim_value | delimiter (= or <) followed by the value to be set |
Definition at line 232 of file config.c.
References lumiera_config_lookup_item_find().
LumieraConfigitem lumiera_config_setdefault | ( | const char * | line | ) |
Installs a default value for a config key.
Any key might have an associated default value which is used when no other configuration is available, this can be set once. Any subsequent call will be a no-op. This function locks the config system.
line | line with key, delimiter and value to store as default value |
Definition at line 274 of file config.c.
Referenced by lumiera_plugin_discover().
const char* lumiera_config_defaults[] |
defaults for the configuration system itself