Definition in file treeconf.h.
#include <treeconf/treeconf_err.h>
#include <treeconf/treeconf_version.h>
Include dependency graph for treeconf.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _treeconf_ctx_s |
Treeconf context structure. More... | |
struct | _treeconf_node_s |
Treeconf node structure. More... | |
struct | _treeconf_str_s |
Treeconf string structure. More... | |
struct | _treeconf_subst_s |
Treeconf substitution structure. More... | |
Defines | |
#define | TC_BEGIN_C_DECLS |
Begin declaration in C namespace. | |
#define | TC_END_C_DECLS |
End declaration in C namespace. | |
#define | TREECONF_CTX_MAGIC |
Treeconf context magic number. | |
#define | TREECONF_CTX_INIT |
Configuration context initializer. | |
#define | tx_verify(ctx) |
Context verification macro. | |
#define | tx_config(ctx) |
Context configuration node pointer. | |
#define | tx_count(ctx) |
Context configuration node count. | |
#define | tc_init(ctx) |
Configuration context dynamic initializer. | |
#define | TREECONF_NODE_MAGIC |
Treeconf node magic number. | |
#define | tn_verify(node) |
Configuration node verification macro. | |
#define | tn_context(node) |
Configuration node context. | |
#define | tn_type(node) |
Configuration node type. | |
#define | tn_next(node) |
Next configuration node. | |
#define | tn_down(node) |
Child configuration node. | |
#define | tn_parent(node) |
Parent configuration node. | |
#define | tn_nodown(node) |
Implicit registration callback function. | |
#define | tn_change(node) |
Value change callback function. | |
#define | tn_value(node) |
Variable value. | |
#define | tn_default(node) |
Variable default value. | |
#define | tn_assoc(node) |
Association data. | |
#define | tn_name(node) |
Node name. | |
#define | tn_isdef(node) |
Node value is default? | |
#define | ts_string(strs, n) |
String pointer. | |
#define | ts_length(strs, n) |
String length. | |
#define | TC_SUBST_INSECURE |
Insecure substitution flag. | |
#define | TC_SUBST_IGNORE |
Ignore substitution flag. | |
#define | TC_SUBST_INIT(chr, str, flags) |
Substitution static initializer. | |
#define | tu_char(sub) |
Substitution rule character. | |
#define | tu_value(sub) |
Substitution value. | |
#define | tu_flags(sub) |
Substitution flags. | |
#define | TC_PATH_SECURE |
Prohibit insecure substitutions. | |
#define | TC_PATH_ALL |
Search all files in the path. | |
Typedefs | |
typedef _treeconf_ctx_s | treeconf_ctx_t |
Configuration context. | |
typedef _treeconf_node_s | treeconf_node_t |
Configuration node. | |
typedef _treeconf_str_s | treeconf_str_t |
Configuration strings. | |
typedef _treeconf_subst_s | treeconf_subst_t |
Path substitutions. | |
typedef int(* | treeconf_nodown_t )(treeconf_ctx_t *ctx, treeconf_node_t *parent, treeconf_str_t *name, int elements) |
Unregistered variable callback. | |
typedef void(* | treeconf_change_t )(treeconf_ctx_t *ctx, treeconf_node_t *node) |
Variable change callback. | |
typedef unsigned int(* | treeconf_file_t )(const char *file, void *data) |
Path callback. | |
Enumerations | |
enum | treeconf_type_t { TC_NODETYPE_VARIABLE, TC_NODETYPE_NODE, TC_NODETYPE_IMPLICIT, TC_NODETYPE_MASK } |
Node type. More... | |
Functions | |
unsigned int | tc_break (treeconf_str_t **str_p, int *cnt_p, const char *name, const char *delims) |
Break a string into an array of components. | |
unsigned int | tc_path (const char *path, const char *def, treeconf_subst_t substs[], int s_cnt, unsigned int flags, treeconf_file_t call, void *call_data) |
Search a path-like string for readable files. | |
unsigned int | tc_destroy (treeconf_ctx_t *ctx) |
Destroy a context. | |
unsigned int | tc_register (treeconf_ctx_t *ctx, const char *name, const char *def, treeconf_node_t *parent, treeconf_nodown_t nodown, treeconf_change_t change, void *assoc) |
Register a configuration variable. | |
unsigned int | tc_set (treeconf_ctx_t *ctx, const char *name, const char *value, treeconf_node_t *parent) |
Set a variable to a given value. | |
unsigned int | tc_get (treeconf_ctx_t *ctx, const char *name, const char **value, treeconf_node_t *parent) |
Get the value of a variable. | |
unsigned int | tc_find (treeconf_ctx_t *ctx, const char *name, treeconf_node_t **node, treeconf_node_t *parent) |
Obtain a pointer to a given node. | |
unsigned int | tc_load (const char *file, void *ctx) |
Load a configuration file. |
|
For internal use only.
This macro is defined to Definition at line 62 of file treeconf.h. |
|
For internal use only.
This macro is defined to Definition at line 63 of file treeconf.h. |