Lines Matching defs:node
147 #define CHECK_MAGIC(node) \
148 if ((node)->magic != PROF_MAGIC_NODE) \
184 (struct profile_node *node);
196 struct profile_node **node);
686 struct profile_node *node;
829 profile_add_node(state->current_section, tag, value, &node);
831 node->final = 1;
1032 * Each node may represent either a relation or a section header.
1043 * Free a node, and any children
1045 void profile_free_node(struct profile_node *node)
1049 if (node->magic != PROF_MAGIC_NODE)
1052 if (node->name)
1053 free(node->name);
1054 if (node->value)
1055 free(node->value);
1057 for (child=node->first_child; child; child = next) {
1061 node->magic = 0;
1063 free(node);
1080 * Create a node
1115 errcode_t profile_verify_node(struct profile_node *node)
1120 CHECK_MAGIC(node);
1122 if (node->value && node->first_child)
1126 for (p = node->first_child; p; last = p, p = p->next) {
1131 if (node->group_level+1 != p->group_level)
1133 if (p->parent != node)
1144 * Add a node to a particular section
1158 * Find the place to insert the new node. We look for the
1159 * place *after* the last match of the node name, since
1203 struct profile_node **node)
1229 if (node)
1230 *node = p;
1274 struct profile_node *node;
1306 iter->node = 0;
1346 * If the file has changed, then the node pointer is invalid,
1349 if (iter->node && (iter->file &&
1353 iter->node = 0;
1355 if (iter->node && iter->node->magic != PROF_MAGIC_NODE) {
1359 if (iter->node == 0) {
1408 iter->node = section->first_child;
1411 * OK, now we know iter->node is set up correctly. Let's do
1414 for (p = iter->node; p; p = p->next) {
1434 iter->node = 0;
1438 if ((iter->node = p->next) == NULL)