Lines Matching refs:handle

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