For internal use only.
This file contains the various structures, macros, and function declarations used internally by the library.
Definition in file treeconf_int.h.
#include <stdlib.h>
#include "tc_config.h"
#include "treeconf_err.h"
#include "treeconf_version.h"
#include "treeconf.h"
Include dependency graph for treeconf_int.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | result |
Node lookup results. More... | |
Defines | |
#define | __TREECONF_LIBRARY__ |
Library sentinel. | |
#define | __attribute__(A) |
GCC attribute declarator. | |
#define | RCSTAG(tag) |
Embed RCS revision information. | |
#define | TC_BUFSIZE |
Buffer size for tc_load(). | |
#define | TC_NAMSIZE |
Variable name size for tc_load(). | |
#define | _tn_call_nodown(parent, name, elements) |
Call nodown callback. | |
#define | _tn_call_change(node) |
Call change callback. | |
#define | _tc_doerror(e) |
Jump to error handling code. | |
#define | _tc_release_node(node) |
Release a specific node. | |
Functions | |
unsigned int | _tc_lookup_node (treeconf_ctx_t *ctx, const char *name, treeconf_node_t *node, struct result *res) |
Node look-up helper function. | |
treeconf_node_t * | _tc_create_node (treeconf_ctx_t *ctx, treeconf_node_t *parent, treeconf_type_t type, const char *name, int len, const char *def, treeconf_nodown_t nodown, treeconf_change_t change, void *assoc) |
Create a node. | |
void | _tc_release_children (treeconf_node_t *node) |
Release a node's children. |
|
For internal use only.
GCC allows attributes to be attached to functions, variables, etc. We are particularly interested in the Definition at line 63 of file treeconf_int.h. |
|
For internal use only. This macro signals to the public header files that they are being used by the library itself. This is mostly used to control inclusions. Definition at line 38 of file treeconf_int.h. |
|
For internal use only.
This macro simply sets the
Definition at line 136 of file treeconf_int.h. Referenced by tc_find(), tc_load(), tc_register(), and tc_set(). |
|
For internal use only. This macro releases all memory associated with a given node, including that of all the node's children (if any).
Definition at line 150 of file treeconf_int.h. Referenced by _tc_release_children(), and tc_destroy(). |
|
For internal use only.
This macro calls the
Definition at line 121 of file treeconf_int.h. Referenced by _tc_set(), and tc_register(). |
|
For internal use only.
This macro takes care of calling the
Definition at line 108 of file treeconf_int.h. |
|
For internal use only.
Embeds the Definition at line 73 of file treeconf_int.h. |
|
For internal use only. This is the buffer size used for extracting data from a configuration file by tc_load(). Definition at line 81 of file treeconf_int.h. |
|
For internal use only. This is the buffer size used for variable names by tc_load(). Definition at line 88 of file treeconf_int.h. |
|
For internal use only. This function creates a node with a given set of characteristics.
Definition at line 82 of file _tc_node.c. References _treeconf_node_s::tn_assoc, _treeconf_node_s::tn_change, _treeconf_node_s::tn_context, _treeconf_node_s::tn_default, _treeconf_node_s::tn_down, _treeconf_node_s::tn_magic, _treeconf_node_s::tn_name, _treeconf_node_s::tn_next, _treeconf_node_s::tn_nodown, _treeconf_node_s::tn_parent, _treeconf_node_s::tn_type, _treeconf_node_s::tn_value, treeconf_ctx_t, treeconf_node_t, _treeconf_ctx_s::tx_config, and _treeconf_ctx_s::tx_count. Referenced by tc_find(), tc_register(), and tc_set(). |
|
For internal use only.
This helper function looks up the node named by
Definition at line 55 of file _tc_lookup_node.c. References result::r_comps, result::r_count, result::r_node, result::r_startnew, tc_break(), _treeconf_node_s::tn_down, tn_name, _treeconf_node_s::tn_next, tn_type, treeconf_ctx_t, treeconf_node_t, _treeconf_str_s::ts_length, _treeconf_str_s::ts_string, and tx_config. Referenced by tc_find(), tc_get(), tc_register(), and tc_set(). |
Here is the call graph for this function:
|
For internal use only.
This function walks through the list of children for the given
Definition at line 45 of file _tc_node.c. References _tc_release_node, _treeconf_node_s::tn_down, _treeconf_node_s::tn_next, and treeconf_node_t. Referenced by tc_register(), and tc_set(). |