Lines Matching refs:roots

17 	   REFERENCES step (5) may add temporary dummy roots. They use larger
22 root_idx1 is node's index in roots[] array + 1.
41 ARRAY(struct mail_thread_root_node) roots;
205 struct mail_thread_root_node *roots;
215 roots = array_get_modifiable(&ctx->roots, &count);
226 roots[i].root_idx1 = i + 1;
227 if (!roots[i].dummy)
228 idx = roots[i].node.idx;
229 else if (!roots[i].ignore) {
231 thread_sort_children(ctx, roots[i].node.idx,
248 add_base_subject(&gather_ctx, subject, &roots[i]);
251 i_assert(roots[count-1].parent_root_idx1 <= count);
272 struct mail_thread_root_node *roots, *root, new_root;
281 roots = array_get_modifiable(&ctx->roots, &count);
285 root = &roots[root->parent_root_idx1 - 1];
325 new_root.root_idx1 = array_count(&ctx->roots) + 1;
337 array_append(&ctx->roots, &new_root, 1);
347 struct mail_thread_root_node *roots;
351 roots = array_get_modifiable(&ctx->roots, &count);
353 if (roots[i].parent_root_idx1 != 0 && !roots[i].ignore) {
354 mail_thread_root_thread_merge(ctx, &roots[i]);
355 /* more roots may have been added */
356 roots = array_idx_modifiable(&ctx->roots, 0);
369 struct mail_thread_root_node *roots;
374 roots = array_get_modifiable(&ctx->roots, &count);
376 if (roots[i].ignore)
378 if (roots[i].dummy) {
380 if (shadows[roots[i].node.idx].first_child_idx == 0) {
382 roots[i].ignore = TRUE;
385 thread_sort_children(ctx, roots[i].node.idx,
391 roots[i].node = children[0];
392 thread_child_node_fill(ctx, &roots[i].node);
393 roots[i].dummy = FALSE;
395 roots[i].node.uid = children[0].uid;
396 roots[i].node.sort_date = children[0].sort_date;
399 thread_child_node_fill(ctx, &roots[i].node);
403 array_sort(&ctx->roots, mail_thread_root_node_cmp);
419 struct mail_thread_root_node *roots, *root;
425 roots = array_get_modifiable(&ctx->roots, &root_count);
430 if (roots[idx].dummy &&
431 shadows[roots[idx].node.idx].first_child_idx == 0)
432 roots[idx].ignore = TRUE;
449 root = bsearch(&parent_idx, roots, root_count, sizeof(*roots),
456 array_sort(&ctx->roots, mail_thread_root_node_cmp);
481 /* root node - add to roots list */
490 array_append(&ctx->roots, &root, 1);
523 i_array_init(&ctx->roots, I_MIN(128, record_count));
579 struct mail_thread_root_node *roots;
582 roots = array_get_modifiable(&iter->ctx->roots, &count);
585 if (!roots[i].ignore) {
586 if (roots[i].dummy)
587 roots[i].node.uid = 0;
588 array_append(&iter->children, &roots[i].node, 1);
670 array_free(&iter->ctx->roots);