add a diagnostic config dump function
This commit is contained in:
parent
21db988e18
commit
fa54fb9bc2
2 changed files with 27 additions and 1 deletions
|
|
@ -274,6 +274,25 @@ lumiera_config_setdefault (const char* line)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
lumiera_config_dump (FILE* out)
|
||||||
|
{
|
||||||
|
fprintf (out, "# registered defaults:\n");
|
||||||
|
|
||||||
|
LLIST_FOREACH (&lumiera_global_config->defaults.childs, node)
|
||||||
|
fprintf (out, "%s\n", ((LumieraConfigitem) node)->line);
|
||||||
|
|
||||||
|
fprintf (out, "# end of defaults\n\n");
|
||||||
|
|
||||||
|
#if 0 /*TODO UNIMPLEMENTED */
|
||||||
|
fprintf (out, "# files:\n");
|
||||||
|
lumiera_configitem files;
|
||||||
|
fprintf (out, "# volatiles:")
|
||||||
|
lumiera_configitem TODO_unknown;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
lumiera_config_reset (const char* key)
|
lumiera_config_reset (const char* key)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ LUMIERA_ERROR_DECLARE (CONFIG_DEFAULT);
|
||||||
|
|
||||||
//TODO: System includes//
|
//TODO: System includes//
|
||||||
#include <nobug.h>
|
#include <nobug.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
|
|
@ -153,6 +153,13 @@ int
|
||||||
lumiera_config_purge (const char* filename);
|
lumiera_config_purge (const char* filename);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does a diagnostic dump of the whole config database
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
lumiera_config_dump (FILE* out);
|
||||||
|
|
||||||
|
|
||||||
// * {{{ lumiera_config_get(...) }}}
|
// * {{{ lumiera_config_get(...) }}}
|
||||||
// * get a value by key
|
// * get a value by key
|
||||||
// * handles internally everything as string:string key:value pair.
|
// * handles internally everything as string:string key:value pair.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue