if (completed == NULL)
return NULL;
- TAILQ_INIT(&completed->match_items);
- TAILQ_INIT(&completed->no_match_items);
+ TAILQ_INIT(&completed->nodes);
+ TAILQ_INIT(&completed->matches);
return completed;
}
completed->count_match++;
}
- TAILQ_INSERT_TAIL(&completed->match_items, item, next);
+ TAILQ_INSERT_TAIL(&completed->matches, item, next);
completed->count++;
return 0;
assert(completed1 != NULL);
assert(completed2 != NULL);
- while (!TAILQ_EMPTY(&completed2->match_items)) {
- item = TAILQ_FIRST(&completed2->match_items);
- TAILQ_REMOVE(&completed2->match_items, item, next);
+ while (!TAILQ_EMPTY(&completed2->matches)) {
+ item = TAILQ_FIRST(&completed2->matches);
+ TAILQ_REMOVE(&completed2->matches, item, next);
ec_completed_add_item(completed1, item);
}
if (completed == NULL)
return;
- while (!TAILQ_EMPTY(&completed->match_items)) {
- item = TAILQ_FIRST(&completed->match_items);
- TAILQ_REMOVE(&completed->match_items, item, next);
+ while (!TAILQ_EMPTY(&completed->matches)) {
+ item = TAILQ_FIRST(&completed->matches);
+ TAILQ_REMOVE(&completed->matches, item, next);
ec_completed_item_free(item);
}
ec_free(completed->smallest_start);
completed->count, completed->count_match,
completed->smallest_start);
- TAILQ_FOREACH(item, &completed->match_items, next) {
+ TAILQ_FOREACH(item, &completed->matches, next) {
fprintf(out, "add=<%s>, node=%p, node_type=%s\n",
item->add, item->node, item->node->type->name);
}
do {
if (iter->cur_item == NULL)
- iter->cur_item = TAILQ_FIRST(&completed->match_items);
+ iter->cur_item = TAILQ_FIRST(&completed->matches);
else
iter->cur_item = TAILQ_NEXT(iter->cur_item, next);
TAILQ_HEAD(ec_completed_item_list, ec_completed_item);
+struct ec_completed_node {
+ const struct ec_node *node;
+};
+
+TAILQ_HEAD(ec_completed_node_list, ec_completed_node);
+
struct ec_completed {
unsigned count;
unsigned count_match;
char *smallest_start;
- struct ec_completed_item_list match_items;
- struct ec_completed_item_list no_match_items;
+ struct ec_completed_node_list nodes;
+ struct ec_completed_item_list matches;
};
/*