Lines Matching refs:leaf
383 void *leaf = NULL; in lookup() local
386 while (!leaf && node) { in lookup()
394 leaf = node->right; in lookup()
403 leaf = node->left; in lookup()
410 return leaf; in lookup()
533 static int insert(struct tree *tree, char *key, int keylen, void *leaf) in insert() argument
559 *cursor = leaf; in insert()
577 leaf = node->left; in insert()
582 tree->root = leaf; in insert()
585 parent->left = leaf; in insert()
594 parent->right = leaf; in insert()
1417 struct unicode_data *leaf = l; in nfdi_print() local
1419 printf("%*sleaf @ %p code %X ccc %d gen %d", indent, "", leaf, in nfdi_print()
1420 leaf->code, leaf->ccc, leaf->gen); in nfdi_print()
1422 if (leaf->utf8nfdi && leaf->utf8nfdi[0] == HANGUL) in nfdi_print()
1424 else if (leaf->utf8nfdi) in nfdi_print()
1425 printf(" nfdi \"%s\"", (const char*)leaf->utf8nfdi); in nfdi_print()
1432 struct unicode_data *leaf = l; in nfdicf_print() local
1434 printf("%*sleaf @ %p code %X ccc %d gen %d", indent, "", leaf, in nfdicf_print()
1435 leaf->code, leaf->ccc, leaf->gen); in nfdicf_print()
1437 if (leaf->utf8nfdicf) in nfdicf_print()
1438 printf(" nfdicf \"%s\"", (const char*)leaf->utf8nfdicf); in nfdicf_print()
1439 else if (leaf->utf8nfdi && leaf->utf8nfdi[0] == HANGUL) in nfdicf_print()
1441 else if (leaf->utf8nfdi) in nfdicf_print()
1442 printf(" nfdi \"%s\"", (const char*)leaf->utf8nfdi); in nfdicf_print()
1453 struct unicode_data *leaf = l; in nfdicf_mark() local
1455 if (leaf->utf8nfdicf) in nfdicf_mark()
1462 struct unicode_data *leaf = l; in correction_mark() local
1464 return leaf->correction; in correction_mark()
1469 struct unicode_data *leaf = l; in nfdi_size() local
1472 if (HANGUL_SYLLABLE(leaf->code)) in nfdi_size()
1474 else if (leaf->utf8nfdi) in nfdi_size()
1475 size += strlen(leaf->utf8nfdi) + 1; in nfdi_size()
1481 struct unicode_data *leaf = l; in nfdicf_size() local
1484 if (HANGUL_SYLLABLE(leaf->code)) in nfdicf_size()
1486 else if (leaf->utf8nfdicf) in nfdicf_size()
1487 size += strlen(leaf->utf8nfdicf) + 1; in nfdicf_size()
1488 else if (leaf->utf8nfdi) in nfdicf_size()
1489 size += strlen(leaf->utf8nfdi) + 1; in nfdicf_size()
1495 struct unicode_data *leaf = l; in nfdi_index() local
1497 return &tree->leafindex[leaf->code]; in nfdi_index()
1502 struct unicode_data *leaf = l; in nfdicf_index() local
1504 return &tree->leafindex[leaf->code]; in nfdicf_index()
1509 struct unicode_data *leaf = l; in nfdi_emit() local
1512 *data++ = leaf->gen; in nfdi_emit()
1514 if (HANGUL_SYLLABLE(leaf->code)) { in nfdi_emit()
1517 } else if (leaf->utf8nfdi) { in nfdi_emit()
1519 s = (unsigned char*)leaf->utf8nfdi; in nfdi_emit()
1523 *data++ = leaf->ccc; in nfdi_emit()
1530 struct unicode_data *leaf = l; in nfdicf_emit() local
1533 *data++ = leaf->gen; in nfdicf_emit()
1535 if (HANGUL_SYLLABLE(leaf->code)) { in nfdicf_emit()
1538 } else if (leaf->utf8nfdicf) { in nfdicf_emit()
1540 s = (unsigned char*)leaf->utf8nfdicf; in nfdicf_emit()
1543 } else if (leaf->utf8nfdi) { in nfdicf_emit()
1545 s = (unsigned char*)leaf->utf8nfdi; in nfdicf_emit()
1549 *data++ = leaf->ccc; in nfdicf_emit()
1748 utf8leaf_t *leaf; in verify() local
1765 leaf = utf8lookup(tree, hangul, key); in verify()
1767 if (!leaf) { in verify()
1777 if (data->gen != LEAF_GEN(leaf)) in verify()
1779 if (LEAF_CCC(leaf) == DECOMPOSE) { in verify()
1787 LEAF_STR(leaf))) { in verify()
1796 LEAF_STR(leaf))) in verify()
1799 LEAF_STR(leaf))) { in verify()
1803 } else if (data->ccc != LEAF_CCC(leaf)) { in verify()
1813 if (leaf) { in verify()
1816 LEAF_GEN(leaf), in verify()
1817 LEAF_CCC(leaf), in verify()
1818 LEAF_CCC(leaf) == DECOMPOSE ? in verify()
1819 LEAF_STR(leaf) : ""); in verify()
2805 utf8leaf_t *leaf; in utf8agemax() local
2814 leaf = utf8lookup(tree, hangul, s); in utf8agemax()
2815 if (!leaf) in utf8agemax()
2817 leaf_age = ages[LEAF_GEN(leaf)]; in utf8agemax()
2832 utf8leaf_t *leaf; in utf8agemin() local
2841 leaf = utf8lookup(tree, hangul, s); in utf8agemin()
2842 if (!leaf) in utf8agemin()
2844 leaf_age = ages[LEAF_GEN(leaf)]; in utf8agemin()
2858 utf8leaf_t *leaf; in utf8nagemax() local
2867 leaf = utf8nlookup(tree, hangul, s, len); in utf8nagemax()
2868 if (!leaf) in utf8nagemax()
2870 leaf_age = ages[LEAF_GEN(leaf)]; in utf8nagemax()
2885 utf8leaf_t *leaf; in utf8nagemin() local
2894 leaf = utf8nlookup(tree, hangul, s, len); in utf8nagemin()
2895 if (!leaf) in utf8nagemin()
2897 leaf_age = ages[LEAF_GEN(leaf)]; in utf8nagemin()
2914 utf8leaf_t *leaf; in utf8len() local
2921 leaf = utf8lookup(tree, hangul, s); in utf8len()
2922 if (!leaf) in utf8len()
2924 if (ages[LEAF_GEN(leaf)] > tree->maxage) in utf8len()
2926 else if (LEAF_CCC(leaf) == DECOMPOSE) in utf8len()
2927 ret += strlen(LEAF_STR(leaf)); in utf8len()
2941 utf8leaf_t *leaf; in utf8nlen() local
2948 leaf = utf8nlookup(tree, hangul, s, len); in utf8nlen()
2949 if (!leaf) in utf8nlen()
2951 if (ages[LEAF_GEN(leaf)] > tree->maxage) in utf8nlen()
2953 else if (LEAF_CCC(leaf) == DECOMPOSE) in utf8nlen()
2954 ret += strlen(LEAF_STR(leaf)); in utf8nlen()
3059 utf8leaf_t *leaf; in utf8byte() local
3086 leaf = utf8lookup(u8c->tree, u8c->hangul, u8c->s); in utf8byte()
3088 leaf = utf8nlookup(u8c->tree, u8c->hangul, in utf8byte()
3093 if (!leaf) in utf8byte()
3097 if (ages[LEAF_GEN(leaf)] > u8c->tree->maxage) { in utf8byte()
3099 } else if ((ccc = LEAF_CCC(leaf)) == DECOMPOSE) { in utf8byte()
3102 u8c->s = LEAF_STR(leaf); in utf8byte()
3110 leaf = utf8lookup(u8c->tree, u8c->hangul, u8c->s); in utf8byte()
3111 ccc = LEAF_CCC(leaf); in utf8byte()