• Home
  • Raw
  • Download

Lines Matching refs:node

29     cnode* node = static_cast<cnode*>(calloc(sizeof(cnode), 1));  in config_node()  local
30 if(node) { in config_node()
31 node->name = name ? name : ""; in config_node()
32 node->value = value ? value : ""; in config_node()
35 return node; in config_node()
40 cnode *node, *match = NULL; in config_find() local
43 for(node = root->first_child; node; node = node->next) in config_find()
44 if(!strcmp(node->name, name)) in config_find()
45 match = node; in config_find()
52 cnode *node; in _config_create() local
54 node = config_node(name, NULL); in _config_create()
57 root->last_child->next = node; in _config_create()
59 root->first_child = node; in _config_create()
61 root->last_child = node; in _config_create()
63 return node; in _config_create()
68 cnode *node; in config_bool() local
70 node = config_find(root, name); in config_bool()
71 if(!node) in config_bool()
74 switch(node->value[0]) { in config_bool()
86 cnode *node; in config_str() local
88 node = config_find(root, name); in config_str()
89 if(!node) in config_str()
91 return node->value; in config_str()
96 cnode *node; in config_set() local
98 node = config_find(root, name); in config_set()
99 if(node) in config_set()
100 node->value = value; in config_set()
102 node = _config_create(root, name); in config_set()
103 node->value = value; in config_set()
242 static int parse_expr(cstate *cs, cnode *node);
244 static int parse_block(cstate *cs, cnode *node) in parse_block() argument
249 if(parse_expr(cs, node)) return -1; in parse_block()
263 cnode *node; in parse_expr() local
266 node = config_find(root, cs->text); in parse_expr()
267 if(!node || *node->value) in parse_expr()
268 node = _config_create(root, cs->text); in parse_expr()
275 node = _config_create(node, cs->text); in parse_expr()
279 node->value = cs->text; in parse_expr()
283 return parse_block(cs, node); in parse_expr()