Lines Matching refs:handle
100 #define COPY_QUE(handle, src, dst) \ argument
101 nj_memcpy(POS_TO_ADDRESS((handle), (dst)), POS_TO_ADDRESS((handle), (src)), QUE_SIZE(handle))
110 static NJ_WQUE *get_que(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id);
111 static NJ_INT16 is_continued(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id);
112 static NJ_UINT16 search_next_que(NJ_DIC_HANDLE handle, NJ_UINT16 que_id);
113 static NJ_INT16 que_strcmp_complete_with_hyouki(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que…
114 static NJ_CHAR *get_string(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id, NJ_UINT8 *slen);
115 static NJ_CHAR *get_hyouki(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id, NJ_UINT8 *slen);
119 static NJ_INT16 search_range_by_yomi(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT8 op, NJ_CHAR *yo…
120 static NJ_INT16 search_range_by_yomi2(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT8 op, NJ_CHAR *y…
122 static NJ_INT16 search_range_by_yomi_multi(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_CHAR *yomi, NJ_…
123 static NJ_INT16 str_que_cmp(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_CHAR *yomi, NJ_UINT16 yomiLen,…
124 static NJ_WQUE *get_que_type_and_next(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id);
125 static NJ_WQUE *get_que_allHinsi(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id);
126 static NJ_WQUE *get_que_yomiLen_and_hyoukiLen(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_i…
127 static NJ_INT16 continue_cnt(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id);
129 static NJ_UINT8 *get_search_index_address(NJ_DIC_HANDLE handle, NJ_UINT8 search_pattern);
133 static NJ_HINDO calculate_hindo(NJ_DIC_HANDLE handle, NJ_INT32 freq, NJ_DIC_FREQ *dic_freq, NJ_INT1…
134 static NJ_INT16 que_strcmp_include(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id, NJ_CHAR …
150 static NJ_UINT8 *get_search_index_address(NJ_DIC_HANDLE handle, NJ_UINT8 search_pattern) { in get_search_index_address() argument
154 return LEARN_INDEX_TOP_ADDR(handle); in get_search_index_address()
168 word_count = GET_LEARN_WORD_COUNT(loctset->loct.handle); in njd_l_search_word()
175 type = NJ_GET_DIC_TYPE_EX(loctset->loct.type, loctset->loct.handle); in njd_l_search_word()
181 if (con->ylen > NJ_GET_MAX_YLEN(loctset->loct.handle)) { in njd_l_search_word()
209 … for (hIdx = 0; (hIdx < NJ_MAX_DIC) && (pdicinfo->handle != loctset->loct.handle); hIdx++) { in njd_l_search_word()
237 if (NJ_GET_DIC_TYPE_EX(loctset->loct.type, loctset->loct.handle) == NJ_DIC_TYPE_USER) { in njd_l_search_word()
263 static NJ_WQUE *get_que_type_and_next(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in get_que_type_and_next() argument
269 if (que_id >= GET_LEARN_MAX_WORD_COUNT(handle)) { in get_que_type_and_next()
273 ptr = POS_TO_ADDRESS(handle, que_id); in get_que_type_and_next()
292 static NJ_WQUE *get_que_yomiLen_and_hyoukiLen(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in get_que_yomiLen_and_hyoukiLen() argument
298 if (que_id >= GET_LEARN_MAX_WORD_COUNT(handle)) { in get_que_yomiLen_and_hyoukiLen()
302 ptr = POS_TO_ADDRESS(handle, que_id); in get_que_yomiLen_and_hyoukiLen()
323 static NJ_WQUE *get_que_allHinsi(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in get_que_allHinsi() argument
329 if (que_id >= GET_LEARN_MAX_WORD_COUNT(handle)) { in get_que_allHinsi()
333 ptr = POS_TO_ADDRESS(handle, que_id); in get_que_allHinsi()
352 static NJ_WQUE *get_que(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id) { in get_que() argument
357 if (que_id >= GET_LEARN_MAX_WORD_COUNT(handle)) { in get_que()
361 ptr = POS_TO_ADDRESS(handle, que_id); in get_que()
386 static NJ_INT16 is_continued(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id) { in is_continued() argument
392 max = GET_LEARN_MAX_WORD_COUNT(handle); in is_continued()
393 end = GET_LEARN_NEXT_WORD_POS(handle); in is_continued()
397 if (que_id >= GET_LEARN_MAX_WORD_COUNT(handle)) { in is_continued()
408 que = get_que_type_and_next(iwnn, handle, que_id); in is_continued()
433 static NJ_INT16 continue_cnt(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT16 que_id) { in continue_cnt() argument
440 max = GET_LEARN_MAX_WORD_COUNT(handle); in continue_cnt()
441 end = GET_LEARN_NEXT_WORD_POS(handle); in continue_cnt()
456 que = get_que_type_and_next(iwnn, handle, que_id); in continue_cnt()
481 static NJ_UINT16 search_next_que(NJ_DIC_HANDLE handle, NJ_UINT16 que_id) { in search_next_que() argument
486 max = GET_LEARN_MAX_WORD_COUNT(handle); in search_next_que()
495 if (GET_TYPE_FROM_DATA(POS_TO_ADDRESS(handle, que_id)) != QUE_TYPE_EMPTY) { in search_next_que()
505 static NJ_INT16 que_strcmp_complete_with_hyouki(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in que_strcmp_complete_with_hyouki() argument
526 cnt = GET_LEARN_WORD_COUNT(handle); in que_strcmp_complete_with_hyouki()
530 str = get_string(iwnn, handle, que_id, &slen); in que_strcmp_complete_with_hyouki()
543 str = get_hyouki(iwnn, handle, que_id, &slen); in que_strcmp_complete_with_hyouki()
568 ret = is_continued(iwnn, handle, que_id); in que_strcmp_complete_with_hyouki()
587 que_id = search_next_que(handle, que_id); in que_strcmp_complete_with_hyouki()
593 static NJ_INT16 que_strcmp_include(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in que_strcmp_include() argument
612 i = GET_LEARN_WORD_COUNT(handle); in que_strcmp_include()
617 ret = is_continued(iwnn, handle, que_id); in que_strcmp_include()
627 que_id = search_next_que(handle, que_id); in que_strcmp_include()
629 str = get_string(iwnn, handle, que_id, &slen); in que_strcmp_include()
680 static NJ_CHAR *get_string(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in get_string() argument
690 src = POS_TO_ADDRESS(handle, que_id); in get_string()
700 printf("get_string(handle=%p, que_id=%d) : broken que\n", handle, que_id); in get_string()
705 if (NJ_GET_DIC_TYPE(handle) == NJ_DIC_TYPE_USER) { in get_string()
718 que_size = QUE_SIZE(handle); in get_string()
732 top_addr = LEARN_DATA_TOP_ADDR(handle); in get_string()
734 bottom_addr += que_size * GET_LEARN_MAX_WORD_COUNT(handle) - 1; in get_string()
766 static NJ_CHAR *get_hyouki(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in get_hyouki() argument
779 que = get_que_yomiLen_and_hyoukiLen(iwnn, handle, que_id); in get_hyouki()
784 dictype = NJ_GET_DIC_TYPE(handle); in get_hyouki()
801 src = POS_TO_ADDRESS(handle, que_id); in get_hyouki()
804 hira = get_string(iwnn, handle, que_id, slen); in get_hyouki()
819 que_size = QUE_SIZE(handle); in get_hyouki()
831 top_addr = LEARN_DATA_TOP_ADDR(handle); in get_hyouki()
833 bottom_addr += que_size * GET_LEARN_MAX_WORD_COUNT(handle) - 1; in get_hyouki()
939 ret = search_range_by_yomi(iwnn, loctset->loct.handle, search_pattern, in get_cand_by_sequential()
964 ptr = get_search_index_address(loctset->loct.handle, cond->operation); in get_cand_by_sequential()
971 ret = str_que_cmp(iwnn, loctset->loct.handle, cond->yomi, cond->ylen, que_id, 1); in get_cand_by_sequential()
979 ret = str_que_cmp(iwnn, loctset->loct.handle, cond->yomi, cond->ylen, que_id, 2); in get_cand_by_sequential()
989 ret = que_strcmp_complete_with_hyouki(iwnn, loctset->loct.handle, que_id, in get_cand_by_sequential()
1000 num_count = continue_cnt(iwnn, loctset->loct.handle, que_id); in get_cand_by_sequential()
1022 que = get_que_allHinsi(iwnn, loctset->loct.handle, que_id); in get_cand_by_sequential()
1026 switch (NJ_GET_DIC_TYPE_EX(loctset->loct.type, loctset->loct.handle)) { in get_cand_by_sequential()
1030 ret = que_strcmp_include(iwnn, loctset->loct.handle, que_id, yomi); in get_cand_by_sequential()
1071 ptr = get_search_index_address(loctset->loct.handle, cond->operation); in get_cand_by_evaluate()
1074 oldest = GET_LEARN_NEXT_WORD_POS(loctset->loct.handle); in get_cand_by_evaluate()
1083 ret = search_range_by_yomi_multi(iwnn, loctset->loct.handle, in get_cand_by_evaluate()
1088 ret = search_range_by_yomi(iwnn, loctset->loct.handle, search_pattern, in get_cand_by_evaluate()
1101 current += GET_LEARN_MAX_WORD_COUNT(loctset->loct.handle); in get_cand_by_evaluate()
1117 eval = que_id + GET_LEARN_MAX_WORD_COUNT(loctset->loct.handle); in get_cand_by_evaluate()
1130 ret = que_strcmp_complete_with_hyouki(iwnn, loctset->loct.handle, que_id, in get_cand_by_evaluate()
1134 ret = str_que_cmp(iwnn, loctset->loct.handle, cond->yomi, cond->ylen, que_id, 2); in get_cand_by_evaluate()
1147 num_count = continue_cnt(iwnn, loctset->loct.handle, que_id); in get_cand_by_evaluate()
1167 que = get_que_allHinsi(iwnn, loctset->loct.handle, que_id); in get_cand_by_evaluate()
1196 static NJ_INT16 search_range_by_yomi(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT8 op, in search_range_by_yomi() argument
1210 ptr = get_search_index_address(handle, op); in search_range_by_yomi()
1212 max = GET_LEARN_WORD_COUNT(handle); in search_range_by_yomi()
1240 str = get_string(iwnn, handle, que_id, &slen); in search_range_by_yomi()
1298 str = get_string(iwnn, handle, que_id, &slen); in search_range_by_yomi()
1354 str = get_string(iwnn, handle, que_id, &slen); in search_range_by_yomi()
1395 static NJ_INT16 search_range_by_yomi_multi(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, in search_range_by_yomi_multi() argument
1411 ptr = LEARN_INDEX_TOP_ADDR(handle); in search_range_by_yomi_multi()
1414 max = GET_LEARN_WORD_COUNT(handle); in search_range_by_yomi_multi()
1441 ret = str_que_cmp(iwnn, handle, comp_yomi, comp_len, que_id, 1); in search_range_by_yomi_multi()
1484 ret = str_que_cmp(iwnn, handle, comp_yomi, comp_len, que_id, 1); in search_range_by_yomi_multi()
1513 ret = str_que_cmp(iwnn, handle, yomi, len, que_id, 1); in search_range_by_yomi_multi()
1531 static NJ_INT16 str_que_cmp(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_CHAR *yomi, in str_que_cmp() argument
1547 que_id = GET_LEARN_MAX_WORD_COUNT(handle); in str_que_cmp()
1550 if (que_id >= GET_LEARN_MAX_WORD_COUNT(handle)) { in str_que_cmp()
1555 queYomi = POS_TO_ADDRESS(handle, que_id); in str_que_cmp()
1580 top_addr = LEARN_DATA_TOP_ADDR(handle); in str_que_cmp()
1581 que_size = QUE_SIZE(handle); in str_que_cmp()
1585 queYomiSearchArea = (NJ_UINT8)(QUE_SIZE(handle) - LEARN_QUE_STRING_OFFSET); in str_que_cmp()
1621 bottom_addr += que_size * GET_LEARN_MAX_WORD_COUNT(handle) - 1; in str_que_cmp()
1656 static NJ_HINDO calculate_hindo(NJ_DIC_HANDLE handle, NJ_INT32 freq, NJ_DIC_FREQ *dic_freq, NJ_INT1… in calculate_hindo() argument
1661 max = GET_LEARN_MAX_WORD_COUNT(handle); in calculate_hindo()
1666 if (NJ_GET_DIC_TYPE(handle) == NJ_DIC_TYPE_USER) { in calculate_hindo()
1693 learn_index_top_addr = get_search_index_address(loctset->loct.handle, search_pattern); in get_hindo()
1697 oldest = GET_LEARN_NEXT_WORD_POS(loctset->loct.handle); in get_hindo()
1701 que_id = search_next_que(loctset->loct.handle, que_id); in get_hindo()
1704 que = get_que(iwnn, loctset->loct.handle, que_id); in get_hindo()
1709 max = GET_LEARN_MAX_WORD_COUNT(loctset->loct.handle); in get_hindo()
1717 return calculate_hindo(loctset->loct.handle, dic_freq, &(loctset->dic_freq), 1000, 0); in get_hindo()
1728 …learn_index_top_addr = get_search_index_address(loctset->loct.handle, GET_LOCATION_OPERATION(locts… in njd_l_get_word()
1735 que_id = search_next_que(loctset->loct.handle, que_id); in njd_l_get_word()
1738 que = get_que(iwnn, loctset->loct.handle, que_id); in njd_l_get_word()
1786 str = get_string(iwnn, word->stem.loc.handle, que_id, &slen); in njd_l_get_stroke()
1821 str = get_hyouki(iwnn, word->stem.loc.handle, que_id, &slen); in njd_l_get_candidate()
1838 NJ_INT16 njd_l_check_dic(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle) { in njd_l_check_dic() argument
1849 if ((NJ_GET_DIC_TYPE(handle) != NJ_DIC_TYPE_USER)) { in njd_l_check_dic()
1855 word_cnt = GET_LEARN_WORD_COUNT(handle); in njd_l_check_dic()
1856 max = GET_LEARN_MAX_WORD_COUNT(handle); in njd_l_check_dic()
1863 ptr = LEARN_INDEX_TOP_ADDR(handle); in njd_l_check_dic()
1875 ptr = LEARN_INDEX_TOP_ADDR2(handle); in njd_l_check_dic()
1887 flg = GET_UINT16(handle + POS_WRITE_FLG); in njd_l_check_dic()
1889 target_id = GET_UINT16(handle + POS_WRITE_FLG + 2); in njd_l_check_dic()
1906 word_cnt = GET_LEARN_WORD_COUNT(handle); in njd_l_check_dic()
1908 ptr = LEARN_INDEX_TOP_ADDR(handle); in njd_l_check_dic()
1911 if (get_hyouki(iwnn, handle, id1, &slen) == NULL) { in njd_l_check_dic()
1918 ptr = LEARN_INDEX_TOP_ADDR2(handle); in njd_l_check_dic()
1971 ptr = get_search_index_address(loctset->loct.handle, cond->operation); in get_cand_by_evaluate2()
1974 oldest = GET_LEARN_NEXT_WORD_POS(loctset->loct.handle); in get_cand_by_evaluate2()
2018 ret = search_range_by_yomi(iwnn, loctset->loct.handle, search_pattern, in get_cand_by_evaluate2()
2047 … ret = search_range_by_yomi(iwnn, loctset->loct.handle, search_pattern, in get_cand_by_evaluate2()
2107 str = get_string(iwnn, loctset->loct.handle, que_id, &slen); in get_cand_by_evaluate2()
2122 ret = search_range_by_yomi2(iwnn, loctset->loct.handle, search_pattern, in get_cand_by_evaluate2()
2164 … ret = search_range_by_yomi2(iwnn, loctset->loct.handle, search_pattern, in get_cand_by_evaluate2()
2214 current += GET_LEARN_MAX_WORD_COUNT(loctset->loct.handle); in get_cand_by_evaluate2()
2252 eval = que_id + GET_LEARN_MAX_WORD_COUNT(loctset->loct.handle); in get_cand_by_evaluate2()
2267 str = get_string(iwnn, loctset->loct.handle, que_id, &slen); in get_cand_by_evaluate2()
2274 que = get_que_allHinsi(iwnn, loctset->loct.handle, que_id); in get_cand_by_evaluate2()
2307 static NJ_INT16 search_range_by_yomi2(NJ_CLASS *iwnn, NJ_DIC_HANDLE handle, NJ_UINT8 op, in search_range_by_yomi2() argument
2323 ptr = get_search_index_address(handle, op); in search_range_by_yomi2()
2325 max = GET_LEARN_WORD_COUNT(handle); in search_range_by_yomi2()
2340 str = get_string(iwnn, handle, que_id, &slen); in search_range_by_yomi2()
2379 str = get_string(iwnn, handle, que_id, &slen); in search_range_by_yomi2()
2409 str = get_string(iwnn, handle, que_id, &slen); in search_range_by_yomi2()