Lines Matching refs:node

302 #define FOR_ALL_NODE_SIBLINGS(node, np) \  argument
303 for ((np) = (node); (np) != NULL; (np) = (np)->wn_sibling)
2009 static long node_compress(spellinfo_T *spin, wordnode_T *node, hashtab_T *ht, long *tot);
2011 static void clear_node(wordnode_T *node);
2012 static int put_node(FILE *fd, wordnode_T *node, int idx, int regionmask, int prefixtree);
2015 static int sug_filltable(spellinfo_T *spin, wordnode_T *node, int startwordnr, garray_T *gap);
2098 spell_clear_flags(wordnode_T *node) in spell_clear_flags() argument
2102 FOR_ALL_NODE_SIBLINGS(node, np) in spell_clear_flags()
2110 spell_print_node(wordnode_T *node, int depth) in spell_print_node() argument
2112 if (node->wn_u1.index) in spell_print_node()
2115 PRINTSOME(line1, depth, "(%d)", node->wn_nr, 0); in spell_print_node()
2124 node->wn_u1.index = TRUE; in spell_print_node()
2126 if (node->wn_byte != NUL) in spell_print_node()
2128 if (node->wn_child != NULL) in spell_print_node()
2129 PRINTSOME(line1, depth, " %c -> ", node->wn_byte, 0); in spell_print_node()
2132 PRINTSOME(line1, depth, " %c ???", node->wn_byte, 0); in spell_print_node()
2137 PRINTSOME(line2, depth, "%d/%d ", node->wn_nr, node->wn_refs); in spell_print_node()
2139 if (node->wn_sibling != NULL) in spell_print_node()
2144 if (node->wn_byte == NUL) in spell_print_node()
2152 if (node->wn_byte != NUL && node->wn_child != NULL) in spell_print_node()
2153 spell_print_node(node->wn_child, depth + 1); in spell_print_node()
2156 if (node->wn_sibling != NULL) in spell_print_node()
2161 spell_print_node(node->wn_sibling, depth); in spell_print_node()
4437 wordnode_T *node = root; in tree_add_word() local
4449 if (node != NULL && node->wn_refs > 1) in tree_add_word()
4451 --node->wn_refs; in tree_add_word()
4453 FOR_ALL_NODE_SIBLINGS(node, copyp) in tree_add_word()
4477 if (copyp == node) in tree_add_word()
4478 node = np; in tree_add_word()
4486 while (node != NULL in tree_add_word()
4487 && (node->wn_byte < word[i] in tree_add_word()
4488 || (node->wn_byte == NUL in tree_add_word()
4490 ? node->wn_affixID < (unsigned)affixID in tree_add_word()
4491 : (node->wn_flags < (unsigned)(flags & WN_MASK) in tree_add_word()
4492 || (node->wn_flags == (flags & WN_MASK) in tree_add_word()
4494 ? (node->wn_region & 0xffff) < region in tree_add_word()
4495 : node->wn_affixID in tree_add_word()
4498 prev = &node->wn_sibling; in tree_add_word()
4499 node = *prev; in tree_add_word()
4501 if (node == NULL in tree_add_word()
4502 || node->wn_byte != word[i] in tree_add_word()
4506 || node->wn_flags != (flags & WN_MASK) in tree_add_word()
4507 || node->wn_affixID != affixID))) in tree_add_word()
4519 if (node == NULL) in tree_add_word()
4523 np->wn_refs = node->wn_refs; in tree_add_word()
4524 node->wn_refs = 1; in tree_add_word()
4528 np->wn_sibling = node; in tree_add_word()
4529 node = np; in tree_add_word()
4534 node->wn_flags = flags; in tree_add_word()
4535 node->wn_region |= region; in tree_add_word()
4536 node->wn_affixID = affixID; in tree_add_word()
4539 prev = &node->wn_child; in tree_add_word()
4540 node = *prev; in tree_add_word()
4637 deref_wordnode(spellinfo_T *spin, wordnode_T *node) in deref_wordnode() argument
4642 if (--node->wn_refs == 0) in deref_wordnode()
4644 FOR_ALL_NODE_SIBLINGS(node, np) in deref_wordnode()
4715 wordnode_T *node, in node_compress() argument
4735 for (np = node; np != NULL && !got_int; np = np->wn_sibling) in node_compress()
4785 node->wn_u1.hashkey[0] = len; in node_compress()
4787 FOR_ALL_NODE_SIBLINGS(node, np) in node_compress()
4800 node->wn_u1.hashkey[1] = n == 0 ? 1 : n; in node_compress()
4802 node->wn_u1.hashkey[2] = n == 0 ? 1 : n; in node_compress()
4804 node->wn_u1.hashkey[3] = n == 0 ? 1 : n; in node_compress()
4806 node->wn_u1.hashkey[4] = n == 0 ? 1 : n; in node_compress()
4807 node->wn_u1.hashkey[5] = NUL; in node_compress()
5273 clear_node(wordnode_T *node) in clear_node() argument
5277 if (node != NULL) in clear_node()
5278 FOR_ALL_NODE_SIBLINGS(node, np) in clear_node()
5304 wordnode_T *node, in put_node() argument
5315 if (node == NULL) in put_node()
5319 node->wn_u1.index = idx; in put_node()
5322 FOR_ALL_NODE_SIBLINGS(node, np) in put_node()
5330 FOR_ALL_NODE_SIBLINGS(node, np) in put_node()
5390 && np->wn_child->wn_u2.wnode != node) in put_node()
5402 np->wn_child->wn_u2.wnode = node; in put_node()
5418 FOR_ALL_NODE_SIBLINGS(node, np) in put_node()
5419 if (np->wn_byte != 0 && np->wn_child->wn_u2.wnode == node) in put_node()
5683 wordnode_T *node, in sug_filltable() argument
5692 FOR_ALL_NODE_SIBLINGS(node, p) in sug_filltable()