Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

_tc_lookup_node.c File Reference


Detailed Description

For internal use only.

This file contains a helper function to look up a specific node in the configuration tree.

Definition in file _tc_lookup_node.c.

#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "treeconf_int.h"

Include dependency graph for _tc_lookup_node.c:

Include dependency graph

Go to the source code of this file.

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.


Function Documentation

unsigned int _tc_lookup_node treeconf_ctx_t ctx,
const char *  name,
treeconf_node_t node,
struct result res
 

For internal use only.

This helper function looks up the node named by name (relative to the parent node) in the configuration stored in the ctx. The result of the lookup is stored in the result structure.

Parameters:
ctx A pointer to a treeconf_ctx_t designating the configuration tree.
name The name of the node to look up.
node A pointer to a treeconf_node_t indicating the starting point for the search.
[out] res A pointer to the result structure to load with the results of the node lookup.
Return values:
ENOENT The named node cannot exist.
ENOMEM Unable to allocate memory.

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:


Generated on Wed Jun 8 09:18:27 2005 for treeconf by  doxygen 1.3.9.1