![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Implementation draft for a configuration system (2008). More...
Go to the source code of this file.
Implementation draft for a configuration system (2008).
This file implements high level typed configuration interfaces.
Definition in file config-typed.c.
Functions | |
| const char * | lumiera_config_link_get (const char *key, const char **value) |
| LumieraConfigitem | lumiera_config_link_set (const char *key, const char **value) |
| const char * | lumiera_config_number_get (const char *key, long long *value) |
| Number signed integer numbers, in different formats (decimal, hex, oct, binary(for masks)) | |
| LumieraConfigitem | lumiera_config_number_set (const char *key, long long *value) |
| const char * | lumiera_config_real_get (const char *key, long double *value) |
| Real floating point number in standard formats (see printf/scanf) | |
| LumieraConfigitem | lumiera_config_real_set (const char *key, long double *value) |
| static char * | scan_string (const char *in) |
| String unquoted string which covers the whole value area and gets chopped or quoted string which preserves leading/trailing spaces either single or double quotes are allowed, doubling the quote in a string escapes it. | |
| const char * | lumiera_config_string_get (const char *key, const char **value) |
| LumieraConfigitem | lumiera_config_string_set (const char *key, const char **value) |
| const char * | lumiera_config_wordlist_get (const char *key, const char **value) |
| Wordlist words delimited by any of " \t,;". | |
| LumieraConfigitem | lumiera_config_wordlist_set (const char *key, const char **value) |
| static char * | scan_word (const char *in) |
| helper function, takes a raw input string and give a tmpbuf with the word parsed back. | |
| const char * | lumiera_config_word_get (const char *key, const char **value) |
| LumieraConfigitem | lumiera_config_word_set (const char *key, const char **value) |
| const char * | lumiera_config_bool_get (const char *key, int *value) |
| Bool Bool in various formats, (0,1(!1), yes/no, true/false, on/off, set/clear) | |
| LumieraConfigitem | lumiera_config_bool_set (const char *key, int *value) |
Variables | |
| LumieraConfig | lumiera_global_config |
| const char * lumiera_config_link_get | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 37 of file config-typed.c.
| LumieraConfigitem lumiera_config_link_set | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 46 of file config-typed.c.
| const char * lumiera_config_number_get | ( | const char * | key, |
| long long * | value | ||
| ) |
Number signed integer numbers, in different formats (decimal, hex, oct, binary(for masks))
Definition at line 60 of file config-typed.c.
References lumiera_config_get(), LUMIERA_ERROR_SET, LUMIERA_ERROR_SET_WARNING, lumiera_global_config, LUMIERA_MUTEX_SECTION, lumiera_tmpbuf_snprintf(), and NULL.
Referenced by TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_config_number_set | ( | const char * | key, |
| long long * | value | ||
| ) |
Definition at line 88 of file config-typed.c.
References lumiera_config_set(), lumiera_global_config, LUMIERA_MUTEX_SECTION, lumiera_tmpbuf_snprintf(), and NULL.
Referenced by TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| const char * lumiera_config_real_get | ( | const char * | key, |
| long double * | value | ||
| ) |
Real floating point number in standard formats (see printf/scanf)
Definition at line 109 of file config-typed.c.
| LumieraConfigitem lumiera_config_real_set | ( | const char * | key, |
| long double * | value | ||
| ) |
Definition at line 118 of file config-typed.c.
|
static |
String unquoted string which covers the whole value area and gets chopped or quoted string which preserves leading/trailing spaces either single or double quotes are allowed, doubling the quote in a string escapes it.
helper function, takes a raw input string and give a tmpbuf with the string parsed back.
Definition at line 140 of file config-typed.c.
References LUMIERA_ERROR_SET, lumiera_tmpbuf_strndup(), and NULL.
Referenced by lumiera_config_string_get().
Here is the call graph for this function:
Here is the caller graph for this function:| const char * lumiera_config_string_get | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 191 of file config-typed.c.
References lumiera_config_get(), LUMIERA_ERROR_SET_WARNING, lumiera_global_config, LUMIERA_MUTEX_SECTION, NULL, and scan_string().
Referenced by TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_config_string_set | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 214 of file config-typed.c.
References lumiera_config_set(), lumiera_global_config, LUMIERA_MUTEX_SECTION, lumiera_tmpbuf_snprintf(), and NULL.
Referenced by TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| const char * lumiera_config_wordlist_get | ( | const char * | key, |
| const char ** | value | ||
| ) |
Wordlist words delimited by any of " \t,;".
Definition at line 236 of file config-typed.c.
References lumiera_config_get(), LUMIERA_ERROR_SET_WARNING, lumiera_global_config, LUMIERA_MUTEX_SECTION, and NULL.
Referenced by lumiera_config_wordlist_find(), and lumiera_config_wordlist_get_nth().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_config_wordlist_set | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 262 of file config-typed.c.
References lumiera_config_set(), lumiera_global_config, LUMIERA_MUTEX_SECTION, lumiera_tmpbuf_snprintf(), and NULL.
Referenced by TEST(), TEST(), TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
helper function, takes a raw input string and give a tmpbuf with the word parsed back.
Definition at line 284 of file config-typed.c.
References lumiera_tmpbuf_strndup().
Referenced by lumiera_config_word_get(), and lumiera_config_word_set().
Here is the call graph for this function:
Here is the caller graph for this function:| const char * lumiera_config_word_get | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 302 of file config-typed.c.
References lumiera_config_get(), LUMIERA_ERROR_SET_WARNING, lumiera_global_config, LUMIERA_MUTEX_SECTION, NULL, and scan_word().
Referenced by TEST(), and TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| LumieraConfigitem lumiera_config_word_set | ( | const char * | key, |
| const char ** | value | ||
| ) |
Definition at line 325 of file config-typed.c.
References lumiera_config_set(), lumiera_global_config, LUMIERA_MUTEX_SECTION, lumiera_tmpbuf_snprintf(), NULL, and scan_word().
Referenced by TEST().
Here is the call graph for this function:
Here is the caller graph for this function:| const char * lumiera_config_bool_get | ( | const char * | key, |
| int * | value | ||
| ) |
Bool Bool in various formats, (0,1(!1), yes/no, true/false, on/off, set/clear)
Definition at line 346 of file config-typed.c.
| LumieraConfigitem lumiera_config_bool_set | ( | const char * | key, |
| int * | value | ||
| ) |
Definition at line 356 of file config-typed.c.
|
extern |
Definition at line 73 of file config.c.
Referenced by lumiera_config_number_get(), lumiera_config_number_set(), lumiera_config_string_get(), lumiera_config_string_set(), lumiera_config_word_get(), lumiera_config_word_set(), lumiera_config_wordlist_get(), and lumiera_config_wordlist_set().